[xkb] Map alt+key to arrow

Dirk Wallenstein halsmit at t-online.de
Sun May 9 23:57:29 PDT 2010


On Mon, May 10, 2010 at 02:11:53AM +0200, Damien R. wrote:
> On 05/07/2010 10:37 AM, Dirk Wallenstein wrote:
> >If you run 'xev' with that keymap installed, do you have
> >         "(keysym 0xff51, Left)"
> >in the output when you press alt+key?
> 
> Yes, it got it.
> 
> >And if you try it in a terminal you get the same strange output as if
> >you press directly Alt+Left?
> 
> Exactly, it got the same output (in my case D).
> 
> >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.
> 
> Do you mean that clients does not query X to know the status of alt
> modifier ? If so, how they check it ?

Some look out for Alt keysyms. 

> Now, if I do :
> key <AD08> { type[Group1] = "PC_ALT_LEVEL2", [ d, Left ],
>         actions[Group1] = [ NoAction(), RedirectKey(key=<LEFT>,
> clearmods=Alt)] };
> 
> should it work or will client still track alt ?

No. You would have to release the Alt modifier key before the Left
keysym reaches a client.

> When I try that, alt+d or d+alt restart the X server.
> 
> Maybe, I misunderstand how X and clients work, so
> can you give some links or explain ?

http://www.x.org/wiki/XKB
http://en.wikipedia.org/wiki/X_Window_System
http://www.x.org/docs/

> >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.
> 
> I cannot use AltGr because my keyboard layout uses it to map useful keys.
> 
> 
> Thanks,
> 
> --
> Damien R.
> _______________________________________________
> xorg at lists.freedesktop.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: http://lists.freedesktop.org/mailman/listinfo/xorg

-- 
Dirk



More information about the xorg mailing list