3

I'm having some trouble pressing the ` key (I had to copy/paste it here) on my Ubuntu.

It acts like a weird tab or Esc now.

When checking with xkbevd, I get

^[

How can I reset this and get the key back?

Is there a way to see what's grabbing the event?

This is what it looks like in keyboard layout:

enter image description here

How can I unmap 'escape' from this key?

xev shows:

pressing backtick (no ctrl, no shift, just the key):

KeyPress event, serial 36, synthetic NO, window 0x3000001,
    root 0xc0, subw 0x0, time 41199509, (277,668), root:(314,767),
    state 0x0, keycode 49 (keysym 0xff1b, Escape), same_screen YES,
    XKeysymToKeycode returns keycode: 9
    XLookupString gives 1 bytes: (1b) ""
    XmbLookupString gives 1 bytes: (1b) ""
    XFilterEvent returns: False

KeyRelease event, serial 36, synthetic NO, window 0x3000001,
    root 0xc0, subw 0x0, time 41199559, (277,668), root:(314,767),
    state 0x0, keycode 49 (keysym 0xff1b, Escape), same_screen YES,
    XKeysymToKeycode returns keycode: 9
    XLookupString gives 1 bytes: (1b) ""
    XFilterEvent returns: False

Pressing esc

KeyPress event, serial 36, synthetic NO, window 0x3000001,
    root 0xc0, subw 0x0, time 41201255, (277,668), root:(314,767),
    state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) ""
    XmbLookupString gives 1 bytes: (1b) ""
    XFilterEvent returns: False

KeyRelease event, serial 36, synthetic NO, window 0x3000001,
    root 0xc0, subw 0x0, time 41201320, (277,668), root:(314,767),
    state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) ""
    XFilterEvent returns: False
7
  • Does running xmodmap -e 'keycode 49=grave' solve it? I think Ubuntu might not be using xmodmap anymore. If so, have a look at this answer.
    – terdon
    Mar 1, 2016 at 10:12
  • @terdon, YEEEEES!! thank you! it works now! please post it as an answer so i can accept it. Mar 1, 2016 at 10:15
  • Cool, which one? The xmodmap? And does it survive a reboot?
    – terdon
    Mar 1, 2016 at 10:16
  • yeah, the xmodmap. It isn't persisted after reboot, but i can fix that in bashrc Mar 1, 2016 at 10:23
  • No, don't fix it in the .bashrc, read the answer I linked to above, that should let you fix it across reboots.
    – terdon
    Mar 1, 2016 at 10:24

1 Answer 1

2

You can change the action associated with a key using xmodmap. In your case, you want:

xmodmap -e 'keycode 49=grave asciitilde'

That sets the key with the keycode 49 to print a grave accent, a backtick, and a tilde when combined with shift. See this answer for a few more details.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .