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:

! -*- coding: utf-8 -*-
! 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

back to Linux: xmodmap Tutorial

Linux Keybinding How-to

  1. Keyboard Software Guide
  2. Swap Control Alt Keys
  3. Set F2 F3 F4 to Cut Copy Paste
  4. CapsLock → Escape
  5. CapsLock → Home
  6. Shift Lock
  7. Key to Switch App
  8. Key Repeat Rate
  9. System Keyboard Layout
  10. Switch Keyboard Layout
  11. Change Volume
  12. xmodmap
  13. xbindkeys
  14. xvkbd
  15. Find Keyboard Key Scancode
  16. X11 Keyboard Key Names

If you have a question, put $5 at patreon and message me.