0
votes

I have written my own UI framework in OpenGL, and am porting to Windows Universal Platform. At times, I need to show the soft input keyboard when the computer is in Tablet Mode when a user taps in one of my custom text boxes (NOT a XAML TextBox). Is there a way do this without a XAML TextBox?

Currently the app works by listening to the CharacterReceived event, but that only works with an attached keyboard.

I have also tried the following with no success:

Windows::UI::ViewManagement::InputPane^ ip = Windows::UI::ViewManagement::InputPane::GetForCurrentView();
bool result = ip->TryShow();
1
InputPane.TryShow() does nothing in Tablet Mode on Windows 10.user1054922
Did you disconnect the physical keyboard before testing it? It only works when physical keyboard is not connected AFAIK.Sunius
Yep. The result of the method is still 'false'. In the InputPane documentation, it says: Note In some cases, overlay UI such as an InputPane is not fully supported. This includes: Microsoft DirectX apps in full-screen mode.user1054922
The software keyboard will not show if there is a keyboard attached.Xie Steven

1 Answers

0
votes

As far as I know, InputPane is the method to use for a Windows Phone. For a tablet, the touch keyboard sample shows how to implement what I believe you're trying to achieve.

Note also, from that same page:

In Windows 10, the touch keyboard will not display automatically if a hardware keyboard is connected, or the PC is in Desktop mode and "Automatically show the touch keyboard in windowed apps when there is no keyboard attached to your device" in Settings -> Devices -> Typing is disabled.