How to turn off touchscreen earlier when stylus gets detected?

1

I have an HP convertible with stylus input. The windows options offer the function to turn off touchscreen, when the stylus is near enough to the touchscreen.

My problem is, that it only switches the touchscreen off, when the stylus is like 1-2cm hovering over the screen, so my hand always gets detected first by the touchscreen and messes everything up.

I know that my convertible detects the stylus earlier, because i can scroll with it when its 5cm away.

I started searching the web and found "devcon" from microsoft which allows me to turn on and off devices. Now I need a script or command which gives me the parameters from the stylus, so i can turn off the touchscreen as stylus gets detected. Maybe there is also the possibility that there are variables in the windows registry (from the option in settings, to turn off the touch when stylus is near enough) which i can change.

I really need help there, because i want to write everything with stylus in university!

To summarize I want the touch to turn off as soon as the stylus is detected (at +5cm than 2cm).

My attempts, effort and research

So I found a variable in the registry at "HKLM\SOFTWARE\Microsoft\Palm\DelayManipulationDuration" which sets the delay of turning off the touchscreen when stylus gets detected. It was set to 250ms, so I changed it to 50ms.

The devcon commands are pretty simple for deactivating:

D:
cd Windows Kits\10\Tools\x64
devcon disable "@HID\ELAN0732&COL01\5&242C8B19&1&0000"

And for reactivating its

D:
cd Windows Kits\10\Tools\x64
devcon enable "@HID\ELAN0732&COL01\5&242C8B19&1&0000"

I put them each in a batch-file and ran them as admin and it works. Without admin it doesn't, but that makes sense.

I also looked into the eventmonitor, but couldn't find something belonging to the Pen, just when i set up my leptop and the drivers got installed. The eventmonitor shows nothing, when the pen gets detected. But it gives me the same adress/ID for the pen as devcon. with devcon i can only show if the driver of the pen is enabled or not, but no further information.

I also found on a microsoft DOC page, that there is a hoverrange, which i think should be changable somehow but nothing found for "hoverrange" in registry.

I hope this helps u guys for the beginning. I'm also researching like a freak :D

Kiljab

Posted 2019-10-22T12:37:51.087

Reputation: 11

Figure out the logic to turn the touch off with devcon as a starting point and post that logic with an [edit]. See if you can google or find in the event viewer the event that occurs when the Stylus is activated and use that as the trigger to disable the touch with devcon. Starting points and quick thoughts. – Pimp Juice IT – 2019-10-22T17:26:54.370

@PimpJuiceIT I did like you said. Maybe it's also an alternative to make a quick-access button (like on iphone) which hovers over all windows to turn on and off touchscreen. But first I want to figure out if we can detect the Pen with you guys. – Kiljab – 2019-10-24T11:35:15.237

Nice job on showing your work!! Maybe I will have time later if you don't get help before then to dig into it for you. – Pimp Juice IT – 2019-10-24T13:07:51.277

No answers