Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Moving to the far left-corner of the keyboard to reach Escape has been a major annoyance for me. On the other hand, the Caps Lock key on my keyboard is almost useless. I never use that key. Is there a way to map Caps Lock to Escape in Vim?


Run setxkbmap in your .xinitrc if applicable:

  setxkbmap -option caps:escape
Linux desktop environments’ keyboard configuration tools should also let you do this.


I am using Windows. Is there a lightweight solution to map Caps Lock to Escape on Windows?


Copy and paste the below into a .reg file and run it. I used Sharp Keys ( https://sharpkeys.codeplex.com/ ) to create it, but since every major Windows 10 update resets your key mappings I just extracted it from the registry and double click the reg file after each update.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,00,3a,00,00,00,00,00


I map Caps Lock to Escape, but I had to do it system-wide on MacOS.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: