(I already asked this question on superuser but got no answer so I'll try here now.)
I would like to have the cursor keys and some others available as AltGr+c,h,t,n etc. (i,j,k,l if you have qwerty). I have made a custom keyboard layout file (see here). There I basically just took a layout file and modified the relevant lines to be like
key <AC09> { [ n, N, Right, Right ] };
I have this as /usr/share/X11/xkb/symbols/nonpop
and I load it with setxkbmap nonpop
in ~/.xinitrc
(I'm not using any DE, just the Awesome WM).
And it works---almost.
- In Firefox, for example, everything works nicely. For example AltGr+n moves the cursor right and Shift+AltGr+n selects text. Similarly in the main text area in LyX.
- In MonoDevelop the cursor moves with AltGr+n, but Shift+AltGr+n also only moves the cursor instead of selecting. Shift+Right selects text normally.
- In NetBeans and LyX dialogs pressing (Shift+)AltGr+n does absolutely nothing.
I guess these other programs read the AltGr state and decide it's a bad thing. So, is there any way to make things happen the way I want? It looks like overlays could be a solution but I didn't get them to work yet.
SetControls
instead ofLockControls
inOverlay1_Enable
would have the desired effect. Last time I tried I didn't even get the num lock example to work, though.