After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 89979 - inconsistent behavior for switching keyboard layouts
inconsistent behavior for switching keyboard layouts
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: keyboard indicator (gswitchit)
2.0.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-08-06 03:41 UTC by petrosyan
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
a sample keycode file for armenian ( am ) keyboard (7.53 KB, text/plain)
2003-01-19 20:19 UTC, petrosyan
Details

Description petrosyan 2002-08-06 03:41:26 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.
Comment 1 Szabolcs Ban 2002-08-07 07:27:04 UTC
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.
Comment 2 petrosyan 2002-08-07 07:34:21 UTC
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 ?
Comment 3 Szabolcs Ban 2002-08-07 07:54:48 UTC
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.
Comment 4 petrosyan 2003-01-19 20:19:20 UTC
Created attachment 13680 [details]
a sample keycode file for armenian ( am ) keyboard
Comment 5 petrosyan 2003-01-19 20:23:05 UTC
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 ?