diff options
author | Pierre Ossman <ossman@cendio.se> | 2013-04-16 09:03:18 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2013-04-16 09:03:18 +0000 |
commit | 02ef70b211e49aadfab3b8f645a7a6bd29695155 (patch) | |
tree | b8b60012f3acb7e4afebaede21b0283636e61535 /unix | |
parent | 5a4d5d4e88af08f9acefcf1d9618174e6268dbee (diff) | |
download | tigervnc-02ef70b211e49aadfab3b8f645a7a6bd29695155.tar.gz tigervnc-02ef70b211e49aadfab3b8f645a7a6bd29695155.zip |
Shifted Tab is a generic VNC problem and not specific to just
Core keyboard. Move handling of it to the central code.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5082 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix')
-rw-r--r-- | unix/xserver/hw/vnc/Input.cc | 16 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/InputCore.cc | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/unix/xserver/hw/vnc/Input.cc b/unix/xserver/hw/vnc/Input.cc index 6fc007be..f1f8e112 100644 --- a/unix/xserver/hw/vnc/Input.cc +++ b/unix/xserver/hw/vnc/Input.cc @@ -511,6 +511,22 @@ void InputDevice::keyEvent(rdr::U32 keysym, bool down) } /* + * "Shifted Tab" is a bit of a mess. Some systems have varying, + * special keysyms for this symbol. VNC mandates that clients + * should always send the plain XK_Tab keysym and the server + * should deduce the meaning based on current Shift state. + * To comply with this, we will find the keycode that sends + * XK_Tab, and make sure that Shift isn't cleared. This can + * possibly result in a different keysym than XK_Tab, but that + * is the desired behaviour. + * + * Note: We never get ISO_Left_Tab here because it's already + * been translated in VNCSConnectionST. + */ + if (keysym == XK_Tab && (state & ShiftMask)) + new_state |= ShiftMask; + + /* * We need a bigger state change than just shift, * so we need to know what the mask is for level 3 shifts. */ diff --git a/unix/xserver/hw/vnc/InputCore.cc b/unix/xserver/hw/vnc/InputCore.cc index 0fc4fe1e..de7653ef 100644 --- a/unix/xserver/hw/vnc/InputCore.cc +++ b/unix/xserver/hw/vnc/InputCore.cc @@ -441,22 +441,6 @@ KeyCode InputDevice::keysymToKeycode(KeySym keysym, unsigned state, unsigned *ne if (j & 0x2) *new_state |= mask; - /* - * Sort out the "shifted Tab" mess. If - * we are sent a shifted Tab, generate - * a local shifted Tab regardless of - * what the "shifted Tab" keysym is on - * the local keyboard (it might be Tab, - * ISO_Left_Tab or HP's private BackTab - * keysym, and quite possibly some - * others too). We never get - * ISO_Left_Tab here because it's - * already been translated in - * VNCSConnectionST. - */ - if (keysym == XK_Tab && (state & ShiftMask)) - *new_state |= ShiftMask; - return i; } } |