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!
Keyboard Scan Code question
- eryjus
- Member
- Posts: 286
- Joined: Fri Oct 21, 2011 9:47 pm
- Libera.chat IRC: eryjus
- Location: Tustin, CA USA
Keyboard Scan Code question
Adam
The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
Re: Keyboard Scan Code question
Hi,
Another option might be a something like VMware ESX Server, which runs on bare metal and doesn't need to rely on "lossy abstractions" (although I haven't tried VMware ESX Server and can't guarantee it doesn't have issues of its own).
Cheers,
Brendan
You suspect right - the emulator (Bochs, Qemu) is like a normal application, and can only get whatever the host OS (Windows) tells applications. To make it worse, Bochs (and Qemu too I think) use SDL for portability; so Bochs can only see what SDL tells it, and SDL can only see what Windows tells it.eryjus wrote: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.
Someone else's hardware!eryjus wrote:Also, other than my own hardware, is there another approach I might have missed for testing these scan codes?
Another option might be a something like VMware ESX Server, which runs on bare metal and doesn't need to rely on "lossy abstractions" (although I haven't tried VMware ESX Server and can't guarantee it doesn't have issues of its own).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: Keyboard Scan Code question
ESXi doesn't have any interface for interacting with the guest VMs from the VM host itself; it is completely administered using a remote Windows program.Brendan wrote:Another option might be a something like VMware ESX Server, which runs on bare metal and doesn't need to rely on "lossy abstractions" (although I haven't tried VMware ESX Server and can't guarantee it doesn't have issues of its own).
Re: Keyboard Scan Code question
Hi,
Cheers,
Brendan
Doh - I guess VMware ESX/ESXi does have issues (for raw keyboard) too.Owen wrote:ESXi doesn't have any interface for interacting with the guest VMs from the VM host itself; it is completely administered using a remote Windows program.Brendan wrote:Another option might be a something like VMware ESX Server, which runs on bare metal and doesn't need to rely on "lossy abstractions" (although I haven't tried VMware ESX Server and can't guarantee it doesn't have issues of its own).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- eryjus
- Member
- Posts: 286
- Joined: Fri Oct 21, 2011 9:47 pm
- Libera.chat IRC: eryjus
- Location: Tustin, CA USA
Re: Keyboard Scan Code question
Thank you for the help. I should have been clear that I am running ESXi. I did try the VMWare console interface and get some better results, but combinations like <ctrl>-<alt>-<f1> are still not seen by the emulator.
Time to dust off my wife's old 386! Brendan, I guess that qualifies as "someone else's hardware." You cracked me up; I guess I walked right into that one....
Time to dust off my wife's old 386! Brendan, I guess that qualifies as "someone else's hardware." You cracked me up; I guess I walked right into that one....
Adam
The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber