Ctrl modifier key not working

18,501

This worked for me:

sudo apt install gnome-tweak-tool
  • Open gnome-tweak
  • In the Keyboard and mouse tab of gnome-tweak-tool: enable Show All Input Sources and Show location of Pointer.
  • Restart session (I just restarted my system)
Share:
18,501

Related videos on Youtube

GreggC2006
Author by

GreggC2006

Updated on September 18, 2022

Comments

  • GreggC2006
    GreggC2006 over 1 year

    I have just installed a fresh new Ubuntu Gnome 16.04 and am having a weird problem.

    The left and right Ctrl keys are not working as modifiers. I can see them both doing what they should in xev but if I try and do a Ctrl+L to clear my terminal or a Ctrl+A in a document to select all or any other key combo involving Ctrl it will not do anything.

    I have looked through accesibility/universal access and keyboard settings to see if I can see anything obvious but I cannot and am completely stumped. Any ideas??

    It appears when I press Ctrl in a terminal with a second key, Ctrl+l for example, the terminal titlebar flashes in the same way it does if you press the down arrow when you are already at the bottom. Not sure if this is any help in diagnosing my issue or not??

    I have tried using copy/cut/paste shortcuts in gedit and they don't have any noticeable effect.

    Output of xev when I press the Ctrl keys

    KeyPress event, serial 34, synthetic NO, window 0x13e00001,
        root 0x2d3, subw 0x0, time 192257122, (75,49), root:(75,75),
        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 0x13e00001,
        root 0x2d3, subw 0x0, time 192257222, (75,49), root:(75,75),
        state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
        XLookupString gives 0 bytes: 
        XFilterEvent returns: False
    
    KeyPress event, serial 37, synthetic NO, window 0x13e00001,
        root 0x2d3, subw 0x0, time 192263578, (75,49), root:(75,75),
        state 0x10, keycode 105 (keysym 0xffe4, Control_R), same_screen YES,
        XLookupString gives 0 bytes: 
        XmbLookupString gives 0 bytes: 
        XFilterEvent returns: False
    
    KeyRelease event, serial 37, synthetic NO, window 0x13e00001,
        root 0x2d3, subw 0x0, time 192263658, (75,49), root:(75,75),
        state 0x14, keycode 105 (keysym 0xffe4, Control_R), same_screen YES,
        XLookupString gives 0 bytes: 
        XFilterEvent returns: False
    

    Interestingly the above is the result of two single keystrokes (one each left then right) is it normal to have two events per keystroke?

    I have accidentally discovered that when I cut/copy/paste keyboard shortcuts do not work in either, Ctrl and scroll wheel still zooms in both libre office and chrome browser

    UPDATE

    I have stumbled across a fix. In the 'Keyboard and mouse' tab of gnome-tweak-tool. I enabled 'Show All Input Sources' and 'Show location of Pointer' and as if by magic Ctrl is behaving as expected. Weird.

    • David Foerster
      David Foerster almost 8 years
      All of these are application-specific shortcuts. It would be odd if shortcuts involving Ctrl are broken in multiple applications, but it's worth checking that those shortcuts are actually enabled in the application configuration, e. g. in Gnome Terminal. Some applications have more or less hard-coded shortcuts, e. g. GEdit. What exactly is the output of xev when you press the Ctrl keys? Maybe they're wrongly assigned in your keyboard layout. Please edit your question to include the output and format it as a code listing (e. g. with the {} button in the editor toolbar).
    • user.dz
      user.dz almost 8 years
      Is this a laptop? If so, state 0x10 and state 0x14 means the num lock was on. I would suggest trying ctrl+l combination with xev with & without num lock on.
    • GreggC2006
      GreggC2006 almost 8 years
      Yes it is a laptop but with a full qwerty keyboard and numberpad. Yes num lock is on but that has always been the case on this machine, it has been running each release of Ubuntu since 12.04!
  • Warren  P
    Warren P about 6 years
    So having the Control Key not working seemed like a good default to the designers of Gnome? (Scratches head)