Re: [spice-gtk v2] widget: Do not ignore unsupported keys from keyboard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> > ---
> >  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

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]