2
votes

I am developing UWP application for windows 10 OS. I need to show touch screen keyboard when user click on a text box.

Following are the requirements.

1.Windows 10 OS

2.Tablet mode off

3.Hardware Keyboard is attached.

I have go through the Microsoft sample https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/TouchKeyboard. But could not find a solution.

I have enabled “show the touch keyboard when not in tablet mode and there’s no keyboard attached” keyboard setting. As it says it only works when there is no hardware keyboard attached.

But I need to show the touch screen keyboard while there is a hardware keyboard as well

I tried to use InputPane as following code sample:

MainPage.xaml

< TextBox x:Name="text1" Width="300" Height="50" ></TextBox>

MainPage.xaml.cs

   {
        this.InitializeComponent();
        text1.AddHandler(TappedEvent, new TappedEventHandler(text1_Tapped), true);
   }


 private void text1_Tapped(object sender, TappedRoutedEventArgs e)
   {
        InputPane pane = InputPane.GetForCurrentView();
        pane.TryShow();
   }

That also not showing touch screen keyboard when hardware keyboard is attached .

Please guide me to solve this requirement.

1
See if anything in this question helpsMark Hall

1 Answers

0
votes

Is there a way to show Touch Screen Keyboard in UWP app when there is a Hardware Keyboard- Windows 10

Derive from this case, we could not launch Touch Screen Keyboard within UWP desktop model. But we could launch wpf app and then call osk.exe indirectly.

For integrating wpf app into UWP, we could refer this tutorial. And communicate with wpf client by UWP AppService.

We could send message to tell wpf client to launch osk.exe when the TextBox focused from UWP Client.