Skip to content

Commit d6ea37a

Browse files
author
ddauer
committed
Fixed issue #2
git-svn-id: http://shortcutrecorder.googlecode.com/svn/trunk@3 95fa3068-9819-0410-9c96-7759cbfcbc6e
1 parent 0267eba commit d6ea37a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Source/SRKeyCodeTransformer.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ + (void) initialize;
7171
SRChar(KeyboardReturnGlyph), SRInt(76),
7272
SRChar(KeyboardTabRightGlyph), SRInt(48),
7373
SRChar(KeyboardHelpGlyph), SRInt(114),
74-
// SRChar(KeyboardUpArrowheadGlyph), SRInt(10), can't map this because this key is keyboard layout dependent, damn
7574
nil];
7675

7776
// We want to identify if the key was pressed on the numpad
@@ -152,6 +151,9 @@ - (id) transformedValue:(id)value
152151
if ( err != noErr ) return nil;
153152

154153
UInt32 charCode = KeyTranslate( kchrHandle, keyCode, &keysDown );
154+
155+
if (keysDown != 0) charCode = KeyTranslate( kchrHandle, keyCode, &keysDown );
156+
155157
char theChar = ( charCode & 0x00FF );
156158

157159
NSString *keyString = [[[[NSString alloc] initWithData:[NSData dataWithBytes:&theChar length:1] encoding:NSMacOSRomanStringEncoding] autorelease] uppercaseString];

0 commit comments

Comments
 (0)