Ubuntu

Caps Lock stops being a Control key with an external keyboard

Reported by Bem Jones-Bey on 2008-12-18
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Low
Ubuntu Desktop Bugs

Bug Description

I have Caps Lock remapped to Control using the Gnome keyboard preferences. When I plug in an external keyboard, (in this case, a Microsoft Natural Keyboard), the mapping no longer works, and caps lock on the external keyboard works as a caps lock key, not as a control key. If I look in the keyboard preferences, it says that caps lock is mapped to control. I note that the caps lock key on the internal keyboard is still properly mapped to control, only the external keyboard is missing the mapping.

xmodmap says the following without the external keyboard plugged in:
[hup:0]% xmodmap -pm
xmodmap: up to 3 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Control_L (0x42), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)

and with the external keyboard plugged in:
[hup:0]% xmodmap -pm
xmodmap: up to 3 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)

Note that if with the external keyboard plugged in, I go to the keyboard preferences, and turn off the remapping of caps lock, and then turn it back on, the remapping sticks until the next time I unplug the external keyboard and plug it back in.

Yet another data point: if I run xmodmap using the internal keyboard to type the command and run it, I get the expected xmodmap listing (the first one above), and if I do the same thing with the external keyboard, I get the second listing. (unless I've done the workaround just mentioned, in which case both maps are identical)

So it looks like my keyboard settings are different for each keyboard, but there seems to be no way to discover this through the UI. I know I never had this problem with 8.04, and but I'm not sure if I've always had this problem with 8.10.

[hup:0]% lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10

(And I'm not sure what package provides this functionality, but I have all of the latest updates to 8.10)

DaveAbrahams (boostpro) wrote :

I can confirm that, having mapped Caps Lock to Control, my laptop keyboard's Caps Lock acts as a control key but my external keyboard's caps lock does not. Re-mapping it in gnome-keyboard-properties with the external keyboard connected makes all Caps Locks (including the laptop's) act as control, but disconnecting the external keyboard causes it to revert so that it only applies to the internal keyboard.

DaveAbrahams (boostpro) wrote :

I meant to add that this is on Intrepid (8.10)

Sebastien Bacher (seb128) wrote :

Thanks for the bug report. This particular bug has already been reported, but feel free to report any other bugs you find.

Changed in gnome-control-center:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Invalid
DaveAbrahams (boostpro) wrote :

I think the duplicate status /may/ be wrong. That other bug has been variously "closed as incomplete" and marked as "probably fixed". Although its status is currently "new," there's no explanation why. It is not entirely clear that it's the same bug and it's especially not clear that the other bug is still considered to be an open issue, although I can confirm that this problem still exists.

Marcos Toledo (mtoledo-gmail) wrote :

I also think the duplicate status *may* be wrong. Whereas #289781 describes a solution of running setxkbmap after resume, this wouldn't work to fix this bug.

In this case, the keyboard mappings are lost every time the external keyboard is unplugged, so running it after resume won't guarantee proper functioning of the keyboard throughout the execution of the application, since a future disconnect of the external keyboard will bring the issue back.

This ticket (309434) is the only one that clearly describes what the issue really is.

BTW, I'm using a wireless keyboard, which means that every time that my keyboard loses connection even for a split second with its base, it resets my keyboardmap, making this the most annoying ubuntu bug I've come across, and a very important bug one to be fixed for any users of wireless keyboards with custom mappings.

Thanks for your time,
Marcos

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers