import ParcelConfig import ParcelPlatform @MainActor final class AppShortcutCapture { private var recordedKey: HotKey? func consume(_ press: HotKeyPress, chord: KeyChord, record: (KeyChord) -> Bool) -> Bool { if press.isRepeat, recordedKey == press.hotKey { return true } if !press.isRepeat { recordedKey = nil } guard record(chord) else { return false } recordedKey = press.hotKey return true } }