OK this is definitely a keyboard driver problem.
Go to the control panel and click on keyboard, then click on hardware/properties/driver for each keyboard.
Then list all the drivers for each keyboard device:
This is the driver for my PS/2 keyboard, not made by HP. This driver got installed automatically when I installed it:
Enhanced Multimedia PS/2 Keyboard
Manufacturer: HP
C:\Windows\system32\drivers\i8042prt.sys
Provider: Microsoft
6.0.6000.16386(vista_rtm061101-2205)
C:\Windows\system32\drivers\kbdclass.sys
Provider: Microsoft
6.0.6000.16386(vista_rtm061101-2205)
C:\Windows\system32\drivers\PS2.sys
Provider: Hewlett-Packard Company
1.0.2.0
C:\Windows\system32\drivers\kbd106.dll
Provider: Microsoft
6.0.6000.16386(vista_rtm061101-2205)
This is the HP USB keyboard:
HID Keyboard Device
Manufactuer: (Standard keyboards)
C:\Windows\system32\drivers\kbdclass.sys (as above)
C:\Windows\system32\drivers\kbdhid.sys
Provider: Microsoft
6.0.6000.16386(vista_rtm061101-2205)
There are also 3 other keyboard devices that get installed when I plug in my infrared remote control receiver for the remote control my computer came with:
Microsoft eHome Remote Control Keyboard keys
drivers: kbdclass.sys and kbdhid.sys as above
Microsoft eHome MCIR Keyboard
drivers: kbdclass.sys and kbdhid.sys
Microsoft eHome MCIR 109 Keyboard
drivers: kbdclass.sys, kbdhid.sys and kbd106.dll
Now, a 106 or 109 keyboard, means a Japanese keyboard. kbd106.dll is for a Japanese keyboard. And why do I have 3 keyboards for the IR remote? I suppose this is just in case I had a compatible IR keyboard which might or might not be a 109 keyboard.
Test:
Unplug the IR receiver and PS/2 keyboard, reboot
Result:
DOSBox works correctly
Theory: No kbd106.dll loaded implies no Japanese keyboard issue.
Test:
Plug in PS/2 keyboard, reboot
Result:
DosBox does not work correctly
Test:
Remove PS/2 keyboard. reboot. DOSBox works as before. Plug in IR receiver, don't reboot.
Result:
Existing DOSBox session which worked, continues to work correctly.
New DOSBox session keyboard fails to work correctly.
Test:
Uninstall MCIR 109 Keyboard driver while plugged in:
Result:
New DOSBox session now works. IR Remote continues to work.
After reboot, the old driver is back and DOSBox fails to work correctly again.
Test:
Change the MCIR 109 Keyboard's driver to HID-Keyboard device.
Result:
DOSBox fails to work correctly, even after reboot.
Conclusion:
Since this resulted in no kbd106.dll being listed, the mere presence of a 109 keyboard causes the problem.
Test:
change to MCIR non-109 keyboard driver
Result:
Fails before and after reboot
Test: Change the MCIR 109 Keyboard's driver to "HID-Compliant device."
Result: works, and the MCIR 109 Keyboard device is now missing, both before and after reboot. I don't know why it went away or how to get it back.
Test:
Reboot with the PS/2 Keyboard attached.
Result:
Fails
Hypothesis:
The kbd106.dll is causing this problem.
Test:
Change the PS/2 Keyboard driver from HP's "Enhanced Multimedia PS/2 Keyboard" to PC/AT Enhanced PS/2 Keyboard(101/102-Key) and reboot.
Result:
Fails
Conclusion:
There is no kbd106.dll anymore, and no MCIR 109. Why does this fail?
Test:
Change to "standard PS/2 101/102 Keyboard"
Result:
After reboot, works (including the "web keys" my PS/2 keyboard has)
Also, the IR remote works and the USB keyboard works.
So it seems that changing the MCIR 109 keyboard to "HID-Compliant device" got rid of it, and the PS/2 keyboard to "standard PS/2 101/102 Keyboard" fixed that problem as well.
I still don't fully understand this problem.
I would suggest anyone having this problem look for any keyboard device that seems Japanese in nature, such as having a "106" or "109" in the drivers or device name. Then, change the driver to that device until the problem goes away. Use the "HID-Compliant device" for MCIR 109. Use "standard PS/2 101/102 device" for a PS/2 keyboard.
The presence of one such device causes this problem.
Change the keyboard driver with Keyboard, Hardware, (pick the keyboard), Properites, Change Settings, Driver, Update Driver, Browse my computer, Let me pick, and possibly uncheck Show compatible hardware.
BTW To use use set SDL_VIDEODRIVER=windib you need to put that in a batch file that loads DOSBox. Or you can test it from a cmd shell by hand. I think it might still be useful in case this new method fails.
I found 3 more people with this problem:
Cant use dosbox SHIFT KEY wont function
http://forums.uesp.net/viewtopic.php?p=83613& … ffa1e96fc50edcd
http://www.gamersquarter.com/forums/viewtopic … 157e6061d#69317
There is also this note:
http://support.microsoft.com/kb/927824
Windows Vista may not use the correct keyboard layout when you connect a USB keyboard to the computer
I tried that before but the registry fix didn't work for the USB keyboard. But the driver change for the PS/2 keyboard mentioned at the bottom is the technique I used to fix things.
edit:
This guy got it, exact same answer as me: http://forums.logitech.com/logitech/board/mes … message.id=6123
But it still doesn't explain the PS/2 problems. Sounds like the MCIR 109 is the primary cause of this mess, however.
edit2:
Another guy who found MCIR 109 was the problem, but he didn't get a full solution (change to hid-compliant device):
http://www.digitpress.com/forum/archive/index … p/t-102166.html