Keyboard Scan Code question
Posted: Sat Dec 31, 2011 6:01 pm
Hi,
I am working on a keyboard driver and have an ISR that simply prints the scan codes to the screen so that I can catalog them (and compare against the code here: http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html, taken from the Wiki page: http://wiki.osdev.org/Keyboard). Most of the keys generate scan codes.
My question is that some keys are not generating scan codes that I thought might. For example, the NumLock is not generating a scan code but the NumLock LED turns on and off. However, I do get different scan codes with NumLock on versus off on the numeric keypad.
Another example is the Caps Lock key, which does not generate a scan code, but changes the scan codes for each letter I press ("Fake Shifts").
I think the reason is my development environment and more specifically how I get there. I am running FC15 in a VM, in which I use both Bochs and QEMU to test my OS. I am connecting to that FC15 VM via VNC Viewer from a Windows 7 machine. I suspect that Windows is intercepting the key presses and handling them before they get to my OS. I am just looking for someone with a little more experience to confirm my thoughts, please. Also, other than my own hardware, is there another approach I might have missed for testing these scan codes?
Thanks!
I am working on a keyboard driver and have an ISR that simply prints the scan codes to the screen so that I can catalog them (and compare against the code here: http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html, taken from the Wiki page: http://wiki.osdev.org/Keyboard). Most of the keys generate scan codes.
My question is that some keys are not generating scan codes that I thought might. For example, the NumLock is not generating a scan code but the NumLock LED turns on and off. However, I do get different scan codes with NumLock on versus off on the numeric keypad.
Another example is the Caps Lock key, which does not generate a scan code, but changes the scan codes for each letter I press ("Fake Shifts").
I think the reason is my development environment and more specifically how I get there. I am running FC15 in a VM, in which I use both Bochs and QEMU to test my OS. I am connecting to that FC15 VM via VNC Viewer from a Windows 7 machine. I suspect that Windows is intercepting the key presses and handling them before they get to my OS. I am just looking for someone with a little more experience to confirm my thoughts, please. Also, other than my own hardware, is there another approach I might have missed for testing these scan codes?
Thanks!