Jim Hall

Authored Content

Authored Comments

I had to do something like this on a laptop I bought. The laptop had a keyboard that sent the wrong key code for the backslash key (\). The "shift" on this key is the pipe symbol (|).

To fix, I had to use "setkeycodes 56 43" to reset the correct key codes for that key. That's system-wide. To make the fix at every boot, just create a new /etc/rc.d/rc.local file like this:

#!/bin/bash
setkeycodes 56 43
exit 0

And:

sudo chmod 750 /etc/rc.d/rc.local

With that, you don't need to do anything at the user level. Note that this fix doesn't impact backslash or pipe on my external keyboard, which are correct.

I think there's a lot of value in learning about programming. I don't care if you work in IT later on, but learning a bit of programming removes the "it's magic" impression a lot of people carry about technology.