Intercept USB Keyboard Keycode Info
Hey there,
I am trying to intercept keycode information and print the last recieved keycode to an entry in the /proc file system. As of now, I have modified input.c and keyboard.c. Each time I have created a static variable that is to contain the last keycode. I then go into the keycode handling functions (input_fetch_keycode()/input_get_keycode() in input.c and getkeycode() in keyboard.c) and modify them to assign the keycode it is about to return to the static variable.
It seems that every time I try to do this, I get zeros for the output values, as if there is never a value assigned to the static variable in the first place. I am working under the assumption that everytime there is a key pressed on the USB keyboard, that one of these functions will be called, is that a correct assumption? Or are these drivers meant for a PS/2 keyboard and are never being called because I am using a USB keyboard? And if that is the case, what source file will I have to edit to obtain the keycode values?
|