First you have to download the program "getscancodes" from http://keytouch.sf.net . After you unpacked the downloaded archive, open a terminal program (like xterm, konsole or gnome-terminal) in the unpacked directory. If you are not using a PC (which means an x86 system), you will have to compile the program for your system by running the command "make".
The "getscancodes" program makes use of the evdev driver. So the first step is to load the evdev module. Run the following command in your terminal program to load the evdev module:
$ su -c "/sbin/modprobe evdev"(do not type the $ character) Fill in the root password and press enter to load the module. If you are using Ubuntu (or another sudo based distribution) you will have to run:
$ sudo /sbin/modprobe evdevWhen you now look in the directory /dev/input/ you will notice that there are some files (devices) called "eventX" (where X is replaced by a number). To see the contents of /dev/input run:
$ ls /dev/inputEvery event device (like a keyboard or a mouse) is related to one of these files. To find out which file belongs to your keyboard, run:
$ su -c "./getscancodes /dev/input/eventX"Or under Ubuntu:
$ sudo ./getscancodes /dev/input/eventXReplace the X by a number. getscancodes will first show some information about the device, including its name ("Input device name") that can tell you if you have chosen the correct event device. Press one of the extra function keys to see if getscancodes reacts on it. If not, try another event device. When you finally have found the correct device we are ready to retrieve the scancodes. Just press the key and getscancodes will show the scancode (after releasing the key, the scancode will be printed again). For example:
146 (0x92)The number in brackets is the hexadecimal representation of the scancode. We only need the decimal value for our keyboard file.
To terminate getscancodes press Control+C.