Bug 30548 - Key-code mappings in layouts doesn't work
Summary: Key-code mappings in layouts doesn't work
Status: RESOLVED NOTOURBUG
Alias: None
Product: xkeyboard-config
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium critical
Assignee: xkb
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-01 14:04 UTC by Hedayat Vatankhah
Modified: 2010-10-10 19:20 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Remove some extra semicolons (889 bytes, patch)
2010-10-01 14:19 UTC, Hedayat Vatankhah
Details | Splinter Review
Replace some key codes with corresponding names (but not all of them) (3.48 KB, patch)
2010-10-01 14:21 UTC, Hedayat Vatankhah
Details | Splinter Review

Description Hedayat Vatankhah 2010-10-01 14:04:21 UTC
The complete report is available here:
https://bugzilla.redhat.com/show_bug.cgi?id=638244

But for completeness: with the latest xorg packages in Fedora 14, many layouts are broken. It seems that any key defined with a key code (rather than symbol name) has stopped working. As mentioned in the above report, many keys didn't work in "ir" layout without modification. But after replacing many key codes with their corresponding symbol name(e.g. replacing Farsi_yeh key code with "Farsi_yeh"), those keys started working again. Currently, many layouts have such key codes including the "ir" layout.
Comment 1 Sergey V. Udaltsov 2010-10-01 14:09:58 UTC
I do not know what exactly was broken in xorg code (in fedora only? it is ok in ubuntu). But I alway preferred keysym names. So I would be happy to fix the bug. Would you attach the patch(es) here?
Comment 2 Hedayat Vatankhah 2010-10-01 14:19:08 UTC
Created attachment 39107 [details] [review]
Remove some extra semicolons
Comment 3 Hedayat Vatankhah 2010-10-01 14:20:06 UTC
Notice that these bugs does not exist in released Fedora versions, but in Fedora 14 beta which uses newer versions of xorg related packages. So, I think there is something wrong in newer versions. Specially, the first patch is a clear error in "ir" layout file and prevents it from loading at all. The layout file has been modified recently.

Also, the main bug affects other layouts too, such as "af".
Comment 4 Hedayat Vatankhah 2010-10-01 14:21:35 UTC
Created attachment 39108 [details] [review]
Replace some key codes with corresponding names (but not all of them)

I'm not sure if all key codes have a corresponding name. (?!)
Comment 5 Sergey V. Udaltsov 2010-10-01 14:24:03 UTC
Review of attachment 39107 [details] [review]:

This one is already fixed in git
Comment 6 Sergey V. Udaltsov 2010-10-01 14:30:47 UTC
Thanks, committed!
Comment 7 Hedayat Vatankhah 2010-10-01 14:35:11 UTC
Thanks :)
But I should assert that, if it has not been solved already, the problem will cause some keys in some layouts to not work in newer versions of xorg (xorg-x11-server-Xorg-1.9.0). So, either all key codes in all layouts should be replaced, or the problem should be fixed.
Comment 8 Sergey V. Udaltsov 2010-10-01 14:36:39 UTC
I see your point. The thing is that not entire Unicode is covered by X keysym names.
Comment 9 Hedayat Vatankhah 2010-10-01 14:40:56 UTC
I guessed so (since I didn't find keysym names for some codes), and this is why I think the old behavior should be kept. Maybe I should report a bug against another package?
Comment 10 Sergey V. Udaltsov 2010-10-01 14:42:17 UTC
You can raise the issue at xorg-devel maillist. But IIRC the idea was that we do not have to add full Unicode - the unicode hex codes should work...
Comment 11 Hedayat Vatankhah 2010-10-01 14:49:42 UTC
Yes, but the problem is that unicode hex codes doesn't work in xorg-xserver 1.9.0!
Comment 12 Sergey V. Udaltsov 2010-10-01 14:50:45 UTC
File a bug against xorg Input/XKB
Comment 13 Hedayat Vatankhah 2010-10-01 15:03:54 UTC
Thanks, submitted: https://bugs.freedesktop.org/show_bug.cgi?id=30549
Comment 14 James Cloos 2010-10-01 15:13:51 UTC
You should use git bisect to determine which commit to libX11 causes the
bug.  A couple of possibilities might be 2e7a18b6a617 or bea0873caf50.
Comment 15 Hedayat Vatankhah 2010-10-01 15:27:20 UTC
But I don't have an xorg development stack at hand, and at least for now I cannot afford that in terms of required bandwidth and time...
Comment 16 Peter Hutterer 2010-10-02 13:30:49 UTC
(In reply to comment #15)
> But I don't have an xorg development stack at hand, and at least for now I
> cannot afford that in terms of required bandwidth and time...

you only need the dependencies for libX11-devel and then clone the libX11 git tree from git://anongit.freedesktop.org/git/xorg/lib/libX11. I've been on vacation for 2 weeks and will spend the next two and a half days on planes. If you help bisecting, we can fix this issue as soon as I'm back.
Comment 17 Hedayat Vatankhah 2010-10-02 15:12:17 UTC
OK. I'll try. but both mentioned commits are done after libX11 1.3.4 release (which is used in Fedora 14 and is problematic). So, maybe these commits fix the problem! I'll test and report the results.
Comment 18 Hedayat Vatankhah 2010-10-02 16:48:19 UTC
Well, I tried going back to earlier versions... but even by replacing libX11 1.3.1 files (used in Fedora 13 and work fine) the problem still exists. So, either the problem is not in libX11 or it is triggered by change(s) in another component. (or maybe there is something wrong in my tests!)
Comment 19 Hedayat Vatankhah 2010-10-05 23:29:28 UTC
As mentioned in the comments #11 and #12 at https://bugzilla.redhat.com/show_bug.cgi?id=638244, it seems that all hex codes in the form of 0x100XXXX should be replaced with the form UXXXX in all keyboard layouts. UXXXX form hex code still work in the latest X server.
Comment 20 Alan Coopersmith 2010-10-06 00:13:32 UTC
That's just a workaround for a bug - the X server should not be breaking
compatibility with the existing xkb keytables.
Comment 21 Peter Hutterer 2010-10-10 19:20:45 UTC
xkbcomp commit below fixes this issue.


commit a281386fa887e6bf4110840779aed46dd0ac89b6
Author: Daniel Stone <daniel@fooishbar.org>
Date:   Fri Jul 9 19:34:29 2010 +0100

    Fix parsing of 0x1a2b3c4d-style symbols
    
    Raw keysyms were not getting parsed correctly, due to forgetting to add
    the code to libX11, forgetting to add the backwards-compat code for old
    libX11s, and then stuffing the lexing up anyway.  Yeesh.
    
    Signed-off-by: Daniel Stone <daniel@fooishbar.org>


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.