Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
; This AutoHotKey script remaps single- and double-click actions
; of your Surface Pen to PageUp and PageDown respectively, while
; you're using Firefox or Chrome. This will let you use the pen
; as a presenter's controller while you're showing slideshows
; from Google Docs.
; AHK syntax is pretty weird, but if you've got questions
; or ideas for improvement, email me at
#If WinActive("ahk_exe chrome.exe") || WinActive("ahk_exe firefox.exe")
; Remap F20, the single-click of pen button, to PgDn.
Send {PgDn}
Sleep 100
; Remap F19, the double-click from the pen button to PgUp.
Send {PgUp}
Sleep 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment