File:  [NetBSD Developer Wiki] / wikisrc / tutorials / how_to_swap_cap_lock_with_escape.mdwn
Revision 1.1: download - view: text, annotated - select for diffs
Sun Nov 20 20:55:21 2011 UTC (4 years ago) by mspo
Branches: MAIN
CVS tags: HEAD
import all of the how-to articles from the wiki

#  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

CVSweb for NetBSD wikisrc <> software: FreeBSD-CVSweb