GNOME Bugzilla – Bug 586274
Plugging in USB keyboard loses non-USA keyboard layouts
Last modified: 2009-08-07 15:09:46 UTC
Please describe the problem: I have USA and Spanish (Spain) keyboard layouts defined on my laptop, with USA being the default. When I plug in my external keyboard I can no longer choose the Spanish layout either from the keyboard layout indicator in the panel or via the keyboard shortcut I've defined. If I bring up the keyboard preferences, the Spanish keyboard is still in the list. To work around the problem, I either delete it and re-add the Spanish layout, or restart Gnome (log out and log in). Sometimes after unplugging and plugging in the keyboard, attempting to switch layouts will cause the keyboard indicator to display "??" instead of "USA" or "Esp". Sometimes it simply displays "USA". In either case, the keyboard responds with the USA layout, meaning not easy access to the Spanish characters. I'm running on a Lenovo Thinkpad x300. The original Ubuntu install was 8.04 and I've upgraded (using the upgrade process via Synaptic, not by reinstalling) to 8.10 and now 9.04. I have an external PS/2 keyboard in Spanish/Spain physical layout that I plug in to the laptop through a PS/2 to USB cable. The laptop has a USA physical layout. I first noticed this with 8.10, but I can't say for sure that it wasn't a problem in 8.04 as I didn't use the external keyboard very much with 8.04. On 8.10, the problem also happened when I suspended and resumed, but that seems to be fixed in 9.04. I can suspend and resume and the Spanish layout is still available. However, if I actually unplug the external keyboard and plug it back in, I lose the Spanish layout. Steps to reproduce: 1. Add a second keyboard layout through System-> Preferences-> Keyboard 2. Use the hotkey combination to confirm that you can switch between layouts 3. Plug in a USB external keyboard (if a laptop) or unplug and plug in a USB keyboard 4. Use the hotkey combination to switch layouts. Note that only USA is available 5. System-> Preferences-> Keyboard, then Layouts, shows that the second layout is still there, but there's no way to switch to it Actual results: User is unable to switch keyboard layouts. Expected results: All keyboard layouts the user has add should be available after plugging in a keyboard. Does this happen every time? Yes. Other information: I've also filed an Ubuntu bug for this: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/376592. It's HAL that resets the keyboard layouts, but HAL doesn't know who the current user is to know what keyboard layouts to set up. I'm assume that gnome-settings-daemon could be trigger somehow on the keyboard being plugged in, to allow the keyboard layouts to be set up.
It is Ubuntu issue. https://bugs.launchpad.net/ubuntu/+source/libxklavier/+bug/363169
*** Bug 591052 has been marked as a duplicate of this bug. ***