Re: [Spice-devel] [virt-tools-list] [PATCH] Disable IME to allow receiving all keys

2016-04-25 Thread Takao Fujiwara
y the patches of spice-gtk for the customer. Probably I think it would be better not to apply the patch of ImmDisableIME(-1) in virt-viewer at the moment. Thanks, Fujiwara On 04/22/16 12:57, Takao Fujiwara-san wrote: On 04/21/16 19:45, Frediano Ziglio-san wrote: On 04/21/16 01:17, Frediano Zigli

Re: [Spice-devel] [virt-tools-list] [PATCH] Disable IME to allow receiving all keys

2016-04-21 Thread Takao Fujiwara
On 04/21/16 19:45, Frediano Ziglio-san wrote: On 04/21/16 01:17, Frediano Ziglio-san wrote: On Wed, Apr 20, 2016 at 05:37:52PM +0900, Takao Fujiwara wrote: My understanding is, Virt-Viewer with ImmDisableIME(-1) can send key events even if the title bar is focused when IME is enabled. I

Re: [Spice-devel] [virt-tools-list] [PATCH] Disable IME to allow receiving all keys

2016-04-20 Thread Takao Fujiwara
On 04/21/16 01:17, Frediano Ziglio-san wrote: On Wed, Apr 20, 2016 at 05:37:52PM +0900, Takao Fujiwara wrote: My understanding is, Virt-Viewer with ImmDisableIME(-1) can send key events even if the title bar is focused when IME is enabled. I attached the screenshot of the problem when

Re: [Spice-devel] [virt-tools-list] [PATCH] Disable IME to allow receiving all keys

2016-04-20 Thread Takao Fujiwara
On 04/20/16 23:45, Christophe Fergeau-san wrote: On Wed, Apr 20, 2016 at 05:37:52PM +0900, Takao Fujiwara wrote: My understanding is, Virt-Viewer with ImmDisableIME(-1) can send key events even if the title bar is focused when IME is enabled. I attached the screenshot of the problem when

Re: [Spice-devel] [PATCH] Disable IME to allow receiving all keys

2016-04-20 Thread Takao Fujiwara
On 04/20/16 23:29, Frediano Ziglio-san wrote: My understanding is, Virt-Viewer with ImmDisableIME(-1) can send key events even if the title bar is focused when IME is enabled. I attached the screenshot of the problem when ImmDisableIME(-1) is not applied. https://bugzilla.redhat.com/show_bug.cgi

Re: [Spice-devel] [PATCH] Disable IME to allow receiving all keys

2016-04-20 Thread Takao Fujiwara
My understanding is, Virt-Viewer with ImmDisableIME(-1) can send key events even if the title bar is focused when IME is enabled. I attached the screenshot of the problem when ImmDisableIME(-1) is not applied. https://bugzilla.redhat.com/show_bug.cgi?id=1311858#c42 But spice-gtk can receives all

Re: [Spice-devel] [spice-gtk v4 0/3] Windows Japanese layout workarounds

2016-04-18 Thread Takao Fujiwara
MAPVK_VK_TO_VSC) misses some scancodes but MapVirtualKey(vsc, MAPVK_VSC_TO_VK) returns expected values. Fujiwara On Fri, 2016-04-15 at 12:11 +0100, Frediano Ziglio wrote: This version contains style change: - remove goto/label; - remove useless default switch. Takao Fujiwara (3): Send Zenkaku_Ha

Re: [Spice-devel] [spice-gtk v4 1/3] Send Zenkaku_Hankaku key in JP keyboard

2016-04-18 Thread Takao Fujiwara
I verified v4. On 04/15/16 20:11, Frediano Ziglio-san wrote: > From: Takao Fujiwara > > 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_DBE_DBCSCHAR

Re: [Spice-devel] [spice-gtk v3 1/3] Send Zenkaku_Hankaku key in JP keyboard

2016-04-15 Thread Takao Fujiwara
I confirmed v3 works fine. On 04/14/16 19:52, Frediano Ziglio-san wrote: > From: Takao Fujiwara > > 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_DB

Re: [Spice-devel] [spice-gtk 1/3] Send Zenkaku_Hankaku key in JP keyboard

2016-04-15 Thread Takao Fujiwara
It seems my debug log of libgdk-win32-2.0-0.dll caused a conflicted IO and SEGV. After I deleted my debug log, I no longer encounter SEGV so now ImmDisableIME.patch is not necessary. Thanks, Fujiwara On 04/12/16 20:08, Takao Fujiwara-san wrote: I mean ImmDisableIME.patch should be used as a

[Spice-devel] [spice-gtk v3 3/3] Send Hangul key in KR keyboard

2016-04-15 Thread Takao Fujiwara
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. ---  src/spice-widget.c | 10 +

[Spice-devel] [spice-gtk v3 2/3] Send key release event for some keys in JP keyboard

2016-04-15 Thread Takao Fujiwara
With the previous fix, WM_KEYDOWN of Alt+Zenkaku_Hankaku (VK_KANJI) can be sent with spice-gtk but Alt+Zenkaku_Hankaku does not send the WM_KEYUP event in Windows and it caused Linux desktop freeze with unlimited key press events. The proposed fix is to send the key release event in spice-gtk. VK

Re: [Spice-devel] [spice-gtk 1/3] Send Zenkaku_Hankaku key in JP keyboard

2016-04-12 Thread Takao Fujiwara
On 04/12/16 00:52, Frediano Ziglio-san wrote: 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_DBE_DBCSCHAR) and spice-gtk didn't send the key press events and caused the de

Re: [Spice-devel] [spice-gtk 1/3] Send Zenkaku_Hankaku key in JP keyboard

2016-04-12 Thread Takao Fujiwara
Ctrl+Shift or Alt+Shift. Is not clear what you are suggesting with this. Should ImmDisableIME.patch be used or not? Why it SEGV? How do you capture WM_INPUTLANGCHANGE message? Frediano On 04/06/16 15:42, Takao Fujiwara-san wrote: Zenkaku_Hankaku key has the different virtual-key codes be

[Spice-devel] [spice-gtk 3/3] Send Hangul key in KR keyboard

2016-04-12 Thread Takao Fujiwara
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. ---  src/spice-widget.c | 10 +

[Spice-devel] [spice-gtk 2/3] Send key release event for some keys in JP keyboard

2016-04-12 Thread Takao Fujiwara
With the previous fix, WM_KEYDOWN of Alt+Zenkaku_Hankaku (VK_KANJI) can be sent with spice-gtk but Alt+Zenkaku_Hankaku does not send the WM_KEYUP event in Windows and it caused Linux desktop freeze with unlimited key press events. The proposed fix is to send the key release event in spice-gtk. VK

[Spice-devel] [spice-gtk 1/3] Send Zenkaku_Hankaku key in JP keyboard

2016-04-12 Thread Takao Fujiwara
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_DBE_DBCSCHAR) and spice-gtk didn't send the key press events and caused the desktop freeze with unlimited key release events.

Re: [Spice-devel] [spice-gtk 1/3] Send Zenkaku_Hankaku key in JP keyboard

2016-04-07 Thread Takao Fujiwara
Please note the internal ImmDisableIME.patch needs to be disabled to get the WM_INPUTLANGCHANGE signal with mouse but no ImmDisableIME.patch causes a SEGV with Ctrl+Shift or Alt+Shift. On 04/06/16 15:42, Takao Fujiwara-san wrote: Zenkaku_Hankaku key has the different virtual-key codes between

[Spice-devel] [spice-gtk 3/3] Send Hangul key in KR keyboard

2016-04-05 Thread Takao Fujiwara
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. ---  src/spice-widget.c | 10 +

[Spice-devel] [spice-gtk 2/3] Send key release event for some keys in JP keyboard

2016-04-05 Thread Takao Fujiwara
With the previous fix, WM_KEYDOWN of Alt+Zenkaku_Hankaku (VK_KANJI) can be sent with spice-gtk but Alt+Zenkaku_Hankaku does not send the WM_KEYUP event in Windows and it caused Linux desktop freeze with unlimited key press events. The proposed fix is to send the key release event in spice-gtk. VK

[Spice-devel] [spice-gtk 1/3] Send Zenkaku_Hankaku key in JP keyboard

2016-04-05 Thread Takao Fujiwara
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_DBE_DBCSCHAR) and spice-gtk didn't send the key press events and caused the desktop freeze with unlimited key release events.

Re: [Spice-devel] [spice-gtk 1/3] Send Zenkaku_Hankaku key in JP keyboard

2016-04-05 Thread Takao Fujiwara
Seems Evolution sets line breaks in the email body. Let me send the patches again. On 04/06/16 13:30, Takao Fujiwara-san wrote: 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

[Spice-devel] [spice-gtk 3/3] Send Hangul key in KR keyboard

2016-04-05 Thread Takao Fujiwara
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. ---  src/spice-widget.c | 10 +

[Spice-devel] [spice-gtk 2/3] Send key release event for some keys in JP keyboard

2016-04-05 Thread Takao Fujiwara
With the previous fix, WM_KEYDOWN of Alt+Zenkaku_Hankaku (VK_KANJI) can be sent with spice-gtk but Alt+Zenkaku_Hankaku does not send the WM_KEYUP event in Windows and it caused Linux desktop freeze with unlimited key press events. The proposed fix is to send the key release event in spice-gtk. VK

[Spice-devel] [spice-gtk 1/3] Send Zenkaku_Hankaku key in JP keyboard

2016-04-05 Thread Takao Fujiwara
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_DBE_DBCSCHAR) and spice-gtk didn't send the key press events and caused the desktop freeze with unlimited key release events.

Re: [Spice-devel] [spice-gtk 3/3] Send key release event for some keys in JP keyboard.

2016-04-05 Thread Takao Fujiwara
On 03/31/16 22:36, Frediano Ziglio-san wrote: --- a/src/spice-widget.c +++ b/src/spice-widget.c @@ -1493,6 +1493,15 @@ static gboolean key_event(GtkWidget *widget, GdkEventKey *key) } } break; +case 0x412: /* KR keyboard */ +if

Re: [Spice-devel] Handle JP keyboard with spice-gtk from Windows client

2016-04-05 Thread Takao Fujiwara
On 03/31/16 22:27, Christophe Fergeau-san wrote: 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

Re: [Spice-devel] [spice-gtk 2/3] Send key release event for some keys in JP keyboard.

2016-04-05 Thread Takao Fujiwara
On 03/31/16 22:19, Frediano Ziglio-san wrote: +switch (key->hardware_keycode) { +case VK_KANJI: /* Alt + Zenkaku_Hankaku */ +case VK_OEM_ATTN: /* Eisu_toggle */ +case VK_OEM_COPY: /* Hiragana_Katakana */ +case VK

Re: [Spice-devel] [spice-gtk 1/3] Send Zenkaku_Hankaku key in JP keyboard.

2016-04-05 Thread Takao Fujiwara
Thank you for those reviews. I sent the updated patches now. On 03/31/16 22:12, Frediano Ziglio-san wrote: You should handle WM_INPUTLANGCHANGE so use can change layout while using remote-viewer. Another option is not cache the value but just call GetKeyboardLayout(0) every time. I succeeded t

Re: [Spice-devel] [PATCH] Send key release event for some keys in JP keyboard.

2016-03-31 Thread Takao Fujiwara
Sorry, the subject and description is not correct. I will send this patch again with the correct subject. On 03/31/16 19:43, Takao Fujiwara-san wrote: > Some of the keys in JP keyboard do no send WM_KEYUP and it causes > unlimited key events on Linux desktop. This sends the virtual > ke

[Spice-devel] Handle JP keyboard with spice-gtk from Windows client

2016-03-31 Thread Takao Fujiwara
anks, Fujiwara >From d3e750a254e3ba5fc6332616a49ff9da42f77d46 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 31 Mar 2016 19:38:07 +0900 Subject: [PATCH] Send Zenkaku_Hankaku key in JP keyboard. MapVirtualKey() returns the scancode of the released Zenkaku_Hankaku key but does not pressed one and modifiered one. Any