Advertisement
metalx1000

Disable or Swap CapsLock

Jul 23rd, 2024
444
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.46 KB | None | 0 0
  1. # Usding xmodmap
  2. #   Disable
  3. xmodmap -e 'keysym Caps_Lock = '
  4.  
  5. #this will remap Caps Lock to act as Esc
  6. xmodmap -e "keycode 66 = Escape NoSymbol Escape"    
  7.  
  8. # reset it to caps lock
  9. xmodmap -e "keycode 66 = Caps_Lock"
  10.  
  11. ## using  setxmap
  12. #  Disable
  13. setxkbmap -option ctrl:nocaps
  14. #  or
  15. setxkbmap -option caps:none
  16.  
  17. #set caps to esc
  18. setxkbmap -option caps:escape
  19.  
  20. #SWAP Caps and Esc
  21. setxkbmap -option caps:swapescape
  22.  
  23. # reset
  24. setxkbmap -option
  25.  
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement