Page 1 of 1

Surface Pen tool input events

Posted: 22 May 2018, 14:55
by JusticeFrangipane
Hello guys,

I'm trying to find ways to change what happens when I use the eraser when it's on the screen. is it possible to lock the event that causes the erase action basically so the eraser would draw instead of erase or send whatever key I want?

I'm using AHKHID to grab the Pen events. It works for everything fine, but it can't block the erase action from happening. is there a way to override the erase function.


it may be too much information but the reason this is important is the 3rd button on the Wacom bamboo ink pen sends the erase action meant for the surface pen eraser when the 3rd button is down in conjunction with the Pen tip.

thank you guys, :D

Justice

Re: Surface Pen tool input events

Posted: 24 May 2018, 05:54
by evilC
There is no such thing as an "Eraser" button from a hardware perspective.
That is a feature of the driver, so you will not see it via AHKHID, and you certainly will not be able to alter it in any way with AHKHID, or stop what gets sent from the hardware to the driver/OS.
AutoHotInterception, however, WILL allow you to mutate the input from the hardware, **before** the OS sees it.
You need "Subscription Mode", NOT "Context Mode". Also, when trying to fake button events from a tablet, you need to use the SendMouseButtonEventAbsolute method, as button events for absolute devices (Tablets, light guns) can also contain positional information.