VOGONS


First post, by leep

User metadata
Rank Newbie
Rank
Newbie

I just intalled DOSBox 0.72 with the intention of installing older DOS games. When I start it up and get to the DOS Prompt, the keyboard doesn't work properly. The right Shift key does nothing. Even in the keymapper (ctrl-F1 from inside DOSBox), if I click the area for the right SHIFT key, click [Del], then click [Add], when I press the right-Shift key nothing happens. It doesn't even recognize a key is down.

Other keys are also not working correctly, the \ key gives me ] instead, the ] gives me [, and the [ key doesn't work at all, nor does the +/= key or the `/~ key or the '/" key.

I am running Vista Ultimate 32-bit, and before anyone jumps in to blame or flame Vista, you're probably right. But that doesn't help me solve my problem. 😀

I've ready other posts here from people having the same problem. Has any solution or workaround been discovered? I've tried running USESCANCODES FALSE from the DOS Prompt inside of DOSBox and that didn't make any difference. I also set keyboardlayout=en-us in the dosbox.conf file, also to no avail.

I tried installing FreeDOS in a VMWare virtual machine, but the audio in a game I installed was stuttery and I'm hoping it will work correctly in DOS Box. But I need the keyboard to work correctly first.

If a workaround is that I have to install XP in a VMWare box and run DOSBox in that and my Intel Core-2 Quad processor can run it smoothly with no stuttering audio, then that's an acceptable workaround. If I have to format my harddrive and install XP, then that's not an acceptable workaround. 🤣

Thanks for the responses!

=====
leep

Last edited by leep on 2008-05-03, 16:18. Edited 1 time in total.

Reply 1 of 43, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

As you post in the dev section, can you compile dosbox from sources?
Then check out the scancode/key stuff in sdl_mapper.cpp

Reply 2 of 43, by leep

User metadata
Rank Newbie
Rank
Newbie

I am a developer, but I am just working with the binaries in this case, no source code. My appologies if this wasn't the correct forum for this topic. The description of this forum said it was for the "discussion of bugs" as well as code and developmental matters. If there is a more appropriate forum for this please let me know and I will take it there. I just figured that since multiple people had reported this problem and I had tried all the fixes suggested to them with no resolution, that this may fit under the category of bug. 😀

As a developer, I certainly wouldn't mind the oportunity to try and help debug (if this is a bug) this, but it might take some time for me to get up to speed with the code and time is fairly rare now-a-days. 😉 At this point, I don't even know what language it's developed in. And I realy do want to get DOSBox up and running as quick as I can so I can get some of my old DOS based games running on this system I'm setting up to be a gaming/entertainment system.

Reply 3 of 43, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well it works just fine on the vista/vista64 setups tested, but it surely
depends on a lot of things like graphics drivers/directx (sdl backend)
and the likes.

Reply 4 of 43, by pokey

User metadata
Rank Newbie
Rank
Newbie

I have had this problem in another SDL program I develop. I just installed DOSBox, and it is the same issue. The problem is that the right shift key doesn't work and other keys like ] are in the wrong place.

Try using SDL_VIDEODRIVER=windib

I got this idea from here (SDL QEMU port):
http://www.h7.dion.ne.jp/~qemu-win/PortingTips-en.html
It says: "When the keyboard doesn't work well, set it before you start the program like this.
[DOS prompt] set SDL_VIDEODRIVER=windib"

Now that is just a work-around, but it seems that using windib changes the keyboard handling so that it works. It fixed DOSBox and my program.

The problem is not due to SDL alone however. I found the same problem when using Directx alone without SDL.

If you go here:
msdn.microsoft.com/en-us/library/bb219687(VS.85).aspx
There is info about "DirectInput and Japanese Keyboards"
Now, what I found through testing is that this problem is exactly as if I had a Japanese keyboard. Note that DIK_RSHIFT is listed as missing. As well, some of the keys that don't work generate special Japanese keycodes.

(I wonder if Japanese users of DOSBox have this same problem?)

This problem is not caused by the keyboard itself because when I plug in my old PS/2 keyboard it has the same problem.

I have a HP Pavilion with Vista Home Premium 32-bit.

Here is someone with the same problem:

http://forums.techguy.org/hardware/642722-key … disappears.html

Note that he also had an HP. Is your computer an HP?

HP listed a keyboard update on their site that said: "HP Enhanced Multimedia PS/2 and USB Keyboard driver update resolves issue with Shift key on the right side of the keyboard not working in certain WildTangent games."

I installed it and it did not fix things.

I would like to know if this is an HP issue or not.

Edit:
I noticed that mightythor40k from the techguy forums had listed his computer as "Acer Aspire 7520G Notebook". This makes doubt it is an HP issue.

Reply 5 of 43, by leep

User metadata
Rank Newbie
Rank
Newbie

pokey, thanks for all that info! The computer is indeed an HP, but since it looks like someone with a non-HP also has the problem I admit that throws some doubt on it being an HP issue.

I'm not home right now, but figured I'd remote into the computer in question (which is at home) and play with the SDL_VIDEODRIVER fix you suggested. Actualy, I remoted (Remote Desktop Control) into another computer at home, and then remoted from that computer to the gaming system in question. I fired up DOSBox, and guess what? The keys worked just fine! So they work when the input is via RDC, but not from the physical keyboard on the machine.

I also tried another keyboard when I first discovered this problem. First keyboard was a wireless keyboard using a USB receiver, second keyboard was a USB keyboard (not wireless). I didn't try a PS/2 keyboard, but both keyboards I tried had the problem.

When I get home (some time this weekend I hope) I'll play with what you suggested. Is that supposed to be an environment variable set inside DOSBox, or something you set in the config file before starting DOSBox?

Reply 6 of 43, by pokey

User metadata
Rank Newbie
Rank
Newbie

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

Reply 7 of 43, by leep

User metadata
Rank Newbie
Rank
Newbie

pokey, you got, perfect! One of the keyboards listed was "MCIR 109 Keyboard". I changed it's driver to "HID Compliant device", at which point the MCIR 109 Keyboard vanished from the list, and DOSBox works fine now! This was the wireless keyboard w/USB receiver. I haven't tried this with the USB wired keyboard yet, but I have high hopes now. 😀 Again, thank you SO much!

-----
leep

Reply 8 of 43, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Thanks for figuring this out. The keyboard layout should not matter as
dosbox uses the scancodes directly by default.
Maybe you can create a reduced testcase (by using some basic SDL example
or so) to check if/which of the symkeys are off, and if there's some pattern.
Then you could point the SDL guys to this.

Reply 9 of 43, by pokey

User metadata
Rank Newbie
Rank
Newbie

Well here is what I found:
It's as the Microsoft note said about the Japanese keyboards under DirectX:
msdn.microsoft.com/en-us/library/bb219687(VS.85).aspx
It seems to agree with:
http://www.win.tue.nl/~aeb/linux/kbd/scancodes-8.html#ss8.1
but I don't undestand why there's no right shift.

Tilde and capslock become toggles. Only presses generate events and not releases, and they toggle.

tilde -> 0x94 (toggle)
#define DIK_KANJI 0x94 /* (Japanese keyboard) */

+/= -> 0x90
#define DIK_CIRCUMFLEX 0x90 /* (Japanese keyboard) */

left square bracket -> 0x91
#define DIK_AT 0x91 /* (NEC PC98) */

right square bracket -> 0x1a=left square bracket

back slash -> 0x1b=right square bracket

caps lock -> caps lock (toggle)

quote -> 0x92
#define DIK_COLON 0x92 /* (NEC PC98) */

right shift -> does not work (no code)

You could remap some of them, but there's no way to fix right shift or the toggle on caps lock and tilde.

I found that I messed something up in my registry that made this worse with the ps/2 keyboard.
I'm pretty sure it caused an additional problem.
So I think now that I can explain all of this as due to the MCIR 109.
I have the PS/2 keyboard working with the HP driver now.

Reply 10 of 43, by mlvandy

User metadata
Rank Newbie
Rank
Newbie

Hi

Im new to this whole thing and am not good with computer hardware or programs at all. I really need help though!

I just got a new Dell computer with wireless keyboard and an old game of mine woulndt play so I downloaded the DOSBox, great right? No, the keys I need to use in order to play my game in DOSBox wont work. This \ key comes up something entirely different. The other keys I can handle not working right, but this is the ONE I desperately need to get my old game set up. Hope someone can help me!!!!

Thank you

Reply 11 of 43, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

And you have Spanish keyboard?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 12 of 43, by rolloLG

User metadata
Rank Member
Rank
Member

I've recently had a similar problem with a brand new HP Pavilion dv5-1110el and DosBox and other emulators like WinUAE!
I solved the same way forcing 'Microsoft eHome MCIR 109 Keyboard' to use HID Compatible device driver instead. And it worked! All emulators and in general all DirectInput apps now detect the keys correctly!

Here is the complete discussion where I solved the prob. by myself: http://eab.abime.net/showthread.php?t=41626

EDIT:
Read also here Re: Right-Shift / Backslash Keyboard Problems (SOLVED!)

Last edited by rolloLG on 2016-01-20, 11:34. Edited 1 time in total.

Reply 13 of 43, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Right, that's pretty much the only solution. We're using SDL thus only
indirectly the directinput interface, and those special keyboard drivers
screw up the scancodes for unknown reason.

Reply 14 of 43, by Ikrit

User metadata
Rank Newbie
Rank
Newbie

Okay, so I tried pokey's original solution (SDL_VIDEODRIVER=windib), but the problem is that I can't find the "=" key in addition to my backslash! While I would be interested in checking out the other solutions, they appear way over my head (I'm not too advanced in computers). Anything else simple enough that it is more or less copy and paste a couple of lines?

I'm currently running Vista 32x on an HP. I have gotten around this by copying whichever file I want to access to the c drive (not in any folders) and using the foreslash to mount it, which works just as well, but anything more specific and I am hosed.

Reply 15 of 43, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Read rolloLG's replies.

Reply 16 of 43, by BiGBaDJoHN

User metadata
Rank Newbie
Rank
Newbie

checked! rolloLG's reply solved my problem too!

Reply 17 of 43, by rolloLG

User metadata
Rank Member
Rank
Member

Just for curiosity.... even the game Oblivion suffered this problem and the console key didn't work before the manual modify! 😉

Reply 18 of 43, by apsumusician

User metadata
Rank Newbie
Rank
Newbie

After a long time of trying to comprehend all of that... Simply uninstalling the 109 driver did the trick.

Reply 19 of 43, by yhe1

User metadata
Rank Newbie
Rank
Newbie

I encountered this same from in Windows 7 Ultimate on a Dell XPS Studio 16.

However, I can't seem to find the keyboard drivers in Windows 7.

Can somebody guide me thorugh this issue? Thanks in advance.