Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Device (Touchscreen) disabler/enabler


  • Please log in to reply
5 replies to this topic
stormi
  • Members
  • 17 posts
  • Last active: Mar 26 2014 01:09 AM
  • Joined: 25 Nov 2012
Ok so here is a little tool I've created to disable & enable the touchscreen but leaving an active stylus working.
I think it should work on most touchscreen Win 8 devices, at least where the touchscreen has the class name "HID-compliant touch screen".
Generally the code can be used to quickly disable & enable any device in the device-manager.
 
It can disable and enable the device with the hotkey "Win + 1" or via double click on the tray icon.

Additional you'll need DevManView and place the .exe in "C:\Windows\System32".

If you want to change the name/ID, run DevManView and search for your device and use it's "Device Name" or "Device Instance ID". For other posibillities check the DevManView website for command-line options.

You can also place the script/exe into autostart so it'll be always aviable.
 
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
; #NoTrayicon
Menu, Tray, Icon, tray.ico,1	; enabled icon
Menu, Tray, NoStandard
Menu, Tray, Add, Toggle Touch, Toggle	; adding tray-icon click option
Menu, Tray, Add, 
Menu, Tray, Standard
Menu, Tray, Default, Toggle Touch

Disabled:=0

Toggle:	; double click tray icon to disable/enable
#1::	; Hotkey to disable/enable
if (Disabled=0) {
Run C:\Windows\System32\DevManView.exe /disable "HID-compliant touch screen"	; path to DevManView and disable device with this name/ID
Disabled:=1
Menu, Tray, Icon , trayd.ico,,1	; disabled icon
ToolTip, Touchscreen disabled	; little tooltip displayed to visualize the current action
SetTimer, RemoveToolTip, 3000
return
}
else {
Run C:\Windows\System32\DevManView.exe /enable "HID-compliant touch screen"	; path to DevManView and enable device with this name/ID
Disabled:=0
Menu, Tray, Icon , tray.ico,,1	; enabled icon
ToolTip, Touchscreen enabled	; little tooltip displayed to visualize the current action
SetTimer, RemoveToolTip, 3000
return
}

RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return
Download script, exe & icons

KeyOh
  • Members
  • 9 posts
  • Last active: Mar 20 2015 08:47 PM
  • Joined: 14 May 2009

Thank you Stormi! Worked awesomely =) Had to install 64bit DevManView to make it work, but great work.



scrambler2011
  • Members
  • 11 posts
  • Last active: Aug 02 2014 04:49 AM
  • Joined: 18 Jul 2014

Thanks for this post, I was just looking for a solution on this.

 

I did notice one problem and I was wondering if you have any idea on the possible reason for it.

 

If I disable the Touch screen with The Devmanview command in the script before entering photoshop, as soon as I try to use the stylus, photoshop crashes.

 

But If I start photoshop before disabling the touch screen, then disable the touch screen while photoshop is open, I can use the stylus in photoshop without any problem.



miffo
  • Members
  • 1 posts
  • Last active: Oct 04 2014 05:58 AM
  • Joined: 03 Oct 2014

hey guys, sound like awesome utility, exactly what i need. Its just not working on my surface pro 3 on windows 8.1. Also installed devmanview too. Still not working. 

image available here:

https://drive.google...iew?usp=sharing

Any help? 

Thank you very much!



lblb
  • Members
  • 120 posts
  • Last active: Dec 02 2015 08:05 AM
  • Joined: 22 May 2012

Hi miffo,

 

That just means that it's not finding the correct HID device to disable. Most probably, it comes from the fact that this script was written for Wacom-based tablets (like the Surface Pro 1 and 2) and not N-Trig tablets (like the Surface Pro 3). I'm gessing that the the name of the HID device for the touchscreen on the SP3 is just not "HID-compliant touch screen". Since  "HID-compliant touch screen" is hard-coded here, you would need to change that part of the code.

 

You can try using Tray Touch Toggle that works similarly but allows you to specify the identity of the HID device. See first post here:

http://forum.tabletp...ablet-pc.56322/



aleder
  • Members
  • 2 posts
  • Last active: Dec 13 2014 03:09 AM
  • Joined: 13 Dec 2014

Is there a way that you don't have to always press allow to make changes when it run. Can it allow automaticly