[xkb] Map alt+key to arrow

Dirk Wallenstein halsmit at t-online.de
Fri May 7 01:37:17 PDT 2010


On Thu, May 06, 2010 at 10:54:36PM +0200, Damien R wrote:
>    Hi,
>    I want to map alt+key to arrow keys.
>    For eg, I want to press Alt+d and it will do "Left".
>    I tried :
>    key <AD08> { type[Group1] = "PC_ALT_LEVEL2", [ d, Left] };
>    but it does not work.
>    How can I do that or can you give me links to doc ?
>    Thanks,
>    --
>    Damien R.

If you run 'xev' with that keymap installed, do you have 
        "(keysym 0xff51, Left)" 
in the output when you press alt+key?

And if you try it in a terminal you get the same strange output as if
you press directly Alt+Left?

The Alt modifier is heavily used on the client side (menus and such) and
clients seem to often track it themselves, so they don't recognize that
the alt modifier has been 'consumed' in the lookup. It's hard for
clients because alt is a vmod.

I would avoid advanced mappings involving Alt, currently. 
It works with AltGr. You can put AltGr on both sides of the space bar if
you have enough keys.

Greetings,
Dirk



More information about the xorg mailing list