What's new

Any news on customizable pen buttons?

agt499

Member
OMG I want to do EXACTLY that but i have no idea how to use AHK. I've downloaded it and all the technical mumbojumbo scrambles my brain. Can you tell me how you did it? Changing the Pen's lower button to "Go Back" and the top to "Go Forward" would be absolutely PERFECT! Please help. Thank You
Hi there.
Just to clarify for you, what I have had working is using just the top button, as this is the only button that connects by bluetooth. This means I can be standing away from the device and control powerpoint slides.
(For the side buttons, based on what herrkjeldsen has posted above, it looks like you need to hold a side button while tapping the pen to the screen. This wouldn't work as a remote presenter).

I can understand that AHK will scramble your brain - here's a basic set of instructions that might help:
(these should let you go forward with a single click of the purple button, and go back with a double click of the purple button).
  1. Download and install Autohotkey
    Installer from AutoHotkey
    Choose “Express Installation”, and once it's done Choose “Exit”
  2. Create your script
    In File Explorer, go to your Documents folder, Right-click and select “New AutoHotkey Script”.
    Right-click on this file to edit it in Notepad, then add these four lines to the bottom :

    #F20:: Send {Browser_Forward}
    return
    #F19:: Send {Browser_Back}
    return


  3. Save the file, then double-click it in Explorer to run.
    It should now launch desktop Onenote on single-click of the purple pen button, and Snipping Tool on double-click.
  4. If it's working how you want, the only thing left is to add it to your startup:
    Right-click the file in Explorer, and select “Create Shortcut”
    Right-click the windows button on your taskbar and select “Run” (near the bottom), then type “shell:startup” and press OK -this should open your startup folder.
    Drag the shortcut you created above into your startup folder.

Good luck!

 

derpmcturd

New Member
Hi there.
Just to clarify for you, what I have had working is using just the top button, as this is the only button that connects by bluetooth. This means I can be standing away from the device and control powerpoint slides.
(For the side buttons, based on what herrkjeldsen has posted above, it looks like you need to hold a side button while tapping the pen to the screen. This wouldn't work as a remote presenter).

I can understand that AHK will scramble your brain - here's a basic set of instructions that might help:
(these should let you go forward with a single click of the purple button, and go back with a double click of the purple button).
  1. Download and install Autohotkey
    Installer from AutoHotkey
    Choose “Express Installation”, and once it's done Choose “Exit”
  2. Create your script
    In File Explorer, go to your Documents folder, Right-click and select “New AutoHotkey Script”.
    Right-click on this file to edit it in Notepad, then add these four lines to the bottom :

    #F20:: Send {Browser_Forward}
    return
    #F19:: Send {Browser_Back}
    return


  3. Save the file, then double-click it in Explorer to run.
    It should now launch desktop Onenote on single-click of the purple pen button, and Snipping Tool on double-click.
  4. If it's working how you want, the only thing left is to add it to your startup:
    Right-click the file in Explorer, and select “Create Shortcut”
    Right-click the windows button on your taskbar and select “Run” (near the bottom), then type “shell:startup” and press OK -this should open your startup folder.
    Drag the shortcut you created above into your startup folder.

Good luck!
Hello and thank you for the excellent info! And does it matter that I have a Surface Book? I'm guessing the Surface book pen is the same as the regular Surface pens?
 

agt499

Member
Hello and thank you for the excellent info! And does it matter that I have a Surface Book? I'm guessing the Surface book pen is the same as the regular Surface pens?
As far as I know I think they should work the same.
Post back if it doesn't work : I don't have a Surface Book to test (jealous!), but we could probably figure it out.
 

derpmcturd

New Member
Ok i tried it and it completely messed up my keyboard. Like I tried to type "Yahoo" in the browser and when i pressed the letter "a" the Action Center opened up lol. And other letters messed up too, i had to delete the script to return it to normal. lol. Does it matter that im on Windows 10? What you've described though with "Send forward" and "Send back" is exactly what i want lol
 

agt499

Member
Ok i tried it and it completely messed up my keyboard. Like I tried to type "Yahoo" in the browser and when i pressed the letter "a" the Action Center opened up lol. And other letters messed up too, i had to delete the script to return it to normal. lol. Does it matter that im on Windows 10? What you've described though with "Send forward" and "Send back" is exactly what i want lol
Bummer. I'm on Windows 10, so it's not that.

If the letter "a" is launching Action Center, that sounds like something thinks your Windows Key is held down (Win+A is the standard shortcut): the clue would be if typing "e" opened File Explorer and "d" showed the desktop.

Can't imagine what might make that happen, but if I had 1c for every time rebooting windows had fixed something loopy, I would be Bill Gates neighbour.

Other than that, you might need to bounce off and ask a question on the Autohotkey forums - people over there know a lot more than me (I just messed around til it did what I want), and they seem welcoming and helpful.
 

derpmcturd

New Member
Bummer. I'm on Windows 10, so it's not that.

If the letter "a" is launching Action Center, that sounds like something thinks your Windows Key is held down (Win+A is the standard shortcut): the clue would be if typing "e" opened File Explorer and "d" showed the desktop.

Can't imagine what might make that happen, but if I had 1c for every time rebooting windows had fixed something loopy, I would be Bill Gates neighbour.

Other than that, you might need to bounce off and ask a question on the Autohotkey forums - people over there know a lot more than me (I just messed around til it did what I want), and they seem welcoming and helpful.
Yeah I'll definitely have to try that. Thanks a bunch for trying tho!
 

agt499

Member
Wow nice! Ive never made anything like that before so what would i write to make the Surface Book pen's button "go back" and "go forward" for the purposes of easier web browsing? Thanks!
I just had a thought: if it's web forward/back that appeal most, and you're clearly at the computer, how about your keyboard's ALT+Leftarrow for Back and LT+Rightarrow for Forward?
 

Kris

Active Member
I have been using autohotkey and this script for a while, posted few different places. Open notebook, copy red text below, paste in notepad, save notepad document with an .ahk extension to desktop, run shell:startup, and move file to window the run command opened.

#F20::
IfWinNotExist, OneNote
{
Run,C:\Program Files\Microsoft Office\root\Office16\onenote.exe
return
}
IfWinExist, OneNote
{
WinActivate
return
}
#F19::
IfWinNotExist, SnippingTool
{
Run,%windir%\system32\SnippingTool.exe
return
}
IfWinExist, SnippingTool
{
WinActivate
return
}
 

Chuck_IV

Member
I have been using autohotkey and this script for a while, posted few different places. Open notebook, copy red text below, paste in notepad, save notepad document with an .ahk extension to desktop, run shell:startup, and move file to window the run command opened.

#F20::
IfWinNotExist, OneNote
{
Run,C:\Program Files\Microsoft Office\root\Office16\onenote.exe
return
}
IfWinExist, OneNote
{
WinActivate
return
}
#F19::
IfWinNotExist, SnippingTool
{
Run,%windir%\system32\SnippingTool.exe
return
}
IfWinExist, SnippingTool
{
WinActivate
return
}
Only problem with this is when in tablet mode, if you are using windows 10(as it says you are). It will start OneNote in the background but will not bring OneNote to the front and thus it will not recognize it is even running. So subsequent presses of the button, open new copies of OneNote in the background. This also happens when using the aditional options to assign the top button in the surface app. I haven't figured a way to make it come to the front.
 
Search tags for this page
autohotkey surface pen presentation
microsoft surface pen with two side buttons
radial menu surface pro 4
remap surface pen
remap surface pen buttons 2016
surface pen 2 button remapping
surface pen side button
surface pen with photoshop

surface pro 4 pen buttons

surface pro 4 pen customize

Members online

No members online now.
Top