You are not logged in.

#1 2018-01-30 15:54:49

Fran
Member
Registered: 2017-08-23
Posts: 15

[SOLVED] Numeric keypad with numlock off

Is there way to make the keys in the numeric keypad work in urxvt and other console programs as one would expect (i.e., as they work in any other application) without remapping them? Right now they only work sanely with numlock on (they send 0-9, /,*,-,+ and enter). But with numlock off they send scancodes that (for example) do nothing in bash or do weird things in vim.

I would assume they should same the same scancodes as their "normal" counterpart keys do, but they are different (for example: enter=^M, keypad enter=^[OM; page up=^[[5~, keypad pgup=^[Oy).

They work fine in any graphical application.

Do I have to xmodmap them one by one?

(edit)

Done, I had to set "enable-keypad" to off in ~/.inputrc.

Last edited by Fran (2018-01-31 12:13:45)

Offline

#2 2018-01-30 16:18:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,525
Website

Re: [SOLVED] Numeric keypad with numlock off


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2018-01-31 12:12:34

Fran
Member
Registered: 2017-08-23
Posts: 15

Re: [SOLVED] Numeric keypad with numlock off

The solution in the wiki (xmodmap) is precisely what I wanted to avoid.

Anyway, I've just found what I was looking for. I had "set enable-keypad on" in inputrc, don't know why. Setting it to off again makes the keypad keys send the same scancode as the normal keys with numlock off.

Last edited by Fran (2018-01-31 12:14:29)

Offline

Board footer

Powered by FluxBB