2

I use vim and I mapped CapsLock to Escape. Recently I decided to switch from qwerty keyboard to Colemak keyboard layout. Colemak maps CapsLock to Backspace. How can I map CapsLock to Escape back? In Linux Mint (what I use) it is possible to change setting to define CapsLock behaviour. It works when I use qwerty, but it breaks when I switch to Colemak.

Also I tried xcape. After installing it, I added the following lines to my .profile:

setxkbmap -option 'caps:ctrl_modifier'
xcape -e 'Caps_Lock=Escape'

However, it does not map CapsLock to Escape back. Any suggestions?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
ashim
  • 967
  • 1
  • 7
  • 10
  • Could you [edit in](http://unix.stackexchange.com/posts/270088/edit) the output of `xmodmap -pke | grep 'keycode 37'`? – Alex Stragies Nov 26 '16 at 23:54
  • In Colemak, there is no caps lock key, so remapping it won't do anything. (See https://en.wikipedia.org/wiki/Keyboard_layout#Colemak) You probably want to remap your left backspace key. I've just asked a question about that here: https://unix.stackexchange.com/questions/411861/how-can-i-remap-left-backspace-to-escape-on-the-colemak-keyboard-layout?noredirect=1&lq=1 – Jonathan Dec 19 '17 at 16:58
  • @Jon the key acts like a left backspace but is in fact defined as `` in the layout; see `/usr/share/X11/xkb/symbols/us`. – quixotic Dec 19 '17 at 18:21

0 Answers0