[Spice-devel] Handle JP keyboard with spice-gtk from Windows client
Christophe Fergeau
cfergeau at redhat.com
Thu Mar 31 13:27:31 UTC 2016
On Thu, Mar 31, 2016 at 08:36:34PM +0900, Takao Fujiwara wrote:
> I noticed Linux GNOME desktop hangs up when Windows virt-viewer connects to the desktop and type some specific keys on JP keyboard.
>
> Server: GNOME desktop and IBus in RHEL 7
> Client virt-viewer in Windows 7 with JP 106 keyboard
>
> When I see the key events with 'xev' command in GNOME desktop, I observed the unlimited too many key events of Zenkaku_Hankaku key and it caused the
> desktop freeze.
> The attached three patches resolves the desktop issues.
>
> 1. spice-gtk-1311820-01-zkhk.patch
> Zenkaku_Hankaku key has the different virtual-key codes between WM_KEYDOWN and WM_KEYUP and MapVirtualKey() cannot get the scancode from virtual-key
> code of WM_KEYDOWN (VK_OEM_ENLW) and spice-gtk didn't send the key press events and caused the desktop freeze with unlimited key release events.
>
> The fix is to get the scancode from virtual-key code of WM_KEYUP (VK_OEM_AUTO) and Zenkaku_Hankaku key works fine.
>
> Alt + Zenkaku_Hankaku key also has the different virtual-key code and MapVirtualKey() cannot get the
> scancode from the virtual-key and spice-gtk didn't send the key press events and Alt+Zenkaku_Hankaku could not be used.
>
> The fix is to get the scancode from virtual-key code of Zenkaku_Hankaku key (VK_OEM_AUTO).
>
> VK_CAPITAL, VK_OEM_BACKTAB are also applied the similar fixes.
>
> 2. spice-gtk-1311820-02-freeze.patch
> After spice-gtk-1311820-01-zkhk.patch is applied, WM_KEYDOWN of Alt+Zenkaku_Hankaku (VK_KANJI) can be sent with spice-gtk but Alt+Zenkaku_Hankaku did
> not send the WM_KEYUP event in Windows and it caused Linux desktop freeze with unlimited key press events.
>
> The fix is to send the key release event in spice-gtk.
>
> VK_OEM_ATTN, VK_OEM_COPY, VK_OEM_BACKTAB are applied the similar fixes.
>
> 3. spice-gtk-1311820-03-hangul.patch
> This is an additional fix. Korean keyboard assigns Hangul key on the position of Right Alt and Left Alt and Hangul keys have the different scancodes
> but MapVirtualKey() returned the same scancode and could not use Hangul key on Linux desktop.
>
> The fix is to send the right scancode of VK_HANGUL.
I think these detailed descriptions of what's going on/how things are
fixed should go in the commit log of each of the patches rather than
only in the cover letter.
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/20160331/46734bc9/attachment.sig>
More information about the Spice-devel
mailing list