ian329
Contributor
Contributor

VMware Disable Keyboard

We have an application that runs in DOS on a touchscreen monitor. When a keyboard is detected at software startup it boots into a 'maintenance mode'. If the keyboard is unplugged and the pc rebooted, the software loads as normal and operation is via the touchscreen.

We want to virtualise this system in VMware so it can run on a new Windows machine. DOS is installed fine and the software boots no problem, but it always detects a keyboard and enters 'maintenance mode' even though I have unplugged the keyboard from the host at bootup.

I've tried all combinations, keyboard unplugged from host boot, from guest boot. I've tried uninstalling from device manager. There is no option in host or guest bios to disable ps/2 etc. Tried removing keyboard drivers from /DOS directory on virtual drive. Tried removing keyboard from COMMAND.COM. Tried some options for disabling keyboard within DOS. Basically everything we can think of!

Problem seems to be that regardless of the existence of a keyboard in Windows, VMware seems to be telling DOS that there is one present and as a result I cannot run the software in 'user mode'.

Can anyone think of anything else I can try please

Thanks

Ian

0 Kudos
6 Replies
continuum
Immortal
Immortal

Interesting ...
but right now I do not know a way to remove the keyboard from a guest.

I am pretty sure I would have heard about any working solution to do that Smiley Sad

Do you need support with a recovery problem ? - call me via skype "sanbarrow"
0 Kudos
ian329
Contributor
Contributor

Hello Continuum and others,

This issue is still relevant to us. Since my first post have you heard anything new about this please?

(in Device Manager in the guest OS a standard PS/2 keyboard is shown. Would like to be able to remove this)

Many thanks

Ian

0 Kudos
dariusd
Leadership
Leadership

Hi Ian,

The virtual PS/2 keyboard is not removable at this time – it is always present and always reports a successful self-test, regardless of the presence or type of host keyboard.

At what point is the decision to boot "normal" or "maintenance mode" made within the software you're virtualizing?  Is it something in CONFIG.SYS or AUTOEXEC.BAT?  Do you know exactly what it's looking for?  Is there any other way you know of that we might be able to influence that decision?

Cheers,

--

Darius

0 Kudos
ian329
Contributor
Contributor

Hi Darius,
Thanks for the reply. The check is done in code when the software first boots. It checks the keyboard memory location as follows...
/* If bit 4 of the byte at 0x0040:0x0096 is set keyboard present */
if ( (*(unsigned char __far *) 0x00400096) & 0x10 )
    KeyboardPresent = TRUE;

The only way would be to clear bit 4 before this runs. I have written a program that trys to clear the bit before I run the main software, but this doesn't seem to work, hence my original question to see if this memory location could be modified within VMware.

Thanks

0 Kudos
dariusd
Leadership
Leadership

Hi Ian,

That memory location should behave the same in a VM as it does on a physical machine, so it should be possible to clear that bit.  The BIOS Data Area is regular RAM, and there is no magic to it.  We won't set bit 4 again unless seriously provoked – i.e. the virtual machine's BIOS will re-set bit 4 if you set bit 7 of 40:96 (read ID in progress) and then send an "identify" command to the keyboard, but nothing else we do should touch it.

Are you sure your utility for clearing the bit is working as intended?  Is it possible that there is some other check in the main application which is defeating your bit-clearing?

--

Darius

0 Kudos
housec
Enthusiast
Enthusiast

@dariusd I have this same question, but for a Windows 10 guest on Linux - we need to be able to have Windows run in Tablet mode and display the on-screen keyboard when a text input receives focus, but it will not because it knows there is a "physical" keyboard presented to the VM. Is it still not possible to remove the virtual keyboard from the VM?

0 Kudos