[Xorg] Mapping CTRL+<KEY> between layouts

rlinuz rlinuz at homeil.com
Tue Aug 17 05:32:13 PDT 2004


Hi,

I'm trying to polish the default keyboard layout file for il (Hebrew). 

The default layout that comes with xorg maps CTRL+<KEY> to CTRL+<HEBREW
KEY>, and thus effectively disables all the 'shortcuts' keys. For
example, when the keyboard layout is set to il, pressing <CTRL>+<a>
('select-all') actually produces <CTRL>+<hebrew_shin> which is the
corresponding Hebrew letter for 'a'. 

In xkb/types/pc I've added the following lines:

    type "CTRL" {
        modifiers = Control;
        map[Control] = Level2;
        level_name[Level1] = "Base";
        level_name[Level2] = "Ctrl";
    };

In xkb/symbols/pc/il I've added the following for each key:
    
    key <AC01> { [ hebrew_shin, A ] }; // the default
    key <AC01> { type="CTRL", symbols[Group1]=[hebrew_shin, a ] };

After that, the il layout produced 'a' in response to <CTRL>+<a> and
this seems to work fine for OpenOffice and Mozilla. However, it does not
work in a console window. 

Although this works for some applications, I'm pretty sure that mapping
<CTRL>+<hebrew_shin> to <a> is not good enough. What I really want to do
is to map <CTRL>+<hebrew_shin> to <CTRL>+<a>. I've tried the following
but it didn't work (notice the ^a):

    key <AC01> { type="CTRL", symbols[Group1]=[hebrew_shin, ^a ] };

I guess I have to use the keycode of <CTRL>+<a> - any idea what's that
keycode? I've tried 0x0001 and 0x0061 they seem to work in OpenOffice
and Mozilla but again, not in the console window.

Thanks,
-S.






More information about the xorg mailing list