Take the 2-minute tour ×

I didn't have an answer to my problem about adding additional keyboards in my Ubuntu 10.04. Questions mark is not working in my keyboard, only using Alt Gr key + W.

So, I don't know if this is a problem with Ubuntu or Virtualbox itself (I'm running it inside a VM).

It's an usb keyboard. HP KU-0316.

I would like to debug this problem. The keyboard is plugged in, so when I press a key I believe something is being sent to my operating system, some code, I don't know. I would like to digg this problem, find some damn key code and find some damn *.conf file and manually fix my problem.

So, do an application like this exist in Linux?

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

Try xev. It will display the keycodes that the X Window system sees when you press the keys you're interested in. You can use xmodmap to modify the mapping.

share|improve this answer
Exactly what I was thinking for! And when I press the key, nothing shoes... maybe a Virtualbox bug? –  Somebody still uses you MS-DOS Jun 15 '10 at 13:51
add comment

There are so-called event device files which are bound into a very low level of input layer. They reside in /dev/input/ directory, and you can read keycodes that are passed by virtual PS/2 keyboard by doing sudo hd /dev/input/by-path/platform-i8042-serio-0-event-kbd. If this command fails, just try that with each of /dev/input/eventX files: one of them will be bound to your keyboard.

share|improve this answer
add comment

An awesome utility from linux-input called 'evtest' is excellent at debugging keyboard, mice, and joysticks. Function keys should work too.

apt-get install evtest

Sample output from pressing the caps lock key while evtest running:

Event: time 1398955189.226822, type 17 (EV_LED), code 1 (LED_CAPSL), value 1
Event: time 1398955189.226822, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70039
Event: time 1398955189.226822, type 1 (EV_KEY), code 58 (KEY_CAPSLOCK), value 0
Event: time 1398955189.226822, -------------- SYN_REPORT ------------
share|improve this answer
add comment

Your Answer


