Esc <-> Caps

The original Unix terminals (or at least the one vi(1) written on) had the esc key somewhere around the tab on PC keyboards. This makes sense if you think about vi's commands.

Well, we need tab, but most of us don't use the caps key, so we can just swap them right away.

You only need to create a file with this content:

! Swap caps lock and escape
remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock

Or you can just have them both as an Escape key.

! Making caps acting as esc
remove Lock = Caps_Lock
keysym Caps_Lock = Escape

You can save it to a file something like .swapesc and call it from .xinitrc:

xmodmap ~/.swapesc
Add a comment
Contact | Disclaimer | Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.
NetBSD® is a registered trademark of The NetBSD Foundation, Inc.