Surface Pen Button or the Eraser comes with some predefined actions–Single Click, Double and then Holding it. All this can be customized to launch apps, take screenshots, and so on using the Surface App. Here is how to remap Surface Pen button actions.
How to Remap Surface Pen Button Actions
Now, if you want to change it something which you do more often, like going back to the previous page when using the browser, simulating right-click anywhere, it can be done using the popular AutoHotKey Script. Here is what Surface Button uses when you press the eraser, and you will need to swap it with what you want to do:
- F20 = Single Click
- F19 = Double Click
- F18 = Hold the eraser down
How to Create AutoHotKey Scripts:
First, download AutoHotKey software from here. Next open notepad, add your script, and then save it as “.ahk” file. So if you are planning to simulate Go Back, save it as “gobackSP.ahk”, where SP is for Surface Pen. Next, launch the AHK software, pick up the AHK file you just saved, and convert it into the .exe file with the same name. Run that file.
Once you run it, it will always keep running in your system tray, and keep polling for the Surface Button One Click.
v1: simulating a mouse back button
v2: simulating pressing “alt+left” (Go Back)
Next, you will need to find scripts based on your usage, and use them with the Surface Pen. A lot can be done with three-button actions in place, and I will suggest you to explore AHK Forums to find them. One button hotkey that is yet to be explored is the button on the side of the Surace Pen. As an example, it used in Paint App to switch between two colors.
Surface app customization
If you are not comfortable with AHK scripts, you can use the Surface App. The app allows one to adjust the sensitivity of the pen, and change the behavior of the top button of the pen. The app is primarily for Surface users, which can customize many other parts of Surface.
Windows 10 Device Settings
Windows 10 Device settings for Pen offers one to change button actions. You can go to Settings > Device > Pen and Windows Ink. Click on it, and it will list the Surface Pen.
Here you can change what happens on single click, double click or when you press and hold the button.