Re: [SLUG] Multiple mice

From: Eben King (eben1@tampabay.rr.com)
Date: Sun Dec 25 2005 - 14:21:47 EST


On Sun, 25 Dec 2005, Paul M Foster wrote:

> michael hast wrote:
> >
> > And in the same vein, how difficult would it be to hard-wire a keyboard
> > to the Dvorak layout? I'm just not convinced enough to plunk the cash
> > on a pre-hardwired keyboard, and I'm not sure it would be any less
> > difficult to configure it on the software side. Any of you guys using
> > Dvorak?
>
> All you need to do is replace your current keymap. Distributions do this
> different ways, but somewhere in the files in your /etc hierarchy is a
> pointer to which keymap to use. On Debian:
>
> /etc/console/boottime.kmap.gz
>
> is the keymap used from boot forward. I always swap Ctrl and Caps Lock
> keys on my keyboards (drives my wife crazy). The keymaps to choose from
> are at:
>
> /usr/share/keymaps
>
> Assuming you're running an Intel chip, your Dvorak layout would be in the
>
> /usr/share/keymaps/i386/dvorak
>
> subdirectory. You simply copy one of those to the aforementioned /etc
> location and reboot. (Actually, you can remap on the fly, but I'm not
> familiar with the procedure enough to describe it.)

Going one way:

if [[ -z $DISPLAY ]] ; then # not in X
grep -v '^#' << EOF | loadkeys -
keymaps 0-2,4-6,8-9,12
keycode 2 = equal plus
        alt keycode 2 = Meta_equal
        shift alt keycode 2 = Meta_plus
keycode 3 = one exclam
        alt keycode 3 = Meta_one
        shift alt keycode 3 = Meta_exclam
...
EOF
else # in X
grep -v '^#' << EOF | sed 's/^\(.*\)$/keycode \1/' | xmodmap -
10 = equal plus
11 = 1 exclam
...
EOF
fi

Going back:
if [[ -z $DISPLAY ]] ; then # not in X
        loadkeys us.map
else # in X
        xmodmap /usr/X11R6/lib/X11/etc/xmodmap.std
fi

Going back's much easier. Course, there's probably an easier way if your
keymap exists.

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar
              
           This message was created using recycled electrons.

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:13:24 EDT