Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jan 1998 17:32:46 -0500
From:      Randall Hopper <rhh@ct.picker.com>
To:        "Jeffrey M. Metcalf" <metcalf@snet.net>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Q: Can users customize their keyboard mappings?
Message-ID:  <19980126173246.37663@ct.picker.com>
In-Reply-To: <000b01bd27aa$b60757a0$a40b3ccc@metcaljm_home.res.utc.com>; from Jeffrey M. Metcalf on Thu, Jan 22, 1998 at 09:57:52PM -0500
References:  <000b01bd27aa$b60757a0$a40b3ccc@metcaljm_home.res.utc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jeffrey M. Metcalf:
 |I am sure that there must be a way for users to
 |customize their keyboard mappings.  It is obvious
 |from rc.conf that global keyboard mappings can be
 |set with kbdcontrol, but I was hoping somebody could
 |tell me the best way for users to remap the keyboard 
 |settings for their and only their shells.
 |
 |Specifically, I would like to have the global keyboard
 |mapping set to the US standard (QWERTY), but some of
 |my users want to set theirs to DVORAK.  Any ideas?
 |I'm running FreeBSD-2.2.2.

I'm no keyboard-remapping GURU.  I only remap two keys on my keyboard in
both X and on the syscons console.  So I'll just pass on what I did.

For X, in .xinitrc:

      > xmodmap - << EOF
          remove Lock = Caps_Lock
          remove Control = Control_L
          keysym Control_L = Caps_Lock
          keysym Caps_Lock = Control_L
          add Lock = Caps_Lock
          add Control = Control_L
        EOF

For syscons, copy /usr/share/syscons/keymaps/us.iso.kbd somewhere, make
these mods:

<   029   lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl   O
>   029   clock  clock  clock  clock  clock  clock  clock  clock   O
<   058   clock  clock  clock  clock  clock  clock  clock  clock   O
>   058   lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl   O

And then point keymap="..." to it in rc.conf.

You mention dvorak.  Just browsing here, I see that there are us.dvorak.kbd
and us.dvorakx.kbd keymaps in /usr/share/syscons/keymaps, in addition to
the standard us.iso.kbd.  

So to satisfy your users, what it sounds like you want is a default set
of kbdcontrols/xmodmaps in the global profile (shell startup scripts for
console or xinitrc for X), and user-overrides in their local profiles
(shell startup scripts or .xinitrc for X).

Randall



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