3
votes

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?

2
'and have allready implemented our own virtual keyboard" This is where you went wrong. There was never a good reason to implement your own virtual keyboard, the OS has shipped with one for virtually forever. So the solution is obvious: remove your custom virtual keyboard, and start using the one shipped with the OS. One that the user will be familiar with, one that is guaranteed to be compatible, and one that has been fully debugged even for all corner cases. And one that will get you out of the mess that you're in, for which the answer is "no".Cody Gray
@CodyGray - Our application is a full POS application so the user will never get in touch with Windows. Our keyboard implements furthermore custom functionallities which are vital for our application. But thank you for your comment. A simple "no" would have been more helpfull. The tablet mode is just a corner case for a few users which have tablets with them and sell outdoor.SirBirne

2 Answers

12
votes

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);
    }
}
2
votes

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.