diff options
author | Pierre Ossman <ossman@cendio.se> | 2013-05-23 11:42:41 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2013-05-23 11:42:41 +0000 |
commit | 6eb3607f55706c79bce43224d439a5066f008226 (patch) | |
tree | 46a6a00ecab1f35fe2f4a263e332bf2eecf9773a /unix | |
parent | 6f67fa9a07b0d853eb23321308f3b99fc6d8aec7 (diff) | |
download | tigervnc-6eb3607f55706c79bce43224d439a5066f008226.tar.gz tigervnc-6eb3607f55706c79bce43224d439a5066f008226.zip |
XkbTranslateKeyCode() is not implemented according to
specification in any system I can find, so change our code
to follow reality rather than specification.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5106 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix')
-rw-r--r-- | unix/xserver/hw/vnc/InputXKB.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/unix/xserver/hw/vnc/InputXKB.cc b/unix/xserver/hw/vnc/InputXKB.cc index f3211bf7..04e377c7 100644 --- a/unix/xserver/hw/vnc/InputXKB.cc +++ b/unix/xserver/hw/vnc/InputXKB.cc @@ -414,7 +414,14 @@ KeyCode InputDevice::keysymToKeycode(KeySym keysym, unsigned state, if (ks == NoSymbol) continue; - if (state_out & state & LockMask) + /* + * Despite every known piece of documentation on + * XkbTranslateKeyCode() stating that mods_rtrn returns + * the unconsumed modifiers, in reality it always + * returns the _potentially consumed_ modifiers. + */ + state_out = state & ~state_out; + if (state_out & LockMask) XkbConvertCase(ks, &dummy, &ks); if (ks == keysym) |