This is a scripting language designed for Windows to automate some usage. A lot can be accomplished by re-mapping the inputs.
While Windows 10 does allow apps to be loaded by the surface pen, however, these can be messed up and are very limited. What if the pen’s single click was “Copy” and the double-click was “Paste”? Something like this is easily achieved with AutoHotkey.
; remap surface pen button to copy to clip-board
Simple mappings can be achieved with short-syntax, however the surface pen tends to have some problems with this when turing off the hotkeys. More success can be had by using the full syntax and applying the down and off state.
#F20::Run Onenote ; Single click, Open OneNote
This is the beginning of using AutoHotkey. It’s been around for many years and has thousands of options that can be scripted including mouse moving and deep Windows interactions. Check out https://github.com/dantheuber/WinTop-AutoHotKey for one of my favorite ways to keep a window on top with a transparency.