Bug 5755

Summary: Can't set layout per keyboard
Product: xorg Reporter: Pascal Terjan <pterjan>
Component: Input/KeyboardAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: high    
Version: 6.9.0   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Pascal Terjan 2006-01-29 08:22:47 UTC
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
"us" layout.
Comment 1 Adriano Varoli Piazza 2006-01-30 20:20:30 UTC
I found something that might help you:
http://www.xfree86.org/current/XKB-Config.pdf

2.2 Advanced Con&#64257;guration
Since XFree86 4.3.x you can use multi-layouts xkb con&#64257;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&#64257;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&#64257;guration snippet could look like this:
     Section "InputDevice"
         Identifier "Keyboard1"
         Driver "Keyboard"
         Option "XkbModel" "logicordless"
         Option "XkbLayout" "us,cz,de"
         Option "XKbOptions" "grp:alt_shift_toggle"
     EndSection
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" \
               -option "grp:alt_shift_toggle"
Comment 2 Adam Jackson 2006-02-04 10:47:39 UTC
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).

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.