Wow, this was tricky to get right.
Sort-of solution
Adding this to a ~/.Xmodmap
file somehow does the trick:
keycode 77 = End NoSymbol End
For immediate effect,
xmodmap ~/.Xmodmap
If works very well, for simple keypresses as with shift and control keys.
Now what about NumLock?
But now another problem is that the NumLock
toggle is disabled, and the keypad perform arrow-like actions instead of typing numbers.
Here comes numlockx
and fail:
$ numlockx status
Numlock is off
$ numlockx on
$ numlockx status
Numlock is off
Hum, strange.
Shift+NumLock (key) as Num_Lock
(keysym). Works, but inconvenient.
I tried
keycode 77 = End Num_Lock End
but though it allows to do Shift+NumLock to toggle keypad behavior, it hinders Shift+End, a combination that I often use while typing (select to end-of-line).
Keypad-divide as Num_Lock
. Fail.
I tried the key next to it:
keycode 77 = End NoSymbol End
keycode 106 = Num_Lock KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab
or even
keycode 77 = End NoSymbol End
keycode 106 = Num_Lock Num_Lock Num_Lock Num_Lock Num_Lock Num_Lock Num_Lock Num_Lock
but pressing that key did not have any effect.
Actually, xmodmap ~/.Xmodmap
seems to reset NumLock
toggle to false.
Same for the ² twosuperior
key which I don't use for typing:
keycode 49 = Num_Lock Num_Lock Num_Lock Num_Lock Num_Lock Num_Lock Num_Lock Num_Lock
Tricky solution
It looks like if the keycode 77 is not bound to Num_Lock
at all, then NumLock
toggle is always kept at false.
Let's assign it (in ~/.Xmodmap
) some combination so obscure that I can't figure out:
keycode 77 = End NoSymbol End Num_Lock
Then
$ numlockx on
$ numlockx status
Numlock is on
Conclusion: success
- I can use the physical NumLock key as End key with Shift and Control.
numlockx on
works, for the rare case I will need it.
Additional information
- French keyboard layout on Xubuntu 15.04.