cf. capslock
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:escapeand 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 ~/.XmodmapWhen you restart, that file will run automatically.