Month: August 2015

Turing my Surface Pen into a presenter tool

I’ve finally replaced my Lenovo W540 laptop with an Surface Pro 3, and I love it! There is just one catch. The single USB port is always in use, and my Presenter tool is using just that. So a small hope started growing in me; Can I use my Surface Pen as a Presenter tool?

A few Bing searches later, and AutoHotkey is my new favorite tool. It allows us to write scripts that executes based on, well, hotkeys. Another quick search teached me that the Top button sends keystroke F19 and F20. Double-click is F19 and a single click is F20.

After some minutes with the AutoHotkey Help document the following script was born

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#IfWinActive ahk_class screenClass
#F20::
  Send, {Right}
Return

#F19::
  Send, {Left}
Return

Thanks to the #IfWinActive line, the pen also works as it’s suposed to do while not presenting.

That’s it. Now I’m able to go forward and backward in a presentation by clicking the Surface Pen Top button. A few tests shows that the range is up to about 10 meters, so most stages should be covered.

To get started yourseft, please make http://www.autohotkey.com/ a visit 🙂