Browse Source

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
tags/v1.2.90
Pierre Ossman 11 years ago
parent
commit
02ef70b211
2 changed files with 16 additions and 16 deletions
  1. 16
    0
      unix/xserver/hw/vnc/Input.cc
  2. 0
    16
      unix/xserver/hw/vnc/InputCore.cc

+ 16
- 0
unix/xserver/hw/vnc/Input.cc View File

@@ -510,6 +510,22 @@ void InputDevice::keyEvent(rdr::U32 keysym, bool down)
new_state = state;
}

/*
* "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.

+ 0
- 16
unix/xserver/hw/vnc/InputCore.cc View File

@@ -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;
}
}

Loading…
Cancel
Save