5

I have a WPF application written in .NET 4.6.1 used on tablets. When I focus a textbox, TabTip virtual keyboard is automatically invoked when:

  • tablet mode is turned on and focus is made with touch or stylus
  • tablet mode is turned off, Show the touch keyboard when not in tablet mode and there's no keyboard attached setting is turned on and focus is made with touch or stylus
  • tablet mode is turned off, Show the touch keyboard when not in tablet mode and there's no keyboard attached setting is turned off and focus is made with stylus (not with touch)

I need to disable this behavior.

So far I used following workaround to disable automatic keyboard invocation:

class MyTextBox : TextBox
{
    protected override AutomationPeer OnCreateAutomationPeer()
    {
        return new FrameworkElementAutomationPeer(this);
    }
}

Since Windows 10 version 1803 (April 2018 Update) - possibly even since 1709 (Fall Creators Update), but I cannot confirm that now - this doesn't work anymore and keyboard is always invoked.

Is there a way how can I prevent showing TabTip automatically in newest Windows 10 in my application?

Although it's not ideal (it affects whole system), I also tried to disable the Touch Keyboard and Handwriting Panel Service as described here. But on 1803 the service keeps starting itself as soon as the keyboard is invoked, e.g. from taskbar button.

Stalker
  • 678
  • 1
  • 9
  • 21
  • Does the rest of the system still need to use the keyboard? After some playing around with tabtip.exe, it's a perfectly normal exe with some 'single instance' logic. If you can kill it system-wide, you could replace tabtip.exe with DoesNothing.exe. I'm experimenting with triggering "Process.GetProcessesByName("TabTip")(0).Kill()" on every textbox getfocus :P – Davesoft Jun 28 '18 at 15:52
  • Yes, rest of the system should still be able to use the keyboard. Ideally, I need to disable it only in my app. Somehow acceptable solution: disabling autoshowing system wide, but user should still be able to manually invoke the keyboard (via taskbar button). Killing TabTip process on getfocus is certainly possible, but it doesn't look nice (keyboard is "flashing"). I still hope there's better way. – Stalker Jun 28 '18 at 16:47

0 Answers0