0

I want to overwrite my "rubber" button on the Surface Pen with AutoHotKey. My aim is to click my PDF presentation (Left and Right Arrow) with the SurfacePen

Described on many Websites:

https://www.reddit.com/r/Surface/comments/3rftuo/autohotkey_tip_f20_maps_the_single_click_f19_maps/

https://www.wpxbox.com/how-to-remap-surface-pen-button-actions/

I have already tried to use other keys like F1 to get the desired reaction and this is working. Just the keys #F18, #F19 and #F20 (for the rubber button) don't seem to work.

#F19:: Send, {Left}
#F20:: Send, {Right}

Thanks

  • Try to capture the key code of your pen, by running the AutoHotKey tool (right click on AutoHotKey icon) and select "Open". Then select "View"- "Key history". Press your pen keys and then update your screen with F5 to see the actual key codes (at the bottom of the screen). You might try to use these VK/SC codes to trap the buttons. – Robert Ilbrink Sep 10 '19 at 06:07
  • ok, thanks for the Input. It helped in a unexpected way. I figured out, that the script works in the opened AHK window (with Cursor to left and right) but not ouside of it. – user125198 Sep 10 '19 at 15:08

1 Answers1

0

It worked out this way. I am using FoxitReader as PDF Reader

#IfWinActive, ahk_exe FoxitReader.exe
#F18:: Send, {Left}
#F20:: Send, {Right}