[Spice-devel] [spice-gtk v2] widget: Do not ignore unsupported keys from keyboard
Christophe Fergeau
cfergeau at redhat.com
Wed Jun 8 15:57:14 UTC 2016
On Mon, Jun 06, 2016 at 10:51:11AM -0400, Frediano Ziglio wrote:
> >
> > If Windows layout does not support a given key the resulting virtual code
> > is set to 0xFF. To avoid losing this raw key (causing the key not been
> > sent to remote machine) detect this condition and handle the key.
> > The check for raw scancode is there to understand if we can handle
> > correctly the key in following code.
> > This problem can happen for instance using a 106 key Japanese keyboard
> > while the layout is set in English; in this case keys like CONVERT not
> > forwarded correctly.
> >
> > Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> > ---
> > src/spice-widget.c | 38 ++++++++++++++++++++------------------
> > 1 file changed, 20 insertions(+), 18 deletions(-)
> >
> > Changes from v1:
> > - avoid to rewrite scancodes;
> > - tested again (code were not used as my mingw64-gtk3 was updated
> > and gdk_event_get_scancode was not supported).
> >
>
> Some note on how to reproduce and test this problem.
>
> Physical way:
> 1- get a 106 key Japanese keyboard for your Windows client machine;
> 2- setup your client to English keyboard layout;
> 3- connect to a Linux machine (no matter the distro or version or
> keyboard configuration);
> 4- open "xinput test-xi2 <device>" command on Linux (device is
> the AT device in this case);
> 5- press CONVERT or other keys not present on an English keyboard.
>
> Virtual way (Windows machine on a VM):
> - set machine remote to VNC;
> - assure Qmeu has lock-key-sync=off option to vnc;
> - connect to Windows machine with a VNC client (I suggest TigerVNC
> as remote-viewer do some keyboard insertion);
> - do steps 2, 3, 4 above
> - press the CONVERT key. If you don't have you can simulate, either
> - change VNC client code to insert scancode 0x70 instead of another
> key and press this key;
> - disconnect main VNC client and use some tool to inject keys
> (I use a modifier version of vncdotool);
> - yes, above steps are not described completely... if somebody is
> interested I can post some more information.
I think I'd just add these notes to the commit log if someone needs to
understand what this patch was fixing in a few years from now.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160608/f3d8e53c/attachment.sig>
More information about the Spice-devel
mailing list