Monthly Archives: April 2016

Connect to Wireless Display dongle

Hello everyone,

today I want to show you a little project I have been working on 🙂

The project:

My father was searching for a way to watch videos and pictures on his big TV screen. (To watch YouTube Videos or show family pictures to his friends, etc.) Since his TV is not the newest one and I wanted to keep it as simple as possible for him I came up with this idea:

Use a tablet PC as the core component and a Wireless display dongle to mirror the tablet PCs screen. This way the tablet PC is both: The computer and the remote control.

Here is the hardware I used:

TrekStor SurfTab wintron 7.0 as the tablet PC.

VicTsing 2,4 G HDMI Miracast Dongle as the Wireless display dongle.


How I did it:

As you may know many tablet PCs have a “Windows Key” which, in my opinion, is not very useful in its default state. It opens the Windows Start Menu like every normal Windows Key on a standard keyboard but how often do you need this on a tablet? (It makes more sense on tablet PCs which have a hardware keyboard because you can use keyboard shortcuts but most of the cheap tablet PCs do not have a hardware keyboard.) So I thought: Why not reuse it for an other purpose? So I used AutoHotkey to remap the Windows Key to a custom script I wrote. (I got this idea after reading this post on stackoverflow. The user jaredbaszler published a great AutoHotkey script to connect to a specific Wireless display dongle which inspired me to write my own AutoHotkey script for this project.)

And here is the script which will connect our tablet PC to our Wireless display dongle: (Please keep in mind that this script will only work as expected if you have only 1 Wireless display dongle up and running. If you have multiple Wireless display dongles please have a look at jaredbaszler´s script here.)

Send #k ; Sends Windows button + K to open the Action Center Connect window
Sleep, 3000 ; Wait some time so the wireless display dongle can be found
Send {Enter} ; Send ENTER key to connect to wireless display dongle (works when only 1 is found)
Send {Esc} ; Send ESC key to close the Action Center Connect window

This is what the script does:

Every time the user touches the Windows Key it will do the following:

  1. First it will press WIN+K which will open the Action Center Connect window
  2. Then it will wait for 3 seconds so that the wireless display dongle can be found (You can adjust this value as you please but I needed to wait more than 2 seconds for my wireless display dongle to show up)
  3. After the wait it will press ENTER which will automatically choose the first wireless display dongle in the list and trigger the connect function (If no wireless display dongles can be found your Default Browser will open the “Help” link)
  4. The last thing the script does is to press the ESC key to close the Action Center

Please keep in mind that this will always result in connecting to the Wireless display dongle which shows up first in the Connect window. If you are already connected to a Wireless display dongle touching the Windows Key again will result in a disconnect. (I copied the explanation from my answer from stackoverflow to save some time.)

Automate the script:

The last thing we need to do is to run the script every time the user logs on. I did it by configuring a new Task in the Task Scheduler.

Choose a name for your Task.

Now choose a Trigger. (I chose to run the Task at user log on.)


Now simply choose the ActionStart a program” and set the path to your script.


Next have a look at the Conditions. You will want to uncheckStart the task only if the computer is on AC power.“. Most of the time your tablet PC will not be connected to your power supply when you use it.


The Settings tab will allow you to define the behavior of your Task.


Click on OK and you are ready to go.

Tip: If you do not want to install AutoHotkey on your tablet PC you can convert your scripts to executable files by following this guide here.

Well, that´s it. I hope you liked my post and I hope to see you next time 🙂



Tagged ,