If one has a computer with several keyboards, it's impossible having one with
"fr" layout and the other one with "us" layout.
Why I need this is not for real keyboard : My laptop has azerty keyboard and I
own an USB CueCat (barcode reader which appears as a keyboard).
I need to switch to "us" layout before using it if I want to get the barcode (I
get "аи&'_-а"&ай'" with "fr" layout and "071486031024" with "us").
Would be great if I could have Keybaord1 with "fr" layout and Keyboard2 with
I found something that might help you:
2.2 Advanced Conﬁguration
Since XFree86 4.3.x you can use multi-layouts xkb conﬁguration. What does it
mean? Basically it
allows to load up to four different keyboard layouts at a time. Each such layout
would reside in
its own group. The groups (unlike complete keyboard remapping) can be switched
very fast from
one to another by a combination of keys.
Let’s say you want to conﬁgure your new Logitech cordless desktop keyboard, you
intend to use
three different layouts at the same time - us, czech and german (in this order),
and that you are
used to Alt-Shift combination for switching among them.
Then the conﬁguration snippet could look like this:
Option "XkbModel" "logicordless"
Option "XkbLayout" "us,cz,de"
Option "XKbOptions" "grp:alt_shift_toggle"
Of course, this can be also done at runtime using utility setxkbmap. Shell
command loading the
same keyboard mapping would look like:
setxkbmap -rules xfree86 -model logicordless -layout "us,cz,de" \
there's no way to fix this in the kbd(4) driver. it has no idea which keyboard
it's talking to, because the OS presents it as a single device.
on linux, if you want multiple keyboards with different layouts, you'll have to
use evdev (which should be gaining xkb support shortly).