switching key mappings on a laptop (function and ctrl)

Matthew Seaman m.seaman at infracaninophile.co.uk
Tue Jan 11 02:38:32 PST 2005


Joe Schmoe wrote:
> I have a new laptop that has the FN (function) key in
> the very lower left, and the CTRL key one key to the
> right of it ...
> 
> but I like the CTRL key to be in the far lower left
> ...
> 
> Is it possible to switch the function of these two
> keys (not just in X, but in the console, virtual
> terminals, etc.)

Yes, this is certainly possible.  In fact, there are two separate 
mechanisms for doing this -- one for use under X-win, the other for use 
under the console.

Under X, see xmodmap(1) and the sections in X(7) on keyboards, and these 
other man pages:

     % man -k xkb
     setxkbmap(1)             - set the keyboard using the X Keyboard 
Extension
     xkbcomp(1)               - compile XKB keyboard description
     xkbevd(1)                - XKB event daemon
     xkbprint(1)              - print an XKB keyboard description

For modifying the console see kdbcontrol(1), kbdmap(1), kbdmap(5) -- the 
keymap files in /usr/share/syscons/keymaps are pretty easy to understand 
and create customised versions of.  See also the allscreens_kbdflags 
variable in /etc/defaults/rc.conf for how to get your changes to happen 
automatically on reboot.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       8 Dane Court Manor
                                                       School Rd
PGP: http://www.infracaninophile.co.uk/pgpkey         Tilmanstone
Tel: +44 1304 617253                                  Kent, CT14 0JL UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 372 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20050111/8601e60f/signature.bin


More information about the freebsd-questions mailing list