Add notice if service disabled: "Touch Keyboard and Handwriting Service" #10976

Closed
opened 2026-01-31 02:35:14 +00:00 by claunia · 15 comments
Owner

Originally created by @benfavre on GitHub (Oct 11, 2020).

Originally assigned to: @zadjii-msft on GitHub.

Re #4448
If the service "Touch Keyboard and Handwriting Service" is not available, a notice should be displayed with a link to a README or the open unresolved issue.

Originally created by @benfavre on GitHub (Oct 11, 2020). Originally assigned to: @zadjii-msft on GitHub. Re #4448 If the service "Touch Keyboard and Handwriting Service" is not available, a notice should be displayed with a link to a README or the open unresolved issue.
Author
Owner

@DHowett commented on GitHub (Oct 11, 2020):

I’m not sure Terminal can really detect this unless it’s running as administrator ☹️

@DHowett commented on GitHub (Oct 11, 2020): I’m not sure Terminal can really detect this unless it’s running as administrator ☹️
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Oct 12, 2020):

In Windows 10.0.19041.508, the security descriptor of TabletInputService grants INTERACTIVE (IU) these access rights on the service:

  • SERVICE_QUERY_CONFIG = 0x0001 (CC)
  • SERVICE_QUERY_STATUS = 0x0004 (LC)
  • SERVICE_ENUMERATE_DEPENDENTS = 0x0008 (SW)
  • SERVICE_INTERROGATE = 0x0080 (LO)
  • SERVICE_USER_DEFINED_CONTROL = 0x0100 (CR)
  • READ_CONTROL = 0x00020000 (RC)

I imagine Windows Terminal would normally have INTERACTIVE in its token. SERVICE_QUERY_CONFIG lets QueryServiceConfig check whether the service is disabled. SERVICE_QUERY_STATUS lets QueryServiceStatus check whether the service is running. If Windows Terminal cannot open the service control manager or the service for some reason, then just write telemetry and don't warn the user.

C:\>sc.exe GetDisplayName TabletInputService
[SC] GetServiceDisplayName SUCCESS
Name = Touch Keyboard and Handwriting Panel Service

C:\>sc.exe sdshow TabletInputService

D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RP;;;WD)

C:\>sc.exe qc TabletInputService
[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: TabletInputService
        TYPE               : 20  WIN32_SHARE_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : C:\WINDOWS\System32\svchost.exe -k LocalSystemNetworkRestricted -p
        LOAD_ORDER_GROUP   : PlugPlay
        TAG                : 0
        DISPLAY_NAME       : Touch Keyboard and Handwriting Panel Service
        DEPENDENCIES       : RpcSs
        SERVICE_START_NAME : LocalSystem

C:\>sc.exe query TabletInputService

SERVICE_NAME: TabletInputService
        TYPE               : 30  WIN32
        STATE              : 4  RUNNING
                                (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0
@KalleOlaviNiemitalo commented on GitHub (Oct 12, 2020): In Windows 10.0.19041.508, the security descriptor of TabletInputService grants INTERACTIVE (IU) these [access rights on the service](https://docs.microsoft.com/windows/win32/services/service-security-and-access-rights#access-rights-for-a-service): - SERVICE_QUERY_CONFIG = 0x0001 (CC) - SERVICE_QUERY_STATUS = 0x0004 (LC) - SERVICE_ENUMERATE_DEPENDENTS = 0x0008 (SW) - SERVICE_INTERROGATE = 0x0080 (LO) - SERVICE_USER_DEFINED_CONTROL = 0x0100 (CR) - READ_CONTROL = 0x00020000 (RC) I imagine Windows Terminal would normally have INTERACTIVE in its token. SERVICE_QUERY_CONFIG lets QueryServiceConfig check whether the service is disabled. SERVICE_QUERY_STATUS lets QueryServiceStatus check whether the service is running. If Windows Terminal cannot open the service control manager or the service for some reason, then just write telemetry and don't warn the user. ``` C:\>sc.exe GetDisplayName TabletInputService [SC] GetServiceDisplayName SUCCESS Name = Touch Keyboard and Handwriting Panel Service C:\>sc.exe sdshow TabletInputService D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RP;;;WD) C:\>sc.exe qc TabletInputService [SC] QueryServiceConfig SUCCESS SERVICE_NAME: TabletInputService TYPE : 20 WIN32_SHARE_PROCESS START_TYPE : 2 AUTO_START ERROR_CONTROL : 1 NORMAL BINARY_PATH_NAME : C:\WINDOWS\System32\svchost.exe -k LocalSystemNetworkRestricted -p LOAD_ORDER_GROUP : PlugPlay TAG : 0 DISPLAY_NAME : Touch Keyboard and Handwriting Panel Service DEPENDENCIES : RpcSs SERVICE_START_NAME : LocalSystem C:\>sc.exe query TabletInputService SERVICE_NAME: TabletInputService TYPE : 30 WIN32 STATE : 4 RUNNING (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0 ```
Author
Owner

@zadjii-msft commented on GitHub (Oct 15, 2020):

More docs

@zadjii-msft commented on GitHub (Oct 15, 2020): More docs * [OpenSCManager](https://docs.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-openscmanagera) * [OpenService](https://docs.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-openservicea) * [QueryServiceConfig](https://docs.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-queryserviceconfiga)
Author
Owner

@DHowett commented on GitHub (Oct 16, 2020):

I'm usually against stuff like this, because we have no way of knowing all of the random conditions that might result in an issue. If we try to detect them all and provide UI about it, we'll go mad.

This one, however. This one comes up routinely. This one comes up enough that we should use an InfoBar or something more obtrusive and smack the user with a warning that terminal won't work properly for them.

We can, by necessity, only do this in the Win32 builds (not the UWP builds)... but I'm betting that's the only place there's an issue 😄

Thanks for the suggestion, and thanks @KalleOlaviNiemitalo for the research.

@DHowett commented on GitHub (Oct 16, 2020): I'm usually against stuff like this, because we have no way of knowing all of the random conditions that _might_ result in an issue. If we try to detect them all and provide UI about it, we'll go mad. This one, however. This one comes up routinely. This one comes up enough that we should use an InfoBar or something more obtrusive and smack the user with a warning that terminal won't work properly for them. We can, by necessity, only do this in the Win32 builds (not the UWP builds)... but I'm betting that's the only place there's an issue :smile: Thanks for the suggestion, and thanks @KalleOlaviNiemitalo for the research.
Author
Owner

@ghost commented on GitHub (Nov 11, 2020):

:tada:This issue was addressed in #8095, which has now been successfully released as Windows Terminal v1.4.3141.0.🎉

Handy links:

@ghost commented on GitHub (Nov 11, 2020): :tada:This issue was addressed in #8095, which has now been successfully released as `Windows Terminal v1.4.3141.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.4.3141.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Nov 11, 2020):

:tada:This issue was addressed in #8095, which has now been successfully released as Windows Terminal Preview v1.5.3142.0.🎉

Handy links:

@ghost commented on GitHub (Nov 11, 2020): :tada:This issue was addressed in #8095, which has now been successfully released as `Windows Terminal Preview v1.5.3142.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.5.3142.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@download13 commented on GitHub (Nov 18, 2020):

Is there any way to turn off the warning? I'm aware of the issue, but it works fine for me with the service off and I don't want to have to click past the warning every time

@download13 commented on GitHub (Nov 18, 2020): Is there any way to turn off the warning? I'm aware of the issue, but it works fine for me with the service off and I don't want to have to click past the warning every time
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Nov 18, 2020):

Is there any way to turn off the warning?

Windows Terminal has no such setting. According to https://github.com/microsoft/terminal/pull/8095#issuecomment-718909607, you are expected to leave the service enabled.

Hypothetically, if Windows Terminal were not able to open the service for SERVICE_QUERY_STATUS access, then that would disable the warning. I can think of a few ways to achieve that but they seem likely to cause problems elsewhere.

@KalleOlaviNiemitalo commented on GitHub (Nov 18, 2020): > Is there any way to turn off the warning? Windows Terminal has no such setting. According to <https://github.com/microsoft/terminal/pull/8095#issuecomment-718909607>, you are expected to leave the service enabled. Hypothetically, if Windows Terminal were not able to open the service for SERVICE_QUERY_STATUS access, then that would disable the warning. I can think of a few ways to achieve that but they seem likely to cause problems elsewhere.
Author
Owner

@piscisaureus commented on GitHub (Nov 18, 2020):

Is there any way to turn off the warning? I'm aware of the issue, but it works fine for me with the service off and I don't want to have to click past the warning every time

I would really appreciate that too.
I have the service in question disabled for a reason: enabling it makes keyboard lag unbearable(*). And I don't use touch text input anyway, so there's no reason to leave it enabled.

(*): Unsurprising: the service causes ctfmon.exe to be started and stopped every time a key is pressed. Solving that would be even better than a no-warning flag...

@piscisaureus commented on GitHub (Nov 18, 2020): > Is there any way to turn off the warning? I'm aware of the issue, but it works fine for me with the service off and I don't want to have to click past the warning every time I would really appreciate that too. I have the service in question disabled for a reason: enabling it makes keyboard lag unbearable(*). And I don't use touch text input anyway, so there's no reason to leave it enabled. (*): Unsurprising: the service causes ctfmon.exe to be started and stopped every time a key is pressed. Solving that would be even better than a no-warning flag...
Author
Owner

@levicki commented on GitHub (Dec 24, 2020):

This one, however. This one comes up routinely. This one comes up enough that we should use an InfoBar or something more obtrusive and smack the user with a warning that terminal won't work properly for them.

@DHowett

Can you please explain why Windows Terminal wouldn't run without Touch Keyboard and Handwriting Service except for those users who don't have a physical keyboard (such as those using tablets or kiosks)?

Also, could you please explain your "smack the user" attitude? It sounds really condescending.

In my opinion as a seasoned Windows developer, throwing a warning (and the one that cannot be disabled/dismissed after being seen once) is always (ab)used as an easy way out of designing a proper solution to the actual problem.

Problem:
Users with no physical keyboard cannot use application which requires keyboard input if service providing virtual keyboard is disabled.

Solution:
IF:

  • running on a device that has no physical keyboard attached (easy to check)
  • Touch Keyboard service is disabled (easy to check, already done)
  • warning wasn't already shown or is disabled in settings (one DWORD registry key and one bool setting in JSON)

THEN:

  • Show the warning
  • Remember it has been shown in the registry

END.

Problem solved, properly.

@levicki commented on GitHub (Dec 24, 2020): > This one, however. This one comes up routinely. This one comes up enough that we should use an InfoBar or something more obtrusive and smack the user with a warning that terminal won't work properly for them. @DHowett Can you please explain why Windows Terminal wouldn't run without Touch Keyboard and Handwriting Service except for those users who don't have a physical keyboard (such as those using tablets or kiosks)? Also, could you please explain your "smack the user" attitude? It sounds really condescending. In my opinion as a seasoned Windows developer, throwing a warning (and the one that cannot be disabled/dismissed after being seen once) is always (ab)used as an easy way out of designing a proper solution to the actual problem. **Problem:** Users with no physical keyboard cannot use application which requires keyboard input if service providing virtual keyboard is disabled. **Solution:** IF: - running on a device that has no physical keyboard attached (easy to check) - Touch Keyboard service is disabled (easy to check, already done) - warning wasn't already shown or is disabled in settings (one DWORD registry key and one bool setting in JSON) THEN: - Show the warning - Remember it has been shown in the registry END. Problem solved, properly.
Author
Owner

@levicki commented on GitHub (Dec 24, 2020):

MAINTAINER EDIT:

Please don't follow these steps. You're more than likely to cause some unintended side effects by removing this service. You've been warned.

Original post contents

@download13

If you really can't wait for Microsoft to get smarter about the way it smacks users in the face you can do this:

  1. Make sure Touch Keyboard service is stopped and disabled.
  2. Export HKLM\System\CurrentControlSet\Services\TabletInputService registry key to a file (say TabletInputService.reg).
  3. Open command prompt as an Administrator and run sc delete TabletInputService.

That's it, Windows Terminal won't show a warning anymore.

In case you later decide you need the service back, you can import it from the file you made in step 2. However, keep in mind that restoring registry keys like that will not restore their original security permissions, so the service or anything else that relies on security permissions might not work and you might end up having to reinstall Windows to fix it.

@levicki commented on GitHub (Dec 24, 2020): ### MAINTAINER EDIT: Please don't follow these steps. You're more than likely to cause some unintended side effects by removing this service. You've been warned. <details> <summary> Original post contents </summary> @download13 If you really can't wait for Microsoft to get smarter about the way it smacks users in the face you can do this: 1. Make sure Touch Keyboard service is stopped and disabled. 2. Export `HKLM\System\CurrentControlSet\Services\TabletInputService` registry key to a file (say `TabletInputService.reg`). 3. Open command prompt as an Administrator and run `sc delete TabletInputService`. That's it, Windows Terminal won't show a warning anymore. In case you later decide you need the service back, you can import it from the file you made in step 2. However, keep in mind that restoring registry keys like that will not restore their original security permissions, so the service or anything else that relies on security permissions might not work and you might end up having to reinstall Windows to fix it. </details>
Author
Owner

@LinuxOnTheDesktop commented on GitHub (Mar 14, 2021):

Should the notice informing the user of the strange and uncheerful fact at issue inform the user of the further strange and uncheerful fact that, as per #4448, the user must also reboot?

@LinuxOnTheDesktop commented on GitHub (Mar 14, 2021): Should the notice informing the user of the strange and uncheerful fact at issue inform the user of the further strange and uncheerful fact that, as per #4448, the user must also reboot?
Author
Owner

@shiomiyan commented on GitHub (Apr 18, 2021):

I have read through the thread.
But please, please, please add a way to not give a warning :(

@shiomiyan commented on GitHub (Apr 18, 2021): I have read through the thread. But please, please, please add a way to not give a warning :(
Author
Owner

@zadjii-msft commented on GitHub (Apr 18, 2021):

There's a PR like, right above your comment that adds support for disabling the warning:
image

The setting is:

// If disabled, don't show warning if 'Touch Keyboard and Handwriting Panel Service' disabled.
"inputServiceWarning": false,
@zadjii-msft commented on GitHub (Apr 18, 2021): There's a PR like, right above your comment that adds support for disabling the warning: ![image](https://user-images.githubusercontent.com/18356694/115142120-9e892200-a005-11eb-9494-2e856d86e0d7.png) The setting is: ```jsonc // If disabled, don't show warning if 'Touch Keyboard and Handwriting Panel Service' disabled. "inputServiceWarning": false, ```
Author
Owner

@Soromeister commented on GitHub (Sep 12, 2021):

The setting is:

// If disabled, don't show warning if 'Touch Keyboard and Handwriting Panel Service' disabled.
"inputServiceWarning": false,

Thank you!

@Soromeister commented on GitHub (Sep 12, 2021): > The setting is: > > ```js > // If disabled, don't show warning if 'Touch Keyboard and Handwriting Panel Service' disabled. > "inputServiceWarning": false, > ``` Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10976