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.
I found something that might help you: http://www.xfree86.org/current/XKB-Config.pdf 2.2 Advanced Configuration Since XFree86 4.3.x you can use multi-layouts xkb configuration. 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 configure 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 configuration 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"
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.