Windows – How to emulate a touchscreen in Win10 in Virtualbox

microsoft-edgetouchscreenvirtualboxwindows 10

I'm a web developer, and part of what I do is test websites and javascript in different browsers. For testing IE and Edge, I use the Virtualbox VMs available at https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ (Virtualbox v5.1 on a Linux host).

Right now I need to check and debug some javascript related code to touchscreen interactions in Edge (PointerEvents for touchscreens, specifically), and obviously I'd like to do that inside a Win10 VM.

The Virtualbox settings for the VM allow me to change the pointing device between a PS/2 mouse, a USB trackpad or a multi-touch trackpad. Any of these options means that Edge receives mouse events, not touchscreen events.

It's my understanding that if the host OS has a hardware touchscreen, VirtualBox can pass through the touches. But that is not my case: my host machine only has a mouse.

Is there a way to configure VirtualBox so it emulates a touchscreen? And if "yes", how?

Are there any VirtualBox additions to do so?

Is there any other hacky way to trick either Win10 or Edge into thinking they have a touchscreen?

Best Answer

If you have Visual Studio installed (even the free Community edition is enough), you can use the Windows Simulator:

enter image description here

It’s located in %ProgramFiles(x86)%\Common Files\Microsoft Shared\Windows Simulator. For VS 2015, the next directory is 14.0. Just start Microsoft.Windows.Simulator.exe.

Internally, a Remote Desktop Connection is opened to your PC with special settings, resulting in a new session for your current user. Please note that some Autostart programs may interfere with their currently running instances, so you might want to use a clean user account.

There is one caveat, however: The mouse pointer is still (also) sending pointer events.