Home » Questions » Computers [ Ask a new question ]

NumLock is completely useless, and I want to disable it completely on Linux

NumLock is completely useless, and I want to disable it completely on Linux

Forget all the rants about Caps Lock, Num Lock is the most useless key of them all. It's never, ever useful. You don't want to use your numpad as an arrowpad, since the arrows are 1cm away from it. Ever.

Asked by: Guest | Views: 295
Total answers/comments: 3
Guest [Entry]

"Well for your first question, you can remap it to nothing with xmodmap:

xmodmap -e ""keycode # = """"""

where # is the scan code of NumLock. You can find the scan code using xev. Instead of nothing you can remap it to any key you'd like."
Guest [Entry]

For Ubuntu 16.04 - xmodmap is not a permanent solution. Instead, install "Gnome Tweak Tools", navigate to Typing-->Miscellaneous Compatibility Options, and select "Numeric keypad keys always enter digits".
Guest [Entry]

"Following John and niXar's answer above, for a standard keyboard, this should be added to your .xprofile or a similar file:

xmodmap -e 'keycode 77 = NoSymbol Num_Lock'

Explanation:

xmodmap is a ""utility for modifying keymaps and pointer button mappings in Xorg"".
-e evaluates a xmodmap command.
keycode is a command to assign keycodes (physical keys) to keysyms (""encoding of a symbol on the cap of a key"", see below.)
Keycode 77 is the NumLock key.
The first keysym, NoSymbol is the key press output when no modifiers are pressed with this key.
The second keysym, Num_Lock is the key press output when the shift modifier is pressed with this key."