уторак, 12. август 2003. 19:22:23 CEST — Beni Cherniavsky написа:

- This could be approximated at a low level by not remapping keys
with modifies and I'm gonna do precisely this when I learn XKB).

I've tried to do something along this lines (see srpski.org/dunav, it's a Serbian keymap which usually uses cyrillic, but I added six levels and put english maps on fifth and sixth level, and it all works generally — eg. in xterm even if I type cyrillic, it receives the Ctrl
+J instead of whatever cyrillic letter is there).


Unfortunately, it fails miserably for most of the apps.

Gtk+ has a major bug due to it's separate handling of modifiers (actually, it handles them quite nicely when there're no hacks like this, but it doesn't work as expected with this keymap).

Also, most of the programs that process keymaps do it without paying attention to XKB. Emacs is the most annoying one (because I use it the most ;-), as it detects Ctrl separately, and then waits for the next symbol. This shuts down the entire mechanism, because when next key is pressed, XKB has lost knowledge of Control being pressed, so you still get the character from the lower level (instead of the fifth- or sixth-
level depending on the Shift status).



This XKB hackery is quite simple: check the file in types/ subdirectory, which makes Control a modifier for the fifth and sixth levels. This is later used just like any other key type in XKB.



So, while I hoped this would solve most of the problems, it appeared that this solved just a tiny bit of problems (like KDE works fine with that, but, alas, I don't use it).



Perhaps this can guide someone else in making it better?


Cheers,
Danilo
--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/



Reply via email to