Skip to content

Commit

Permalink
Handling dead key characters
Browse files Browse the repository at this point in the history
  • Loading branch information
jweinberg committed Nov 25, 2011
1 parent b3966e7 commit a59dddf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions OpenEmu/OEHIDEvent.m
Expand Up @@ -84,6 +84,15 @@ + (NSString *)stringForHIDKeyCode:(NSUInteger)hidCode
maxStringLength,
&actualStringLength, unicodeString);

if (actualStringLength == 0 && deadKeyState)
{
status = UCKeyTranslate(keyboardLayout,
kVK_Space, kUCKeyActionDown, 0,
LMGetKbdType(), 0,
&deadKeyState,
maxStringLength,
&actualStringLength, unicodeString);
}
if(actualStringLength > 0 && status == noErr)
return [[NSString stringWithCharacters:unicodeString length:(NSInteger)actualStringLength] uppercaseString];
}
Expand Down

0 comments on commit a59dddf

Please sign in to comment.