Linux: Disable Number Lock Key

By Xah Lee. Date: . Last updated: .

How to disable number lock key on Linux?

Create a file at ~/.Xmodmap with the following content:

! 2014-10-04
! make num lock do F18
! keycode  77 = Num_Lock NoSymbol Num_Lock

clear Lock

keycode 77 = F18 F18 F18

Now, run this line in terminal:

xmodmap ~/.Xmodmap

Linux xmodmap keybinding