5

I need to programatically enable/disable the Automatically show the touch keyboard option in Windows 10 with a WPF (not a UWP) like is shown here.

I couldn't find anything. Is there any API I can use from C# or registry key I can modify to enable/disable it?

Community
  • 1
  • 1
Andres
  • 6,080
  • 13
  • 60
  • 110

2 Answers2

5

I ended up using Process Monitor as stated in this answer to detect what registry value was being modified while changing the setting. So to enable/disable the Automatically show the touch keyboard option the registry value you have to change:

HKCU\Software\Microsoft\TabletTip\1.7\EnableDesktopModeAutoInvoke

With a simple command you can enable/disable this:

reg add "HKCU\Software\Microsoft\TabletTip\1.7" /v EnableDesktopModeAutoInvoke /t REG_WORD /d 1 /f

Just change between 1 and 0 to enable/disable it.

Community
  • 1
  • 1
Andres
  • 6,080
  • 13
  • 60
  • 110
0

According to this SO post, you can launch the On Screen Keyboard (OSK) via the code-behind:

    private void TextBox_GotFocus(object sender, RoutedEventArgs e)
    {
        Process.Start("osk.exe");
    }

I tried and tested it with a simple text box and it worked fine. There was another post that complain about the "Cannot start On-Screen Keyboard" but there was not a clear consensus.

If you need a registry setting, there seems to be one, but might not work pragmatically. The details of the registry setting is in this post.

Community
  • 1
  • 1
Taterhead
  • 5,763
  • 4
  • 31
  • 40
  • I don't need the show On Screen Keyboard I basically need to be able to change the Windows settings of the keyboard programatically – Andres Mar 26 '16 at 15:56