简体   繁体   中英

Disable virtual Keyboard in Windows 10 Tablet Mode for one Application

We wrote a C#/WPF Application for Touch Devices and have allready implemented our own virtual keyboard. Since windows 10 anniversary (or earlier) we have problems with devices in "Tablet Mode". The default OSK opens whenever a input field is focused.

So the question is: Is it possible to disable the integrated OSK inside our application? If not, is possible to disable the OSK for JUST OUR APPLICATION via registry or settings?

I had exactly the same problem. Based on this thread , I managed to disable automatic keyboard (TabTip.exe) invocation by overriding OnCreateAutomationPeer method of TextBox :

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

As pointed out (and explained) in the comments there is no possibility to disable the OSK just for one application. We solved the problem by disabling the service "Touch Keyboard and Handwriting Panel". Currently it seems to be the only solution, although I'm not fully satisfied. It is - at least in our case - a bearable workaround for tablets and convertibles.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM