0

I spilled the tiniest amount of water on my laptop and now the left arrow key won't respond - can anyone give me a quick runthrough of how to reassign it (i'm using Ubuntu) to another key (probably the right ctrl or another)?

If the tutorial requires me to press the left arrow key (perhaps to get its binding ID or something) I won't be able to do that.

Thanks!

1 Answer 1

2

setkeycodes can then be used to re-assign scancode to keycode mappings.

(only know of, because usually the caps-lock are the first ones I disable)

sudo setkeycodes E01D 105

where E01D is the scancode for right-ctrl and 105 is the keycode for cursor-left.

There's even a visual editor for the mapping, I just found:

set context menu key to function as right control

10
  • how exactly do I work out which key is the left arrow key? I just a bunch of random numbers when I run getkeycodes Nov 10, 2013 at 15:15
  • try dumpkeys - is a rather human-readable format... here it's mapped to keycode 105 = Left Nov 10, 2013 at 15:20
  • 1
    updated answer - without ANY guarantee, please validate. Nov 10, 2013 at 15:40
  • 1
    validating is always better - because I've sometimes seen exotic notebook keyboards which had certain keys mapped strangely (ones from far east in combination with euro keyboards). Nov 10, 2013 at 16:26
  • 1
    showkey --scancodes & xev are also useful for finding the codes.... while evtest seems to be useful, in particular for USB keyboard events. Jan 27, 2018 at 8:18

You must log in to answer this question.

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