Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2001 21:11:05 +0100
From:      Roman Neuhauser <neuhauser@mobil.cz>
To:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: switching capslock <-> escape in terminal
Message-ID:  <20011214211105.Q27919@roman.mobil.cz>
In-Reply-To: <20011214160504.C27919@roman.mobil.cz>
References:  <20011214160504.C27919@roman.mobil.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Fri, 14 Dec 2001 16:05:04 +0100
> From: Roman Neuhauser <neuhauser@mobil.cz>
> To: freebsd-questions <freebsd-questions@freebsd.org>
> Subject: switching capslock <-> escape in terminal
> 
> Hi there,
> 
> since I spend about 50% percent of the time on a computer in vi[m], I
> would really love to have the escape key closer to my fingers. Is it
> possible to switch escape w/ capslock? I seem to remember having read
> somewhere about switching ctrl <-> capslock, but cannot find it anymore.
> stty(1) hasn't provide any hints either, nor did the vim manual (though
> I might have missed the right keyword. 
> 
> I should note that I'm seeking to have the keys interchanged in terminal
> (currently aterm), since I avoid using gvim.

    For the sake of the archives:
    if you put this in a file (say, ~/.xmodmaprc):
    
    ! swap CapsLock and Esc
    remove Lock = Caps_Lock
    keysym Caps_Lock = Escape
    keysym Escape = Caps_Lock
    add Lock = Caps_Lock

    you will have switched those keys as soon as you issue 

    $ xmodmap ~/.xmodmaprc

    To switch the keys in the vty as well, edit your keymap file
    (default is /usr/share/syscons/us.iso.kbd; make a backup first!)
    and flip the scancodes for esc (001) and clock (058). Then issue

    $ kbdcontrol -l us.iso 
    
    (if that is your keymap), and your all set.

    Kudos to Kevin Oberman and Tim Hammerquist for this info.

-- 
FreeBSD 4.4-STABLE
8:30PM up 52 days, 7:13, 12 users, load averages: 0.05, 0.08, 0.08

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011214211105.Q27919>