Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Handling dead key characters

  • Loading branch information...
commit a59dddfa669ab0e2872f79a6443c45e2a2d87253 1 parent b3966e7
@jweinberg jweinberg authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 OpenEmu/OEHIDEvent.m
View
9 OpenEmu/OEHIDEvent.m
@@ -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];
}
Please sign in to comment.
Something went wrong with that request. Please try again.