summaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2019-04-04 10:31:59 +0200
committerPierre Ossman <ossman@cendio.se>2019-04-04 10:31:59 +0200
commit005db3528df041d1bbd69a07fa41ef7ea4404c19 (patch)
tree5e98c84d9e297d639b4044a5b4b4b86b11d5a0bc /vncviewer
parentfd3bfa6d9d1166b3fdb585c794abb4634d70409c (diff)
downloadtigervnc-005db3528df041d1bbd69a07fa41ef7ea4404c19.tar.gz
tigervnc-005db3528df041d1bbd69a07fa41ef7ea4404c19.zip
Always get raw keyboard layout on macOS
Some input sources are still using input methods even though they claim to be "ASCII" input. This causes our input handling to fail since we need to query the layout to handle dead keys. Fortunately there is another API to get the raw, underlying input source that the input method uses. So let's use that and be sure that we're always getting something we can use.
Diffstat (limited to 'vncviewer')
-rw-r--r--vncviewer/cocoa.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/vncviewer/cocoa.mm b/vncviewer/cocoa.mm
index e26851d6..a22937f8 100644
--- a/vncviewer/cocoa.mm
+++ b/vncviewer/cocoa.mm
@@ -232,7 +232,7 @@ static NSString *key_translate(UInt16 keyCode, UInt32 modifierFlags)
TISInputSourceRef keyboard;
CFDataRef uchr;
- keyboard = TISCopyCurrentKeyboardInputSource();
+ keyboard = TISCopyCurrentKeyboardLayoutInputSource();
uchr = (CFDataRef)TISGetInputSourceProperty(keyboard,
kTISPropertyUnicodeKeyLayoutData);
if (uchr == NULL)