diff --git a/changelog.md b/changelog.md index de26b26e..3f395861 100644 --- a/changelog.md +++ b/changelog.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0) - Added names for the keys `rfkill` and `micmute` (#883). If you previously used the buttons `missing247` and `missing248`, please update to the new names. +- Added more MacOS keys (#936) ### Changed diff --git a/src/KMonad/Keyboard/IO/Mac/Types.hs b/src/KMonad/Keyboard/IO/Mac/Types.hs index a67ccd74..90d2623e 100644 --- a/src/KMonad/Keyboard/IO/Mac/Types.hs +++ b/src/KMonad/Keyboard/IO/Mac/Types.hs @@ -13,6 +13,7 @@ import Foreign.Storable import KMonad.Keyboard import qualified RIO.HashMap as M +import RIO.List (sortOn) ---------------------------------------------------------------------------- @@ -83,7 +84,8 @@ fromMacKeycode = flip M.lookup kcMap -- | Lookup the correspondig 'MacKeycode' for this 'Keycode' toMacKeycode :: Keycode -> Maybe MacKeycode toMacKeycode = flip M.lookup revMap - where revMap = M.fromList $ M.toList kcMap ^.. folded . swapped + -- We sort the reversed list, since some keycodes are duplicates (e.g.: KeyBackslash) and the later takes precedence + where revMap = M.fromList . sortOn (Down . snd) $ M.toList kcMap ^.. folded . swapped -- | Convert a 'KeyEvent' to a 'MacKeyEvent' -- @@ -112,10 +114,13 @@ fromMacKeyEvent (MacKeyEvent (s, (p, u))) -------------------------------------------------------------------------------- -- $kc --- | Mac does not use the same keycodes as Linux, so we need to translate. +-- | Mac mostly uses the HID names instead. Since Linux doesn't we need to translate. -- --- See https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-315.7.16/IOHIDFamily/IOHIDUsageTables.h --- See https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-700/IOHIDFamily/AppleHIDUsageTables.h.auto.html +-- For Mac keycodes see https://github.com/apple-opensource/IOHIDFamily/blob/master/IOHIDFamily/IOHIDUsageTables.h +-- +-- For HID to Linux mappings: +-- - See the source code where it's defined at https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c +-- - See the table provided by the android docs at https://source.android.com/docs/core/interaction/input/keyboard-devices kcMap :: M.HashMap MacKeycode Keycode kcMap = M.fromList [ ((0x7,0x4), KeyA) @@ -164,7 +169,7 @@ kcMap = M.fromList , ((0x7,0x2F), KeyLeftBrace) , ((0x7,0x30), KeyRightBrace) , ((0x7,0x31), KeyBackslash) - -- , ((0x7,0x32), KeyNonUSPound) + , ((0x7,0x32), KeyBackslash) -- NonUsPound , ((0x7,0x33), KeySemicolon) , ((0x7,0x34), KeyApostrophe) , ((0x7,0x35), KeyGrave) @@ -184,7 +189,7 @@ kcMap = M.fromList , ((0x7,0x43), KeyF10) , ((0x7,0x44), KeyF11) , ((0x7,0x45), KeyF12) - , ((0x7,0x46), KeyPrint) + , ((0x7,0x46), KeyPrint) -- KeySysRq , ((0x7,0x47), KeyScrollLock) , ((0x7,0x48), KeyPause) , ((0x7,0x49), KeyInsert) @@ -215,7 +220,7 @@ kcMap = M.fromList , ((0x7,0x62), KeyKp0) , ((0x7,0x63), KeyKpDot) , ((0x7,0x64), Key102nd) - -- , ((0x7,0x65), KeyApplication) + , ((0x7,0x65), KeyCompose) , ((0x7,0x66), KeyPower) , ((0x7,0x67), KeyKpEqual) , ((0x7,0x68), KeyF13) @@ -230,10 +235,10 @@ kcMap = M.fromList , ((0x7,0x71), KeyF22) , ((0x7,0x72), KeyF23) , ((0x7,0x73), KeyF24) - -- , ((0x7,0x74), KeyExecute) + , ((0x7,0x74), KeyOpen) , ((0x7,0x75), KeyHelp) - , ((0x7,0x76), KeyMenu) - -- , ((0x7,0x77), KeySelect) + , ((0x7,0x76), KeyMenu) -- KeyProps + , ((0x7,0x77), KeyFront) , ((0x7,0x78), KeyStop) , ((0x7,0x79), KeyAgain) , ((0x7,0x7A), KeyUndo) @@ -249,27 +254,27 @@ kcMap = M.fromList -- , ((0x7,0x84), KeyLockingScrollLock) , ((0x7,0x85), KeyKpComma) -- , ((0x7,0x86), KeyKpEqualSignAS400) - -- , ((0x7,0x87), KeyInternational1) - -- , ((0x7,0x88), KeyInternational2) - -- , ((0x7,0x89), KeyInternational3) - -- , ((0x7,0x8A), KeyInternational4) - -- , ((0x7,0x8B), KeyInternational5) - -- , ((0x7,0x8C), KeyInternational6) + , ((0x7,0x87), KeyRo) + , ((0x7,0x88), KeyKatakanaHiragana) + , ((0x7,0x89), KeyYen) + , ((0x7,0x8A), KeyHenkan) + , ((0x7,0x8B), KeyMuhenkan) + , ((0x7,0x8C), KeyKpjpcomma) -- , ((0x7,0x8D), KeyInternational7) -- , ((0x7,0x8E), KeyInternational8) -- , ((0x7,0x8F), KeyInternational9) - -- , ((0x7,0x90), KeyLANG1) - -- , ((0x7,0x91), KeyLANG2) - -- , ((0x7,0x92), KeyLANG3) - -- , ((0x7,0x93), KeyLANG4) - -- , ((0x7,0x94), KeyLANG5) + , ((0x7,0x90), KeyHangeul) + , ((0x7,0x91), KeyHanja) + , ((0x7,0x92), KeyKatakana) + , ((0x7,0x93), KeyHiragana) + , ((0x7,0x94), KeyZenkakuHankaku) -- , ((0x7,0x95), KeyLANG6) -- , ((0x7,0x96), KeyLANG7) -- , ((0x7,0x97), KeyLANG8) -- , ((0x7,0x98), KeyLANG9) -- , ((0x7,0x99), KeyAlternateErase) -- , ((0x7,0x9A), KeySysReqOrAttention) - , ((0x7,0x9B), KeyCancel) + , ((0x7,0x9B), KeyCancel) -- Does not exists in Linux -- , ((0x7,0x9C), KeyClear) -- , ((0x7,0x9D), KeyPrior) -- , ((0x7,0x9E), KeyReturn) @@ -289,10 +294,312 @@ kcMap = M.fromList , ((0x7,0xE6), KeyRightAlt) , ((0x7,0xE7), KeyRightMeta) -- (0x7,0xE8) - (0x7,0xFFFF) Reserved + , ((0xC,0x34), KeySleep) + , ((0xC,0x40), KeyMenu) + , ((0xC,0x45), KeyRight) + , ((0xC,0x94), KeyExit) + , ((0xC,0x95), KeyHelp) + , ((0xC,0xB0), KeyPlay) + , ((0xC,0xB1), KeyPause) + , ((0xC,0xB2), KeyRecord) + , ((0xC,0xB3), KeyFastForward) + , ((0xC,0xB4), KeyRewind) , ((0xC,0xB5), KeyNextSong) , ((0xC,0xB6), KeyPreviousSong) + , ((0xC,0xB7), KeyStopCd) + , ((0xC,0xB8), KeyEjectCd) , ((0xC,0xCD), KeyPlayPause) - , ((0xC,0xCF), KeyDictation) + , ((0xC,0xCF), KeyDictation) -- No HID + -- , ((0xC,0xE0), Key???) -- MacOS: Volume (linear control) + -- , ((0xC,0xE1), Key???) -- MacOS: Balance (linear control) + , ((0xC,0xE2), KeyPlayPause) + -- , ((0xC,0xE3), Key???) -- MacOS: Bass (linear control) + -- , ((0xC,0xE4), Key???) -- MacOS: Treble (linear control) + , ((0xC,0xE5), KeyBassBoost) + , ((0xC,0xE9), KeyVolumeUp) -- VolumeIncrement + , ((0xC,0xEA), KeyVolumeDown) -- VolumentDecrement + -- , ((0xC,0x100), KeyFanEnable) + -- , ((0xC,0x101), KeyFanSpeed) -- (linear control) + -- , ((0xC,0x102), KeyLightEnable) + -- , ((0xC,0x103), KeyLightIlluminationLevel) -- (linear control) + -- , ((0xC,0x104), KeyClimateControlEnable) + -- , ((0xC,0x105), KeyRoomTemperature) -- (linear control) + -- , ((0xC,0x106), KeySecurityEnable) + -- , ((0xC,0x107), KeyFireAlarm) + -- , ((0xC,0x108), KeyPoliceAlarm) + -- , ((0xC,0x109), KeyProximity) -- (linear control) + -- , ((0xC,0x10A), KeyMotion) + -- , ((0xC,0x10B), KeyDuressAlarm) + -- , ((0xC,0x10C), KeyHoldupAlarm) + -- , ((0xC,0x10D), KeyMedicalAlarm) + -- 0x10E - 0x14F Reserved + -- , ((0xC,0x150), KeyBalanceRight) + -- , ((0xC,0x151), KeyBalanceLeft) + -- , ((0xC,0x152), KeyBassIncrement) + -- , ((0xC,0x153), KeyBassDecrement) + -- , ((0xC,0x154), KeyTrebleIncrement) + -- , ((0xC,0x155), KeyTrebleDecrement) + -- 0x156 - 0x15F Reserved + -- , ((0xC,0x160), KeySpeakerSystem) + -- , ((0xC,0x161), KeyChannelLeft) + -- , ((0xC,0x162), KeyChannelRight) + -- , ((0xC,0x163), KeyChannelCenter) + -- , ((0xC,0x164), KeyChannelFront) + -- , ((0xC,0x165), KeyChannelCenterFront) + -- , ((0xC,0x166), KeyChannelSide) + -- , ((0xC,0x167), KeyChannelSurround) + -- , ((0xC,0x168), KeyChannelLowFrequencyEnhancement) + -- , ((0xC,0x169), KeyChannelTop) + -- , ((0xC,0x16A), KeyChannelUnknown) + -- 0x16B - 0x16F Reserved + -- , ((0xC,0x170), KeySubChannel) -- (linear control) + -- , ((0xC,0x171), KeySubChannelIncrement) + -- , ((0xC,0x172), KeySubChannelDecrement) + -- , ((0xC,0x173), KeyAlternateAudioIncrement) + -- , ((0xC,0x174), KeyAlternateAudioDecrement) + -- 0x175 - 0x17F Reserved + -- , ((0xC,0x180), KeyApplicationLaunchButtons) + -- , ((0xC,0x181), KeyALLaunchButtonConfigurationTool) + , ((0xC,0x182), KeyBookmarks) -- KeyALProgrammableButtonConfiguration + , ((0xC,0x183), KeyConfig) -- KeyALConsumerControlConfiguration + , ((0xC,0x18A), KeyMail) + -- , ((0xC,0x18F), KeyALTaskOrProjectManager) + -- , ((0xC,0x190), KeyALLogOrJournalOrTimecard) + , ((0xC,0x191), KeyFinance) + , ((0xC,0x192), KeyCalc) + -- , ((0xC,0x193), KeyALAOrVCaptureOrPlayback) + , ((0xC,0x194), KeyFile) + -- , ((0xC,0x195), KeyALLANOrWANBrowser) + , ((0xC,0x196), KeyWww) + -- , ((0xC,0x197), KeyALRemoteNetworkingOrISPConnect) + -- , ((0xC,0x198), KeyALNetworkConference) + , ((0xC,0x199), KeyChat) + -- , ((0xC,0x19A), KeyALTelephonyOrDialer) + , ((0xC,0x19E), KeyCoffee) + -- , ((0xC,0x19F), KeyALControlPanel) + -- , ((0xC,0x1A0), KeyALCommandLineProcessorOrRun) + -- , ((0xC,0x1A1), KeyALProcessOrTaskManager) + -- , ((0xC,0x1A2), KeyAL) + -- , ((0xC,0x1A3), KeyALNextTaskOrApplication) + -- , ((0xC,0x1A4), KeyALPreviousTaskOrApplication) + -- , ((0xC,0x1A5), KeyALPreemptiveHaltTaskOrApplication) + , ((0xC,0x1A6), KeyHelp) -- KeyALIntegratedHelpCenter + , ((0xC,0x1A7), KeyDocuments) + -- , ((0xC,0x1A8), KeyALThesaurus) + -- , ((0xC,0x1A9), KeyALDictionary) + -- , ((0xC,0x1AA), KeyALDesktop) + -- , ((0xC,0x1AC), KeyALGrammerCheck) + -- , ((0xC,0x1AD), KeyALWirelessStatus) + -- , ((0xC,0x1AE), KeyALKeyboardLayout) + -- , ((0xC,0x1AF), KeyALVirusProtection) + -- , ((0xC,0x1B0), KeyALEncryption) + -- , ((0xC,0x1B1), KeyALScreenSaver) + -- , ((0xC,0x1B2), KeyALAlarms) + -- , ((0xC,0x1B3), KeyALClock) + -- , ((0xC,0x1B4), KeyALFileBrowser) + -- , ((0xC,0x1B5), KeyALPowerStatus) + , ((0xC,0x1B6), KeyMedia) + , ((0xC,0x1B7), KeySound) + -- , ((0xC,0x1B8), KeyALMovieBrowser) + -- , ((0xC,0x1B9), KeyALDigitalRightsManager) + -- , ((0xC,0x1BA), KeyALDigitalWallet) + -- 0x1BB Reserved + -- , ((0xC,0x1BE), KeyALOEMHelp) + -- , ((0xC,0x1BF), KeyALOnlineCommunity) + -- , ((0xC,0x1C0), KeyALEntertainmentContentBrowser) + -- , ((0xC,0x1C1), KeyALOnlineShoppingBrowswer) + -- , ((0xC,0x1C2), KeyALSmartCardInformationOrHelp) + -- , ((0xC,0x1C3), KeyALMarketMonitorOrFinanceBrowser) + -- , ((0xC,0x1C4), KeyALCustomizedCorporateNewsBrowser) + -- , ((0xC,0x1C5), KeyALOnlineActivityBrowswer) + -- , ((0xC,0x1C6), KeyALResearchOrSearchBrowswer) + -- , ((0xC,0x1C7), KeyALAudioPlayer) + -- , ((0xC,0x1C8), KeyALMessageStatus) + -- , ((0xC,0x1C9), KeyALContactSync) + -- , ((0xC,0x1CA), KeyALNavigation) + -- , ((0xC,0x1CB), KeyALContextawareDesktopAssistant) + -- 0x1CC - 0x1FF Reserved + -- , ((0xC,0x200), KeyGenericGUIApplicationControls) + , ((0xC,0x201), KeyNew) + , ((0xC,0x202), KeyOpen) + , ((0xC,0x203), KeyClose) + , ((0xC,0x204), KeyExit) + -- , ((0xC,0x205), KeyACMaximize) + -- , ((0xC,0x206), KeyACMinimize) + , ((0xC,0x207), KeySave) + , ((0xC,0x208), KeyPrint) + , ((0xC,0x209), KeyProps) + , ((0xC,0x21A), KeyUndo) + , ((0xC,0x21B), KeyCopy) + , ((0xC,0x21C), KeyCut) + , ((0xC,0x21D), KeyPaste) + -- , ((0xC,0x21E), KeyAC) -- AC Select All + , ((0xC,0x21F), KeyFind) + -- , ((0xC,0x220), KeyACFindandReplace) + , ((0xC,0x221), KeySearch) + , ((0xC,0x223), KeyHomepage) + , ((0xC,0x224), KeyBack) + , ((0xC,0x225), KeyForward) + , ((0xC,0x226), KeyStop) + , ((0xC,0x227), KeyRefresh) + -- , ((0xC,0x228), KeyACPreviousLink) + -- , ((0xC,0x229), KeyACNextLink) + , ((0xC,0x22A), KeyBookmarks) + -- , ((0xC,0x22B), KeyACHistory) + -- , ((0xC,0x22C), KeyACSubscriptions) + -- , ((0xC,0x230), KeyACFullScreenView) + -- , ((0xC,0x231), KeyACNormalView) + -- , ((0xC,0x232), KeyACViewToggle) + , ((0xC,0x233), KeyScrollUp) + , ((0xC,0x234), KeyScrollDown) + -- , ((0xC,0x235), KeyACScroll) + -- , ((0xC,0x236), KeyACPanLeft) + -- , ((0xC,0x237), KeyACPanRight) + -- , ((0xC,0x238), KeyACPan) + -- , ((0xC,0x239), KeyACNewWindow) + -- , ((0xC,0x23A), KeyACTileHorizontally) + -- , ((0xC,0x23B), KeyACTileVertically) + -- , ((0xC,0x23C), KeyACFormat) + -- , ((0xC,0x23D), KeyACEdit) + -- , ((0xC,0x23E), KeyACBold) + -- , ((0xC,0x23F), KeyACItalics) + -- , ((0xC,0x240), KeyACUnderline) + -- , ((0xC,0x241), KeyACStrikethrough) + -- , ((0xC,0x242), KeyACSubscript) + -- , ((0xC,0x243), KeyACSuperscript) + -- , ((0xC,0x244), KeyACAllCaps) + -- , ((0xC,0x245), KeyACRotate) + -- , ((0xC,0x246), KeyACResize) + -- , ((0xC,0x247), KeyACFlipHorizontal) + -- , ((0xC,0x248), KeyACFlipVertical) + -- , ((0xC,0x249), KeyACMirrorHorizontal) + -- , ((0xC,0x24A), KeyACMirrorVertical) + -- , ((0xC,0x24B), KeyACFontSelect) + -- , ((0xC,0x24C), KeyACFontColor) + -- , ((0xC,0x24D), KeyACFontSize) + -- , ((0xC,0x24E), KeyACJustifyLeft) + -- , ((0xC,0x24F), KeyACJustifyCenterH) + -- , ((0xC,0x250), KeyACJustifyRight) + -- , ((0xC,0x251), KeyACJustifyBlockH) + -- , ((0xC,0x252), KeyACJustifyTop) + -- , ((0xC,0x253), KeyACJustifyCenterV) + -- , ((0xC,0x254), KeyACJustifyBottom) + -- , ((0xC,0x255), KeyACJustifyBlockV) + -- , ((0xC,0x256), KeyACIndentyDecrease) + -- , ((0xC,0x257), KeyACIndentyIncrease) + -- , ((0xC,0x258), KeyACNumberedList) + -- , ((0xC,0x259), KeyACRestartNumbering) + -- , ((0xC,0x25A), KeyACBulletedList) + -- , ((0xC,0x25B), KeyACPromote) + -- , ((0xC,0x25C), KeyACDemote) + -- , ((0xC,0x25D), KeyACYes) + -- , ((0xC,0x25E), KeyACNo) + , ((0xC,0x25F), KeyCancel) -- AC Cancel + -- , ((0xC,0x260), KeyACCatalog) + -- , ((0xC,0x261), KeyACBuyOrCheckout) + -- , ((0xC,0x262), KeyACAddToCart) + -- , ((0xC,0x263), KeyACExpand) + -- , ((0xC,0x264), KeyACExpandAll) + -- , ((0xC,0x265), KeyACCollapse) + -- , ((0xC,0x266), KeyACCollapseAll) + -- , ((0xC,0x267), KeyACPrintPreview) + -- , ((0xC,0x268), KeyACPasteSpecial) + -- , ((0xC,0x269), KeyACInsertMode) + -- , ((0xC,0x26A), KeyACDelete) + -- , ((0xC,0x26B), KeyACLock) + -- , ((0xC,0x26C), KeyACUnlock) + -- , ((0xC,0x26D), KeyACProtect) + -- , ((0xC,0x26E), KeyACUnprotect) + -- , ((0xC,0x26F), KeyACAttachComment) + -- , ((0xC,0x270), KeyACDetachComment) + -- , ((0xC,0x271), KeyACViewComment) + -- , ((0xC,0x272), KeyACSelectWord) + -- , ((0xC,0x273), KeyACSelectSentence) + -- , ((0xC,0x274), KeyACSelectParagraph) + -- , ((0xC,0x275), KeyACSelectColumn) + -- , ((0xC,0x276), KeyACSelectRow) + -- , ((0xC,0x277), KeyACSelectTable) + -- , ((0xC,0x278), KeyACSelectObject) + , ((0xC,0x279), KeyRedo) + -- , ((0xC,0x27A), KeyACSort) + -- , ((0xC,0x27B), KeyACSortAscending) + -- , ((0xC,0x27C), KeyACSortDescending) + -- , ((0xC,0x27D), KeyACFilter) + -- , ((0xC,0x27E), KeyACSetClock) + -- , ((0xC,0x27F), KeyACViewClock) + -- , ((0xC,0x280), KeyACSelectTimeZone) + -- , ((0xC,0x281), KeyACEditTimeZones) + -- , ((0xC,0x282), KeyACSetAlarm) + -- , ((0xC,0x283), KeyACClearAlarm) + -- , ((0xC,0x284), KeyACSnoozeAlarm) + -- , ((0xC,0x285), KeyACResetAlarm) + -- , ((0xC,0x286), KeyACSynchronize) + -- , ((0xC,0x287), KeyACSendOrReceive) + -- , ((0xC,0x288), KeyACSendTo) + , ((0xC,0x289), KeyReply) + -- , ((0xC,0x28A), KeyACReplyAll) + , ((0xC,0x28B), KeyForwardMail) + , ((0xC,0x28C), KeySend) + -- , ((0xC,0x28D), KeyACAttachFile) + -- , ((0xC,0x28E), KeyACUpload) + -- , ((0xC,0x28F), KeyACDownload) + -- , ((0xC,0x290), KeyACSetBorders) + -- , ((0xC,0x291), KeyACInsertRow) + -- , ((0xC,0x292), KeyACInsertColumn) + -- , ((0xC,0x293), KeyACInsertFile) + -- , ((0xC,0x294), KeyACInsertPicture) + -- , ((0xC,0x295), KeyACInsertObject) + -- , ((0xC,0x296), KeyACInsertSymbol) + -- , ((0xC,0x297), KeyACSaveAndClose) + -- , ((0xC,0x298), KeyACRename) + -- , ((0xC,0x299), KeyACMerge) + -- , ((0xC,0x29A), KeyACSplit) + -- , ((0xC,0x29B), KeyACDistributeH) + -- , ((0xC,0x29C), KeyACDistributeV) + -- , ((0xC,0x29D), KeyACKeyboardLayoutSelect) + -- , ((0xC,0x29E), KeyACNavigationGuidance) + -- , ((0xC,0x29F), KeyACDesktopShowAllWindows) + -- , ((0xC,0x2A0), KeyACSoftKeyLeft) + -- , ((0xC,0x2A1), KeyACSoftKeyRight) + -- , ((0xC,0x2A2), KeyACDesktopShowAllApplications) + -- 0x02A3 - 0x02AF Reserved + -- , ((0xC,0x2B0), KeyACIdleKeepAlive) + -- 0x02B1 - 0x02BF Reserved + -- , ((0xC,0x2C0), KeyExtendedKeyboardAttributesCollection) + -- , ((0xC,0x2C1), KeyKeyboardFormFactor) + -- , ((0xC,0x2C2), KeyKeyboardKeyType) + -- , ((0xC,0x2C3), KeyKeyboardPhysicalLayout) + -- , ((0xC,0x2C4), KeyVendorSpecificKeyboardPhysicalLayout) + -- , ((0xC,0x2C5), KeyKeyboardIETFLanguageTagIndex) + -- , ((0xC,0x2C6), KeyImplementedKeyboardInputAssistControls) + -- , ((0xC,0x2C7), KeyKeyboardInputAssistPrevious) + -- , ((0xC,0x2C8), KeyKeyboardInputAssistNext) + -- , ((0xC,0x2C9), KeyKeyboardInputAssistPreviousGroup) + -- , ((0xC,0x2CA), KeyKeyboardInputAssistNextGroup) + -- , ((0xC,0x2CB), KeyKeyboardInputAssistAccept) + -- , ((0xC,0x2CC), KeyKeyboardInputAssistCancel) + -- 0x02CD - 0x04FF Reserved + -- , ((0xC,0x500), KeyContactEdited) + -- , ((0xC,0x501), KeyContactAdded) + -- , ((0xC,0x502), KeyContactRecordActive) + -- , ((0xC,0x503), KeyContactIndex) + -- , ((0xC,0x504), KeyContactNickname) + -- , ((0xC,0x505), KeyContactFirstName) + -- , ((0xC,0x506), KeyContactLastName) + -- , ((0xC,0x507), KeyContactFullName) + -- , ((0xC,0x508), KeyContactPhoneNumberPersonal) + -- , ((0xC,0x509), KeyContactPhoneNumberBusiness) + -- , ((0xC,0x50A), KeyContactPhoneNumberMobile) + -- , ((0xC,0x50B), KeyContactPhoneNumberPager) + -- , ((0xC,0x50C), KeyContactPhoneNumberFax) + -- , ((0xC,0x50D), KeyContactPhoneNumberOther) + -- , ((0xC,0x50E), KeyContactEmailPersonal) + -- , ((0xC,0x50F), KeyContactEmailBusiness) + -- , ((0xC,0x510), KeyContactEmailOther) + -- , ((0xC,0x511), KeyContactEmailMain) + -- , ((0xC,0x512), KeyContactSpeedDialNumber) + -- , ((0xC,0x513), KeyContactStatusFlag) + -- , ((0xC,0x514), KeyContactMisc) , ((0xFF,0x3), KeyFn) , ((0xFF,0x4), KeyBrightnessUp) , ((0xFF,0x5), KeyBrightnessDown) diff --git a/src/KMonad/Keyboard/Keycode.hs b/src/KMonad/Keyboard/Keycode.hs index bccbb9ce..13d06666 100644 --- a/src/KMonad/Keyboard/Keycode.hs +++ b/src/KMonad/Keyboard/Keycode.hs @@ -408,6 +408,7 @@ aliases = Q.mkMultiMap , (KeyPlayPause, ["pp"]) , (KeyPreviousSong, ["prev"]) , (KeyMicmute, ["micm"]) + , (KeyCoffee, ["lock"]) -- Darwin , (KeyLaunchpad, ["lp"]) , (KeyMissionCtrl, ["mctl"]) @@ -418,4 +419,39 @@ aliases = Q.mkMultiMap , (KeyMuhenkan, ["muh"]) , (KeyHenkan, ["hen"]) , (KeyKatakanaHiragana, ["kah"]) + -- HID Usage Names + , (KeyBackslash, ["nonuspound"]) + , (KeyCompose, ["app", "application"]) + , (KeyOpen, ["exec", "execute"]) + , (KeyFront, ["sel", "select"]) + , (KeyRo, ["i1", "int1", "international1"]) + , (KeyKatakanaHiragana, ["i2", "int2", "international2"]) + , (KeyYen, ["i3", "int3", "international3"]) + , (KeyHenkan, ["i4", "int4", "international4"]) + , (KeyMuhenkan, ["i5", "int5", "international5"]) + , (KeyKpjpcomma, ["i6", "int6", "international6"]) + , (KeyHangeul, ["l1", "lang1"]) + , (KeyHanja, ["l2", "lang2"]) + , (KeyKatakana, ["l3", "lang3"]) + , (KeyHiragana, ["l4", "lang4"]) + , (KeyZenkakuHankaku, ["l5", "lang5"]) + , (KeyExit, ["quit"]) + , (KeyNextSong, ["nexttrack"]) + , (KeyPreviousSong, ["previoustrack"]) + -- , (KeyStopCd, ["stop"]) -- conflict with KeyStop + , (KeyEjectCd, ["eject"]) + , (KeyVolumeUp, ["volumeincrement"]) + , (KeyVolumeDown, ["volumedecrement"]) + , (KeyMail, ["emailreader"]) + , (KeyFinance, ["checkbook"]) + , (KeyCalc, ["calculator"]) + , (KeyFile, ["localmachinebrowser"]) + , (KeyWww, ["internetbrowser"]) + , (KeyCoffee, ["termlock", "screensaver"]) + , (KeyHelp, ["helpcenter"]) + , (KeyMedia, ["imagebrowser"]) + , (KeySound, ["audiobrowser"]) + , (KeyProps, ["properties"]) + -- , (KeyHomepage, ["home"]) -- conflict with KeyHome + , (KeyForwardMail, ["forwardmessage"]) ]