Summary: | XKeycodeToKeysym should be listed as deprecated in the man page (and probably _X_DEPRECATED) | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | paurea <paurea> | ||||||
Component: | Lib/Xlib | Assignee: | Xorg Project Team <xorg-team> | ||||||
Status: | RESOLVED MOVED | QA Contact: | Xorg Project Team <xorg-team> | ||||||
Severity: | normal | ||||||||
Priority: | high | CC: | cerebro.alexiel, halsmit, jeremyhu | ||||||
Version: | 6.8.2 | ||||||||
Hardware: | x86 (IA32) | ||||||||
OS: | Linux (All) | ||||||||
Whiteboard: | 2011BRB_Reviewed | ||||||||
i915 platform: | i915 features: | ||||||||
Attachments: |
|
Description
paurea
2005-12-16 06:54:37 UTC
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future. I can confirm this bug with the following testcases. It leads to a bug in winehq (see http://forum.winehq.org/viewtopic.php?t=7533) Created attachment 32974 [details]
Fisrt testcase using XKeycodeToKeysym function
Running this one gives you the following output :
0 22
1 33
2 22
3 33
4 FE55
5 0
6 FE55
7 0
8 33
Created attachment 32975 [details]
Second testcase using XGetKeyboardMapping function
Here is the output of the second testcase :
0 22
1 33
2 22
3 33
4 23
5 FE55
6 23
7 FE55
8 22
Please note the '23' which is the value we were looking for using XKeycodeToKeysym.
And that's causing the bug in winehq.
You have to use XkbKeycodeToKeysym instead of XKeycodeToKeysym. bug 25732, comment 4 Sorry for the brevity. A cold still sometimes demands its share of my day, and you want the answer now, right? So it's not a bug, just a deprecated function, isn't it ? In this case, please update the man page or someone could have the same issue. A little note to use the Xkb version has been added to the man page, but maybe more deprecation would be useful. However, the man page has been updated. Reopen if you think the note should be bigger. commit f2651e03f3295a453a2965c3749bc8b6e66f1c09 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Oct 10 14:09:17 2011 -0700 Mark XKeycodeToKeysym as _X_DEPRECATED Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (In reply to Alex from comment #6) > So it's not a bug, just a deprecated function, isn't it ? > In this case, please update the man page or someone could have the same > issue. NO NO NO It is a BUG that was in Xkb since beginning and NO ONE even tried to look at it (or fix it). Instead, someone started to spread nonsense like "it works wrong because it is deprecated". Normally, Xkb's version of XKeycodeToKeysym planned to be a wrapper for XkbKeycodeToKeysym that returns all needed keysyms but in old-compatible order. Due to a stupid bug, it always losses keysym that should be at index #4. look at src/xkb/XKBBind.c, function XKeycodeToKeysym() two occurences of this > return XkbKeycodeToKeysym(dpy, kc, XkbGroup1Index, > col - lastSym + 2); should be > return XkbKeycodeToKeysym(dpy, kc, XkbGroup1Index, > col - lastSym + 1); and two occurences of this > return XkbKeycodeToKeysym(dpy, kc, XkbGroup1Index, > col - lastSym); should be > return XkbKeycodeToKeysym(dpy, kc, XkbGroup1Index, > col - lastSym - 1); -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libx11/issues/97. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.