> Couple of questions:
> 
> 1. What if starting from this state:
>       $ wsconsctl 2>/dev/null |grep encoding
>       keyboard.encoding=us
>       keyboard1.encoding=is
>       keyboard2.encoding=uk
> 
> you unplug the Icelandic and Sun UK keyboards. Next attach
> first the Sun UK keyboard and next the Icelandic one?

The Sun keyboard will always attach with the UK layout.

The icelandic keyboard will attach with the current mux layout, which
depends upon what happened before. In my example I had forced the mux
layout to icelandic by setting a keyboard layout with wsconsctl.

If I had not done this (icelandic keyboard still using us layout), then
plugging the Sun keyboard would have set the mux to uk, and further
keyboards would use the uk layout (unless a new layout is set with
kbd(8) or wsconsctl(8)).

> 2. What if starting from this state:
>       $ wsconsctl 2>/dev/null |grep encoding
>       keyboard.encoding=us
>       keyboard1.encoding=is
> 
> you unplug the Icelandic keyboard, and plug in a US layout
> keyboard with no country codes?

Then, because the icelandic keyboard has had its layout forced, the mux
will default to icelandic keyboard for future keyboards which don't
advertize a country code. So your us keyboard will attach with an
icelandic layout, until you change this manually.

> I am interested in this patch because I use Sun USB
> keyboards, with "proper" Control key position (:P) but,
> say, on my laptops, I set keyboard.encoding=us.swapctrlcaps.
> Where, if/when I plug in said Sun USB keyboard, the key
> marked "Control" is swapped as CapsLock.
> 
> I wonder if your patch, or similar, could fix the situation
> such that, plugging in a Sun USB keyboard (with "proper" Ctrl
> key position), it could "know" not to treat the Control key
> on the Sun keyboard as CapsLock?

It will depend how you set ``keyboard.encoding=us.swapctrlcaps''. If you
do this in /etc/wsconsctl.conf while the USB keyboard is connected, then
it will get its layout swapped because of this. Better use
``keyboard0.encoding=us.swapctrlcaps'' to only alter the laptop built-in
keyboard. And this will work, whether my diff is applied or not.

Miod

Reply via email to