GNOME Bugzilla – Bug 89979
inconsistent behavior for switching keyboard layouts
Last modified: 2004-12-22 21:47:04 UTC
gkb applet uses two different commands for changing the keyboard layout, xmodmap and setxkbmap, in a nonsystematic way. (some layouts use xmodmap some use setxkbmap ). setkbmap command changes only the modified key sequences. it means that if somebody switches his keyboard layout to "Arabic" for example, after pressing the <a> key he still inputs english "a", while pressing Alt <a> inputs arabic "a". xmodmap on the other hand modifies the keystrokes themselves, so that pressing <a> key would input the arabic "a". apparently the setxkbmap method is confusing and completely counterintuitive and most of the foreign RH users or americans who use more than one language think that gkb applet is just broken ( which is almost true ). In my opinion the usage of xmodmap method should be completely removed since it is obsolete. All the xkb symbols files should be rewritten in such a way that after swithing the keyboard no additional modifiers are necessary. PS part of the problem is coming from the fact the XFree86 default xkb symbol files are written in this counterintuitive way. it does not mean that gnome has to follow Xfree86 conventions, though.
Yes, it's true. But I don't have 516 keyboard layouts like XFree86, just 74. Keyprop (keyboard property) files and translations for this 516 files would make incredible long compilation time for gnome-applets and many silly translatable strings (keyboard layout names). The 516 keyboard layouts is about 1.5 Mb data. Generating the xmodmap files from xkb files is not so easy, because some xkb keymaps just modify Group2 or Group3 and the Mode_switch key (for example arabic), every other groups are from basic (for example us keyboard layout). So I will have to parse and convert this files by hand, because there is no good algorithm for converting this kind of config files.
why don't you convert all your and XFree86's layout files to xkb format in such a way that they don't require any modifiers to switch between keyboards ?
Because of two reasons: 1. Loading an xkb file is not so simple. There is no way to load a self made symbol file without compiling (IMHO, please correct me if there is) 2. Not the conversion is hard to xmodmap, parsing tricky symbol files. That's the hard thing. After parsing this silly format you can make any format easily. But the conversion needs human intelligence. Just look at file /etc/X11/xkb/symbols/ar. From where will you know Group1 layout? I bet from nowhere. You will have to say "ah it's from previous keyboard layout". But program will say: hmmm is there a definition for this key? No. So key is not exists in this config. So please help me if you know the answer, because I see no good solution. I don't want to give up xmodmap, because for example on Solaris there is no xkb. But xkb files contain so many information what users need.
Created attachment 13680 [details] a sample keycode file for armenian ( am ) keyboard
I installed the latest RH Beta ( Phoebe ) and one does not have to use <Alt> button anymore when using setxkbmap when switching layout. I think this is great, and the bug is ready to be closed. I attached a sample symbols configuration file for armenian layout. Can anybody explain to me how did they do it ?