2

I cannot really tell exactly how this did happen. Yesterday, I pressed CTRL + C to copy a URL from a web page displayed on Firefox, and it seems I touched something else that wasn't CTRL + C and Firefox loaded a new tab with the home page. Since then just by pressing CTRL Firefox loads the home page. Today I discover that pressing CTRL on a Nautilus window loads my home directory.

This is causing me problems when I want to copy something as I used to CTRL + C, CTRL + V keys.

After reading this How can I restore default keyboard shortcuts?, I looked at these locations using dconf-editor:

org.gnome.settings-daemon.plugins.media-keys
org.compiz.integrated
org.gnome.desktop.wm.keybindings
org.gnome.shell.keybindings

But I could not find any entry mapping CTRL alone.

Where can this key mapping be?


Update: I tried to create an empty shortcut in System->Keyboard->Shortcuts and tried to assign an empty command like sh -c "", to see if the problem goes away but this has no effect. If I press CTRL key while the new shortcut is waiting for the key combination to be recorded, it records <Primary>HomePage in org.gnome.settings-daemon.plugins.media-keys in dconf-editor. I tried replacing that with <Ctrl> or <Primary> or HomePage using dconf-editor but nothing changes. Also put <Ctrl> alone seems not valid because when I look again in Keyboard->Shortcuts the value Disabled is shown in my custom shortcut.

Update: I tried to reset everything using the command:

gsettings reset-recursively <insert location>

Changing <insert location> for all four known locations where keybindings are stored, running the command once per location. No effect, CTRL key still loads home page and home dir. Where else can I look?


If I run xev and press Left CTRL I obtain this:

KeyPress event, serial 34, synthetic NO, window 0x4c00001,
    root 0x290, subw 0x0, time 5826943, (952,482), root:(952,534),
    state 0x10, keycode 180 (keysym 0x1008ff18, XF86HomePage), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x4c00001,
    root 0x290, subw 0x0, time 5826947, (952,482), root:(952,534),
    state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x4c00001,
    root 0x290, subw 0x0, time 5827041, (952,482), root:(952,534),
    state 0x14, keycode 180 (keysym 0x1008ff18, XF86HomePage), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x4c00001,
    root 0x290, subw 0x0, time 5827047, (952,482), root:(952,534),
    state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 37, synthetic NO, window 0x4c00001,
    mode NotifyNormal, detail NotifyNonlinear

PropertyNotify event, serial 37, synthetic NO, window 0x4c00001,
    atom 0x13a (_NET_WM_STATE), time 5858181, state PropertyNewValue

Keycode 37 is the same as other of my PCs running Linux. But Key 180 shows only in this PC. What is XF86HomePage? And how it gets mapped to CTRL only by pressing some key combination?

This get rids of the annoying behavior of the CTRL key:

xmodmap -e "keycode 180 = "

But I read that I will have problems making it run in every boot as now Ubuntu uses xkb. Permanent xmodmap in Ubuntu 13.04

What I cannot understand is why only because I pressed some key combination by error now my Left CTRL key sends a keycode 37 immediately followed by a keycode 180.


I starting to think that this was not triggered by an accidental key combination, It may have been introduced with some update, I remember that I was downloading updates when the Left CTRL key started to behave weird.

I think this is related: https://unix.stackexchange.com/questions/88269/a-single-key-on-keyboard-produces-extra-keypresses-for-each-simultaneously-press

My keyboard is also USB, maybe that question was asked a year ago, but the problem is very similar, a single key generating more than a single keycode. Maybe exact keyboard wasn't affected a year ago but some update broke it now. Another possibility is hardware failure, I will try another keyboard and report back.


Confirmed. Only my Genius USB keyboard generates the keycode 37 immediately followed by a keycode 180. I connected a Xtreme USB keyboard to the front panel and confirmed using xev that this keyboard does not generate any keycode other than the 37 when I press the Left CTRL key.

Now, I'm pretty sure, as I constantly use the CTRL+C combination to copy text, that this Genius keyboard didn't do this before. Maybe it just broke. I will answer this question as soon as I find out how I can disable the keycode 180 without having to run xmodmap all the time.

Hatoru Hansou
  • 1,037
  • 1
  • 13
  • 24
  • 1
    I will answer myself If I found a working solution, they are merely updates on the case right now. I didn't solve the problem yet. – Hatoru Hansou Feb 07 '15 at 00:10
  • 1
    Could you post the output of gsettings list-recursively | grep --ignore-case ctrl to http://paste.ubuntu.com? if there is a keybinding with a sole Ctrl in there, that will be the culprit. – Fabby Feb 09 '15 at 08:53
  • http://paste.ubuntu.com/10146192/ remember that this only happens with a specific keyboard, If I connect another keyboard the kaycode 180 isn't generated. – Hatoru Hansou Feb 09 '15 at 18:40
  • 1
    Well, It would have been nice to tell you: "Stop looking, here it is", but I can't. So an upvote for you and a favourite as I would like to see how you solved it... 成功! – Fabby Feb 09 '15 at 18:51

1 Answers1

0

Boring answer. Until somebody else offers a better explanation, this is a case of hardware failure. I replaced the problematic keyboard and no more keycode 180 following a keycode 37.

Curious thing, not in favor of hardware failure diagnostic, is that the same problematic keyboard don't generate the keycode 180 when CTRL is pressed on the other PC where I connected it.

Just in case this information is of any use: sorry for saying in my question that the problematic keyboard was USB, actually It is PS2, as the connector was not in my sight until I moved the computer case to do the keyboard replacement. I think I assumed USB because I was thinking in some other keyboard that was previously connected to this PC.

Hatoru Hansou
  • 1,037
  • 1
  • 13
  • 24