fix mac input method keytap not work

This commit is contained in:
vcaesar 2018-03-11 15:22:38 +08:00
parent 19204ae7f9
commit e0a5aabf28

View File

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