tags:

views:

144

answers:

1

after doing

$ cat /dev/input/by-path/pci-0000:00:02.0-usb-0:2:1.0-event-kbd > ~/test_kbd

as root, I got a bunch of binary codes (which was expected). Now, I wanted to know how can I interpret this binary code to figure out what key has been pressed? What format is the output in? and is there a reference I could look at that would tell me what key each binary code stands for?

Thanks

+2  A: 

I would guess that they are scan codes. This page lists the make and break codes of keys used by modern keyboards. For more information on PS/2 keyboard programming, see Adam Chapweske's resources.

Adam Rosenfield