Ariver
2026-06-30 bcceca83ce966598e00e0319d85ec11d6df9d272
src/Apptag/LauncherHotkeySettings.swift
@@ -50,6 +50,10 @@
    private static let allowedModifierMask = UInt32(
        controlKey | optionKey | shiftKey | cmdKey | kEventKeyModifierFnMask
    )
    private static let functionKeyCodes: Set<Int> = [
        kVK_F1, kVK_F2, kVK_F3, kVK_F4, kVK_F5, kVK_F6,
        kVK_F7, kVK_F8, kVK_F9, kVK_F10, kVK_F11, kVK_F12
    ]
    static func defaultHotkey(for kind: LauncherHotkeyKind) -> LauncherHotkey {
        kind.hotkey
@@ -185,7 +189,7 @@
    private static func hasSupportedModifierCombination(_ hotkey: LauncherHotkey) -> Bool {
        let modifiers = hotkey.modifiers & allowedModifierMask
        guard modifiers != 0 else { return false }
        if modifiers == UInt32(shiftKey) || modifiers == UInt32(optionKey) {
        if modifiers == UInt32(shiftKey) {
            return false
        }
        if modifiers == UInt32(kEventKeyModifierFnMask) {
@@ -200,10 +204,9 @@
            return true
        case kVK_LeftArrow, kVK_RightArrow, kVK_UpArrow, kVK_DownArrow:
            return true
        case kVK_F1...kVK_F12:
            return true
        default:
            return LauncherHotkey.printableKeyCodes.contains(Int(keyCode))
            let key = Int(keyCode)
            return functionKeyCodes.contains(key) || LauncherHotkey.printableKeyCodes.contains(key)
        }
    }