From a82e3a2bd6d2ada91880584bd415dfd18bfc3ede Mon Sep 17 00:00:00 2001 From: Joe Wreschnig Date: Tue, 12 Mar 2013 15:37:57 +0100 Subject: [PATCH 1/1] More key codes. Explain (sort of) raw key codes in the manual. --- Classes/NJKeyInputField.m | 14 +++++++++++++- Enjoyable.xcodeproj/project.pbxproj | 2 +- Info.plist | 2 +- Resources/English.lproj/Localizable.strings | Bin 6904 -> 7060 bytes .../Resources/English.lproj/pgs/keyboard.html | 17 +++++++++++++---- 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/Classes/NJKeyInputField.m b/Classes/NJKeyInputField.m index 02896a8..791911b 100644 --- a/Classes/NJKeyInputField.m +++ b/Classes/NJKeyInputField.m @@ -12,6 +12,9 @@ enum { kVK_RightCommand = kVK_Command - 1, + kVK_Insert = 0x72, + kVK_Power = 0x7f, + kVK_ApplicationMenu = 0x6e, kVK_MAX = 0xFFFF, }; @@ -191,8 +194,17 @@ const CGKeyCode NJKeyInputFieldEmpty = kVK_MAX; return NSLocalizedString(@"Key Pad ,", @"numeric pad key"); case kVK_JIS_Eisu: return @"英数"; case kVK_JIS_Kana: return @"かな"; + + case kVK_Power: return @"⌽"; + case kVK_VolumeUp: return @"🔊"; + case kVK_VolumeDown: return @"🔉"; + + case kVK_Insert: + return NSLocalizedString(@"Insert", "keyboard key"); + case kVK_ApplicationMenu: + return NSLocalizedString(@"Menu", "keyboard key"); - + case kVK_MAX: // NJKeyInputFieldEmpty return @""; default: diff --git a/Enjoyable.xcodeproj/project.pbxproj b/Enjoyable.xcodeproj/project.pbxproj index ef109f0..f1bf0ff 100644 --- a/Enjoyable.xcodeproj/project.pbxproj +++ b/Enjoyable.xcodeproj/project.pbxproj @@ -249,13 +249,13 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( - EE1F3CE816EF4182008C6426 /* Localizable.strings */, EE3D897D16EA817E00596D1F /* Status Menu Icon Disabled.png */, EE3D897E16EA817E00596D1F /* Status Menu Icon.png */, EE3D897B16EA806E00596D1F /* Status Menu Icon Disabled@2x.png */, EE3D897916EA7EFC00596D1F /* Status Menu Icon@2x.png */, EE6A122D16E8F46300EDBD32 /* Icon.icns */, EEF17D2116E8E24400D7DC4D /* Help */, + EE1F3CE816EF4182008C6426 /* Localizable.strings */, EEF17D1B16E8E23A00D7DC4D /* InfoPlist.strings */, EEF17D1D16E8E23A00D7DC4D /* MainMenu.xib */, EEF17D1716E8E21A00D7DC4D /* com.yukkurigames.Enjoyable.mapping.icns */, diff --git a/Info.plist b/Info.plist index c72bc22..c4a9347 100644 --- a/Info.plist +++ b/Info.plist @@ -46,7 +46,7 @@ CFBundleSignature ???? CFBundleVersion - 185 + 187 LSApplicationCategoryType public.app-category.utilities NSHumanReadableCopyright diff --git a/Resources/English.lproj/Localizable.strings b/Resources/English.lproj/Localizable.strings index 91f6bf7891c9bc9ec5f3a6f4583ff453c7a321fb..63e6dc4430ca8fad9105a6a0aef9f3a16e0d5668 100644 GIT binary patch delta 89 zcmexiI>mg01K(r^aV14hhCGI1hE#?kh7txP1_cINAXZ{P65VXbr^_wr3sjQFP>Q4k TDl*wn+;DP&6wl@?$v#E^a3T`t delta 25 hcmbPY{=;;G1K(s1RClearing the Selection

- To clear a mapped key either select the Do nothing - option or press ⌥⌫ when the key input field is selected. + To clear a mapped key select the Do nothing + option or press ⌘⌫ when the key input field is selected.

Cancelling the Selection

- If you select the key input field by mistake you can press ⌥⎋ - to cancel the selection without changing the current setting. + If you select the key input field by mistake you can press ⌘⎋ or + click on the field to cancel the selection without changing the + current setting. +

+ +

Raw Key Codes

+

+ Hold ⌘ and click on the field to enter a raw key code. Key codes + are hexadecimal numbers associated with each key on a + keyboard. For example, if you need to map something to the Windows Menu + key and your keyboard doesn't have one, enter 0x6E here.

-- 2.20.1