DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Toggle Touch Screen  (Read 24,951 times)

ebennetthill

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 21
Toggle Touch Screen
« on: September 22, 2011, 02:04 AM »
I am using a ThinkPad x220 Tablet with Windows 7 at my school. It has a touch screen which has some usefulness, but often it is an annoyance when I use the stylus for input. Hand touches just mess up the screen when I'm trying to write with the stylus.

There is a control panel control item to turn it off, but I was wondering if someone might create an AHK script to access that function and turn it into a tray item and a hotkey to toggle the touch screen and make it easy to use it as I want, when I want.

I have a lot of friends who would also find this useful and appreciate it.

4wd

  • Pedantic Old Bastard
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,652
    • Coding Snacks
Re: Toggle Touch Screen
« Reply #1 on: September 22, 2011, 05:03 AM »
This might be a rather silly question, (not having a tablet I'm allowed at least one though), but if you turn off the touch screen how is the stylus going to work?

Doesn't it rely on the touch screen for positioning?

Otherwise, if you want a suggestion: Use Ath' WinButton program and devcon.  Create one button to disable the touch screen device and another to re-enable it.
"I will not follow where the path may lead, but I will go where there is no path, and I will leave a trail." - Muriel Strode, 1903

ebennetthill

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 21
Re: Toggle Touch Screen
« Reply #2 on: September 22, 2011, 05:47 PM »
What a silly question!!
Just kidding. You couldn't know unless you've had one to mess with.
The laptop must have different drivers to control the inputs, because the stylus touch and inking is totally separate from the finger touch. Finger touch can be turned on or off, but the stylus always is working.
I'll check out the programs you suggested.
Thanks

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Toggle Touch Screen
« Reply #3 on: September 22, 2011, 06:28 PM »
This sounds like a really good idea to me.  Maybe you can try to find if the control panel item has any documentation somewhere that would explain WHAT it actually does when it disables touch screen interaction.

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: Toggle Touch Screen
« Reply #5 on: September 22, 2011, 08:00 PM »
This sounds like a really good idea to me.  Maybe you can try to find if the control panel item has any documentation somewhere that would explain WHAT it actually does when it disables touch screen interaction.

I looked in the usual lists of control panel applet names.  Nothing for touch screen.  I see skwire found the registry setting though.

I did see on one board somebody setting the touch screen service to manual.  Supposedly then it could be stopped and started.  In that case sc.exe service control may be all that's needed to toggle it.  Of course the machine is needed to try it.  Still may need to send the notification msg if the system doesn't do it for you.

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: Toggle Touch Screen
« Reply #6 on: September 22, 2011, 09:55 PM »
Good find, MilesAhead.  If it turns out to be as simple as starting and stopping a service, that would be a piece of cake to code.

@ebennetthill: Could you please check your services control panel (Start, Run box, services.msc) list for a Touch Input service of some sort?  I don't have a Win7 tablet so I'm not sure of the exact name you'll be looking for.  Once you've found that, stop the service and check your functionality.  Then start the service again and see if the functionality returns.  Let us know what you find.  Thanks.
« Last Edit: September 22, 2011, 10:01 PM by skwire »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: Toggle Touch Screen
« Reply #7 on: September 22, 2011, 10:11 PM »
Good find, MilesAhead.  If it turns out to be as simple as starting and stopping a service, that would be a piece of cake to code.

@ebennetthill: Could you please check your services control panel (Start, Run box, services.msc) list for a Touch Input service of some sort?  I don't have a Win7 tablet so I'm not sure of the exact name you'll be looking for.  Once you've found that, stop the service and check your functionality.  Then start the service again and see if the functionality returns.  Let us know what you find.  Thanks.

I should have saved the url, but I was looking for the applet name.  Iirc the person said he had to first set the service to Manual before he could toggle it off and on. Don't know why that would be.  I don't have one to try it myself. :)

ebennetthill

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 21
Re: Toggle Touch Screen
« Reply #8 on: September 23, 2011, 01:03 AM »
Skwire

I found a service called Wacom ISD Touch Service. Checking the service was a little weirder than I expected.

1. Service started and Touch enabled in Control Panel (Pen and Touch Applet): Touch is like a mouse cursor and I can drag the screen to scroll
2. Service stopped and Touch enabled in Control Panel: Touch is like a mouse cursor (open/close program, move scroll bar, etc.), no drag to scroll
3. Service stopped and Touch disabled in Control Panel: Touch is like a mouse cursor, no drag to scroll
4. Service started and Touch disabled in Control Panel: No Touch

So...
No service: touch works, but just like a mouse cursor
Service enabled: touch is turned on or off by control panel

ebennetthill

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 21
Re: Toggle Touch Screen
« Reply #9 on: September 23, 2011, 01:19 AM »
I just read what MilesAhead was saying about setting the service to manual. (type first, read later)

I just changed mine from automatic to manual, and for my machine, it made no difference. I saw the same patterns as before.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: Toggle Touch Screen
« Reply #10 on: October 02, 2011, 03:18 AM »
This page has some stuff about pen and touch tablet settings.  I don't know how useful it is:

http://www.webtlk.com/the-definitive-windows-7-commands-guide/

ebennetthill

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 21
Re: Toggle Touch Screen
« Reply #11 on: October 03, 2011, 03:14 PM »
Thanks. Always good to see these kind of pages. I've got it bookmarked now.
That would allow me to make a macro with AutoHotKey to start the Control Panel applet and toggle the touch screen.
I'm still interested in an application that might work "behind th scenes" to do this. I'll let you know if I come across anything.

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: Toggle Touch Screen
« Reply #12 on: October 03, 2011, 03:32 PM »
I'm still interested in an application that might work "behind th scenes" to do this. I'll let you know if I come across anything.

Part of the issue here is that I don't think any of us coders have a tablet to work/test with.  That makes it very difficult to provide you with a solution.  :(

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: Toggle Touch Screen
« Reply #13 on: October 03, 2011, 08:36 PM »
I'm still interested in an application that might work "behind th scenes" to do this. I'll let you know if I come across anything.


Part of the issue here is that I don't think any of us coders have a tablet to work/test with.  That makes it very difficult to provide you with a solution.   :(



Also there used to be quite a bit of IBM "user written software" floating around on the web.  If you could find a ThinkPad forum or just search there may be some utility written by an IBM employee as a hobby, that might be a utility for it.  I remember there was lots of stuff like multiple virtual desktops and that type of thing.  Esp. stuff written in Rexx.

ebennetthill

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 21
Re: Toggle Touch Screen
« Reply #14 on: October 04, 2011, 06:34 PM »
Quote
Part of the issue here is that I don't think any of us coders have a tablet to work/test with.  That makes it very difficult to provide you with a solution.  Sad

Yes. I appreciate now that it is a very specialized request. Thanks for all you do around here.

Quote
Also there used to be quite a bit of IBM "user written software" floating around on the web.  If you could find a ThinkPad forum or just search there may be some utility written by an IBM employee as a hobby, that might be a utility for it.  I remember there was lots of stuff like multiple virtual desktops and that type of thing.  Esp. stuff written in Rexx.

Thanks. I'll keep my eyes open for something like this.
I will report if I come across something useful.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,649
    • Participated in NANY Challenge Eleven Times
    • Coding Snacks
    • Linux User
    • Hardware Hacker
Re: Toggle Touch Screen
« Reply #15 on: October 04, 2011, 06:43 PM »
@ebennetthill, have you researched the ThinkVantage software, available with that tablet? It appears to have several configurable tools/options, that might provide you with what you need to achieve what you want. (I read this tip when searching for solutions for this issue, though I don't know anything about that ThinkVantage software.)
/Ton
Ath's software collection, Quote: "A problem well stated is a problem half-solved." (Charles Kettering)

iocus

  • Participant
  • Joined in 2012
  • *
  • Posts: 1
Re: Toggle Touch Screen
« Reply #16 on: January 24, 2012, 12:49 PM »
I use a Fujitsu tablet with both the Pen and touch feature much like the Thinkpad discussed on this thread. I too would be interested in a tray icon that would allow me to switch the touch input off and on with a single click or hotkey. Fujitsu software supplied just opens the tablet PC.cpl to the touch settings tab.

I am currently using Windows 7 x64 and it is my understanding that the touch devices run with windows generic drivers . I did a little investigating and found that the registry value that enables/ disables the touch input is: TouchGate @key HKCU\Software\Microsoft\Wisp\Touch . Also, the process that controls the input devices is wisptis.exe . On my system, this process appears twice, running under the system and again under current user. I killed the process and it came back on its own.

I developed a primitive vb script with the little knowledge I have of logic, a little research, and previous experience developing bat files for win98 as a kid. its pretty straight forward. first, it reads the registry setting for TouchGate then it toggles it between on and off. After it is killed, wisptis.exe restarts on its own. Use it at your own risk. I would like to find more elegant way to accomplish this task. However, I am out of time and need to put this aside as it accomplishes, at least temporarily, what I need.

Please note, I have not found any side effects by terminating the process. However, I would use caution on your system.


Code: (vb)
Dim WshShell, dKey
Set WshShell = WScript.CreateObject("WScript.Shell")

'::reads registry setting::'
dkey = WshShell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Wisp\Touch\TouchGate")

'::toggles registry key setting between 0(off) and 1(On)'

If dkey = 1 Then
	WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Wisp\Touch\TouchGate", 0, "REG_DWORD"

Else
	WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Wisp\Touch\TouchGate", 1, "REG_DWORD"
End If

'::Kills wisptis.exe process::'

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
    ("Select * from Win32_Process Where Name = 'wisptis.exe'")
For Each objProcess in colProcessList
    objProcess.Terminate()
Next


these links were a lot of help:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394599(v=vs.85).aspx (learned to terminate a service using vb)

http://msdn.microsoft.com/en-us/library/yfdfhz1b.aspx (learned how to make registry tweaks using vb, way easier than cml)

ttfn
iOCUS

Original address: https://www.donationcoder.com/forum/index.php?topic=28122.0