On Jul 1, 2013, at 3:29 PM, Юрий Воротилов wrote:

> Fix to support input of characters with diacritic symbols using AltGr (e.g. 
> Latvian - AltGr+a=ā).
> Tested on Ubuntu 12.04 and Centos 6.
> I also have a bug opened in Crossover tracker:
> http://www.codeweavers.com/support/tickets/browse/?ticket_id=935141
> 
> ---
>  dlls/winex11.drv/keyboard.c |   45 
> +++++++++++++++++++++++++------------------
>  include/winuser.h           |    1 +
>  server/queue.c              |    5 ++++-
>  3 files changed, 31 insertions(+), 20 deletions(-)
> <0001-Support-input-of-characters-with-diacritic-symbols-usi.txt>

I don't believe this is the correct approach.  You don't want to be modifying 
the server and you can't arbitrarily add a new KEYEVENTF_* value.  You can't 
assume that applications won't leave junk in the non-standard bits of the flags 
when they call SendInput() or keybd_event().

This needs to be implemented entirely within the X11 driver.  It needs to 
properly translate your X11 keyboard layout into Win32 behavior.  If the 
problem is that AltGr is mapping to VK_MENU, and thus causing key events to 
generate WM_SYSKEYDOWN/UP and not go through translation, then you need to make 
AltGr not map to VK_MENU.  Although you really need to test that on Windows.  
My understanding is that AltGr appears to Windows apps as Alt+Control.

In any case, I know that, on Mac OS X, the Option key is used similarly to 
AltGr.  It accesses additional characters from the keyboard layout.  This works 
when Option is configured in the X keymap to generate XK_Mode_switch.  It 
requires no changes to Wine.  So perhaps the right approach is to make 
XK_ISO_Level3_Shift and XK_ISO_Group_Shift behave the same way as 
XK_Mode_switch.  (You could also just change your X keymap to actually map the 
key to XK_Mode_switch.)

-Ken



Reply via email to