find keycode ==> xev



using capslock as esc #

  • method1 : add below into /etc/default/keyboard
XKBOPTIONS="caps:escape"

and reload
sudo dpkg-reconfigure keyboard-configuration

  • method2
setxkbmap -option caps:escape
and if you need to reset all option
setxkbmap -option


  • method 2 --> preserve : append to ~/.xprofile




How to make CapsLock do Escape Key on Linux?

Create a file at ~/.Xmodmap with the following content:
! -*- coding: utf-8 -*-
! 2014-09-10
! make caps lock do escape
! from http://xahlee.info/

! keycode   9 = Escape NoSymbol Escape
! keycode  66 = Caps_Lock NoSymbol Caps_Lock

clear Lock
keycode 66 = Escape NoSymbol Escape
Now, run this line in terminal:
xmodmap ~/.Xmodmap
When you restart, that file will run automatically.

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2020-04-13 02:13:05
Processing time 0.0064 sec