Merge pull request #122 from go-vgo/dev

fix mac input method keytap not work
This commit is contained in:
vz 2018-03-11 15:23:40 +08:00 committed by GitHub
commit 2423ad940d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,9 +132,8 @@ MMKeyCode keyCodeForChar(const char c)
#if defined(IS_MACOSX) #if defined(IS_MACOSX)
CFStringRef createStringForKey(CGKeyCode keyCode) CFStringRef createStringForKey(CGKeyCode keyCode){
{ TISInputSourceRef currentKeyboard = TISCopyCurrentASCIICapableKeyboardInputSource();
TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource();
CFDataRef layoutData = CFDataRef layoutData =
(CFDataRef)TISGetInputSourceProperty(currentKeyboard, (CFDataRef)TISGetInputSourceProperty(currentKeyboard,
kTISPropertyUnicodeKeyLayoutData); kTISPropertyUnicodeKeyLayoutData);