Re: shortcuts using non-english keymap



Hi Guntupalli,

Today at 13:34, Guntupalli Karunakar wrote:

>   for Indic translations more keyb accels like "_File" , we translate
> to "HindiFile (_F)"
> so when say Hindi keymap is selected (at this point any alphabetic key
> press results in a devanagari unicode character), so a person cant use
> the short cuts. he needs to change the keymap back to english to use
> the shortcut, this can be annoying if need to be done frequently.
>  So can we use 'shortcut translations', ie say I give whatever Hindi
> character is mapped on 'key F' ?
> or anyone knows of an xkb option which will temporarily revert keymap
> to english when 'ctrl' or 'alt' key is used for accessing shortcuts.

Gtk+ handles this in a way with the default input method.

When you press a key, it cycles through all the groups in a current
XKB map until a match is found.

So, basically, I load several groups (one English, one Serbian
Cyrillic, one Serbian Latin).  This makes my "A" key mapped as
follows:

 A -> [ a, A], [Cyrillic_a, Cyrillic_A], [a, A]

So, when I press Alt+A, Gtk+ looks through all of these.  Since we
use underscore on Cyrillic letters, and I've got menu item "_Ајде", if
I'm currently using English keymap group, Gtk+ would try following
shortcuts:

 Alt+A, Alt+Cyrillic_A, Alt+A

until a match is found (which happens at Cyrillic_A in this example).

All of this is easily accomplished by using multi-layout features of
XKB in XFree86 4.3 or later (use en_US for combining).  For instance,
if you're using "sr" map by default, you'd do something like:

   setxkbmap -option "grp:shift_toggle" -layout "sr,en_US"


There's one way to do this directly from XKB, but this conflicts with
Gtk+, and causes some problems.  To see how it works, check the
keymap at http://srpski.org/dunav/, and try pressing Ctrl+C in xterm
while using xterm, or something else (not Gtk+ programs, you'll notice
very strange behaviour with it).

There's a bug report about Gtk+ and this behaviour (search Bugzilla
for summary with "Ctrl+Backspace" or something similar in it).

Cheers,
Danilo



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]