While developing a bit more advanced (and correct) keyboard for Serbian, I came across several problems.

I use the multi-layout features of XFree86 4.3.0.


The task:
Standard alphabet for Serbian is cyrillic, but latin transcription is used as (if not more) widely as cyrillic script. So, I created two different symbol maps in one file pc/sr (actually, a few more, but that is not relevant) named "cyrillic" and "latin". Using the new features, one should be allowed to load the maps with


setxkbmap -layout "sr,sr,en_US" -variant "cyrillic,latin," -option "grp:shift_toggle"

It all works fine, but the problem arises with the usage of CTRL+<key> combinations. If I put en_US as the first group, then they use keys from group1 no matter what group is active. But, in any other case, they use the key mappings from the "current group".

To try to be more clear:
If groups are "sr(cyrillic),sr(latin),en_US" pressing CTRL+<S> would generate CTRL+С (cyrillic S) if cyrillic group is active, and CTRL+S otherwise.
If groups are "en_US,sr(cyrillic),sr(latin)" pressing CTRL+<S> would generate CTRL+S no matter what group is active.


I don't understand the reasoning behind this, so I would love to be enlightened :) To me, it seems to be a bug, since I couldn't find any special actions being defined for use in en_US. And to also mention that it's the same if I replace en_US with some other latin mapping (eg. Czech).

Because this is not the desired behaviour for me (I want CTRL+S to be generated even in cyrillic, without forcing user to put en_US in the first group), Časlav Ilić and I have made a SIX_LEVEL keyboard that puts the basic english alphabet at levels five and six.

If I put the Control as a level five modifier in a definition of SIX_LEVEL* types, Control gets discarded and I can just use it as level-five shift. If I use preserve[...]=Control, I experience problems in GTK+ 2.x apps (Galeon, gedit) where just pressing any character gets interpreted as if Ctrl is already pressed (eg. pressing A in cyrillic map acts as if CTRL+A is pressed). So, I had to define a Mod4 as modifier for the 5th level.

The "sixlevel" file which defines SIX_LEVEL types is located at http://www.kvota.net/srpski/1.5/sixlevel (it goes in /etc/X11/xkb/types and is included in file "complete"). The symbols file is at http://www.kvota.net/srpski/1.5/sr (or you can download both in http://www.kvota.net/srpski/sr-1.5.tar.gz — 4kb file).

Still, I experience some weird behaviour from time to time, and I'd like to hear any advice on setting this kind of layout without insisting on group order.
Also, I'd care to hear how to output/repeat a modifier if I use it for switching levels (eg. if I put "Control" to be used for level5 shift, then I also want the "Control" modifier to stay active; preserve causes all the weird problems mentioned above).


As a guide, I used both "Unreliable guide to XKB" by Doug Palmer (if I remember correctly, otherwise please excuse me), and "XKB Guide" by Ivan Pascal. Also, I've read bits of XKBlib and XKBprotocol documents, and of course the README.XKB* supplied with XFree86 4.3.0.


Best regards, Danilo Šegan


PS. I also noticed that "pc/us" map doesn't define symbols for <BKSL>, so it cannot be used with any mapping which redefines it (mine being a prime example). I'd call this also a bug!



_______________________________________________ I18n mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/i18n

Reply via email to