Is it possible to change the application opened by the Surface Pro 3's pen button?
Kept stumbling on this answer via Google, so wanted to provide an update for others.
The Lockscreen ClickNote component responsible for implementing this behavior reads registry values AppID and DesktopAppPath located in the key \Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\CN
.
You could tweak those to your liking.
For example, AppID could point to the immersive OneNote via its application id of Microsoft.Office.OneNote_8wekyb3d8bbwe!Microsoft.OneNoteIm
. Or a DesktopAppPath of %SystemRoot%\Notepad.exe
.
But be aware there are some nuances, such as the DesktopAppPath being validated (must point to a file on disk) and passed-in command line arguments (i.e. /hardwareinvoke, /fromlockscreen, and/or /screenclip) depending on when and where the button press took place. [1]
[1] http://withinrafael.com/running-your-own-app-at-the-click-of-the-surface-pen-button/
You can use AutoHotKey (http://www.autohotkey.com/) to intercept the button press and send a different command. The button press is F20.
I have an AutoHotKey script which sends a spacebar command when the purple pen button is clicked and PowerPoint is in fullscreen, to advance the slide. At all other times it launches OneNote. You can make it do whatever you want. It's free.
Example script:
#IfWinExist, ahk_class screenClass
#F20:: Send {Space}