I've got a Win98 machine that needs to keep working due to a DOS application that has no upgrade to new Windows versions.
As the hardware is becoming old and falible I created, as a provisional solution, a vmware workstation 6 virtual machine through a ghost image from the real machine.
The virtual machine has drivers updated to the "hardware" provided by vmware and vmware tools are installed.
The problem comes when a MSDOS window is opened and the keyboard layout it's not as expected. The keyboard is supposed to be spanish and in Windows 98 applications it is. But as soon as you work on an MS-DOS window it's not spanish, not english, just a bizarre thing where symbols (not alphabetical characters) are shuffled. The numeric pad symbols '/' and '*' are substituted by ''' and '^', and the Esc key performs a '\' sequence.
The configuration of keyboard on MS-DOS (country, mode and keyb stuff are correctly done) and I'm lost on confussion with this problem.
I've been doing tests with various boot diskettes including w98, ms-dos 6.22, freedos, ibm dos 7, various linnux distros and so.
The conclusion is that there is some problem with (only) MS-DOS keyboard layouts except US one on VMware workstation. I've tested versions 6 and 5.5.4 and the problem persists on both.
VirtualBox doesn't have this problem.
Still no answers?
I used to have the same problem with VMPlayer 6.0.3 / Windows 8 as Host / Windows 98 as Guest and DOS as same layout keyboard problem as you (but with a French keyboard) !
Simply use this in your .vmx file :
guestOS = "dos"
As you probably put "Windows 98" instead ...
Well, I have similar issues in pure MS-DOS machine. The keyb command for some reason doesn't change my keyboard layout, so I can't type in Czech.