Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jan 1998 20:14:47 -0500 (EST)
From:      Neil Ludban <n-ludban@onu.edu>
To:        Randall Hopper <rhh@ct.picker.com>
Cc:        "Jeffrey M. Metcalf" <metcalf@snet.net>, questions@FreeBSD.ORG
Subject:   Re: Q: Can users customize their keyboard mappings?
Message-ID:  <Pine.A32.3.96.980126191056.63063B-100000@austin.onu.edu>
In-Reply-To: <19980126173246.37663@ct.picker.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

Use xkeycaps to make a new keyboard mapping for X.  Save it as something
like /usr/X11/lib/keymaps/dvorak.  Then in the user's ~/.xinitrc, add

xmodmap /usr/X11/lib/keymaps/dvorak

Xkeycaps gives you a picture of the keyboard and lets you change the
keymappings around.  It is available in the ports.  Xmodmap comes with X.

For the console, just do

kbdcontrol -l /usr/share/syscons/keymaps/us.dvorak.kbd

This works as long as the user is logged in on any one of the consoles,
but changes the map for all of them.  Substituting iso for dvorak switches
it back, but I can't think of any good automatic way to know when to do
that.

	--Neil



On Mon, 26 Jan 1998, Randall Hopper wrote:
> 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?Pine.A32.3.96.980126191056.63063B-100000>