Remap stylus button to erase until release

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
hirokami
Posts: 1
Joined: 24 Jun 2018, 03:36

Remap stylus button to erase until release

24 Jun 2018, 03:48

Hi guys. I'm new about AutoHotkey but I know I can remap my stylus pen in order to use it like an original Surface pen. With my graphic tablet pen I can't erase with one of the two buttons. What I want is to use the rubber tool when I keep down one of them and to return to the last tool used when I release it.

I don't know how to do this, so hope somebody can give me the help I really need :)
Thank you ;)
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Remap stylus button to erase until release

25 Jun 2018, 07:36

It's hard to know without knowing what signals need to be remapped. I am guessing it is maybe a right-click or something from the "mouse" device that represents the stylus.
This could be further complicated if you need to remap the stylus buttons but not the buttons on your normal mouse - AHK does not support "device specific" remappings.
If you can work out what it is about the mouse device that needs to be changed, and need to do it on a per-device basis, then I have code that may be able to do it - see AutoHotInterception in my signature. If you have access to a surface still, and run the AHI Monitor demo on both systems, then it could maybe tell you what button events the surface sends and what the stylus sends.
Given that information, I could maybe help you rig up what you want using AHI - I have a wacom type tablet myself with a standard two-button rocker setup, so I guess that vaguely matches your stylus, so I can maybe replicate what you want, as long as I knew what it was that the surface sent.
lampdoors
Posts: 5
Joined: 11 May 2020, 10:53

Re: Remap stylus button to erase until release

11 May 2020, 18:05

Hi, I actually want to do the same as the OP. I was able to get the Monitor script up and running but it's not detecting any input from my tablets. It only lists keyboards and mice right now. Could it just be impossible for AutoHotInterception?
AutoHotkey_XJL0fCdLgq.png
AutoHotkey_XJL0fCdLgq.png (49.82 KiB) Viewed 711 times

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ntepa and 249 guests