wine gets wrong charcodes (shifted by 1 key) on some locales

Bug #533461 reported by Jurgis Pralgauskis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Wine
Confirmed
Low
Baltix
New
Undecided
Unassigned

Bug Description

upstream bug report (not payed much attention to :/) http://bugs.winehq.org/show_bug.cgi?id=18289

wine gets some wrong charcodes on some keyboard mappings
for example if You set Lithuanian keyboard mapping

$ setxkbmap lt
$ LANG=lt_LT.UTF8 notepad

and press "9" (not on numeric keyboard, but on laptop)
you get "8" :/

also "Ctrl+A" gives "Ctrl+S" (but this seems to be even not dependent on keyboard mapping)

Ubuntu version: Karmic
Wine version: 1.1.3+

Tags: wine
Revision history for this message
In , Vitaliy-bugzilla (vitaliy-bugzilla) wrote :

Wine version?

Revision history for this message
In , Jurgis Pralgauskis (jurgis-pralgauskis) wrote :

problem was noticed ~2 years ago
now I have installed wine-1.1.20 (deb for Ubuntu 9.04)
and it persists ...

ps.: most annoying is that, people can't normaly use let's say Word or NotePad++, if they need to type parentheses.

Revision history for this message
In , Austin English (austinenglish) wrote :

This is your friendly reminder that there has been no bug activity for 6 months. Is this still an issue in current (1.1.33 or newer) wine?

Revision history for this message
Jurgis Pralgauskis (jurgis-pralgauskis) wrote :

upstream bug report (not payed much attention to :/) http://bugs.winehq.org/show_bug.cgi?id=18289

wine gets some wrong charcodes on some keyboard mappings
for example if You set Lithuanian keyboard mapping

$ setxkbmap lt
$ LANG=lt_LT.UTF8 notepad

and press "9" (not on numeric keyboard, but on laptop)
you get "8" :/

also "Ctrl+A" gives "Ctrl+S" (but this seems to be even not dependent on keyboard mapping)

Ubuntu version: Karmic
Wine version: 1.1.3+

Revision history for this message
In , Mantas Kriaučiūnas (mantas) wrote :

*** This bug has been confirmed by popular vote. ***

Revision history for this message
In , Mantas Kriaučiūnas (mantas) wrote :

I can confirm this bug in all wine versions, including 1.2 and 1.3.8 (tested with Ubuntu Linux 10.04.1)

It's very easy to reproduce (you must have lt_LT.UTF-8 locale definition files installed in your system, run 'locale -a |grep lt'):

1. Set keyboard mapping to Lithuanian and start Wine notepad in lt_LT locale:
ubuntu@ubuntu:~$ setxkbmap lt
ubuntu@ubuntu:~$ LANG=lt_LT.UTF8 notepad

2. Hold AltGr (right Alt) key and press 9 key (from main keyboard, bellow F7-F9, not from numeric keyboard) and you will see number 8 in notepad instead of 9

3. Hold Shift key and press 8, then 9, then 0 keys (from main keyboard, bellow F7-F9) and you will see ŪŪ) instead of Ū()

This is very important problem for Lithuanians, as we can't write number 9 and left round bracket when Lithuanian keymap is active during startup of WINE, because key 9 from main keyboard works like key 8 :(

Btw, I just found strange workaround for this bug - if US or RU keymap is active during startup of software, which uses WINE (like notepad), and I change keymap to Lithuanian only when WINE is already running, then key 9 works correctly:

1. Set keyboard mapping to US and LT, then start Wine notepad in lt_LT locale:
ubuntu@ubuntu:~$ setxkbmap us,lt
ubuntu@ubuntu:~$ LANG=lt_LT.UTF8 notepad

2. Change keyboard mapping from US to LT with GNOME keyboard indicator (it appears in gnome panel's notification area when you run setxkbmap us,lt)

3. Now key 9 works correctly - Hold AltGr (right Alt) key and press 9 key (from main keyboard) and you will see number 9 ; Hold Shift key and press 8, then 9, then 0 keys (from main keyboard) and you will see Ū()

Changed in wine:
importance: Unknown → Low
status: Unknown → Confirmed
Revision history for this message
In , Hoehle (hoehle) wrote :

Created an attachment (id=33281)
tiny bugfix: Lithuanian keyboard detection

Dear Lithuanians,

please report whether this patch improves the Lithuanian keyboard detection.
I'd especially appreciate feedback from Mac users (because the German Mac keyboard is very different from the PC one, so I suspect there may be differences in other countries as well).

Here is was I get (on a German keyboard) using
setxkbmap lt
WINEDEBUG=+key,+keyboard wine notepad
trace:keyboard:X11DRV_KEYBOARD_DetectLayout Attempting to match against "Lithuanian (Baltic) keyboard layout"
trace:key:X11DRV_KEYBOARD_DetectLayout mismatch for keycode 10, got ±”1!
trace:key:X11DRV_KEYBOARD_DetectLayout mismatch for keycode 12, got źŹ3#
[...] # note that key 2 between 1 and 3 matched (8 as well, not shown)
trace:keyboard:X11DRV_KEYBOARD_DetectLayout matches=39, mismatches=12, seq=37, score=31

Sorry, this patch will not fix the reported bug. BTW, I can confirm the work-around from comment #5 about switching after Wine started. I have no Lithuanian locale on my system, however
setxkbmap de
wine notepad
setxkbmap lt
manages to make 890 appear with Alt-Gr instead of 880.

Revision history for this message
In , Butraxz (butraxz) wrote :

This ticket has not been updated for over 900 days. Development recommends
to check the status on your bug every release or two and let to be known if the bug is still present. If not, mark it fixed.

Is this still an issue with 1.7.0 or higher ?

Revision history for this message
In , Mantas Kriaučiūnas (mantas) wrote :

It seems this issue is fixed in WINE 1.6 (tested on Ubuntu 12.04.3 with latest X.org and Linux kernel 3.8) - key 9 from main keyboard behaves correctly in Wine even if Lithuanian (lt) keyboard layout is active in X Window system.
I will do additional tests with older (and newer) Xorg next month and mark this bug as fixed if Lithuanian keyboard will work correctly.

Btw, I've found similar bugreport about Swedish keyboard layout, it seems that bug is also fixed in 1.5.x series, see
https://launchpad.net/ubuntu/+source/wine1.4/+bug/990547 (Swedish letters åäö don't work in Wine)

(In reply to comment #7)
> This ticket has not been updated for over 900 days. Development recommends
> to check the status on your bug every release or two and let to be known if the
> bug is still present. If not, mark it fixed.
> Is this still an issue with 1.7.0 or higher ?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.