在 UWP 中以编程方式打开屏幕键盘 [英] Programmatically open On-Screen Keyboard in UWP

查看:13
本文介绍了在 UWP 中以编程方式打开屏幕键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 UWP 中强制它打开屏幕键盘 (osk.exe)?

例如,在 C# 中,可以使用 System.Diagnostics.Process.Start("osk.exe");

在 UWP 中执行上述操作会导致编译错误,提示没有 Process 命名空间.

我知道在平板电脑模式下,如果我以编程方式关注文本框,它将显示屏幕键盘.

但是在桌面模式下可以吗?

解决方案

有没有办法让触摸键盘出现在桌面模式下?

欢迎您通过UserVoiceWindows 反馈中心 应用.

Is it possible in UWP to force it to open the On Screen Keyboard (osk.exe)?

For example, in C# it is possible using System.Diagnostics.Process.Start("osk.exe");

Doing the above in UWP results in compile error saying there is no Process namespace.

I know that in Tablet mode, if I programmatically focus on a TextBox, it will show up the OnScreen keyboard.

But is it possible when in Desktop mode?

解决方案

Is there a way for touchkeyboard to appear in desktop mode?

Ref the document in Keyboard interactions

Depending on the device, the touch keyboard appears when a text field or other editable text control gets focus, or when the user manually enables it through the Notification Center:

Note The user might have to go to the Tablet mode screen in Settings > System and turn on "Make Windows more touch-friendly when using your device as a tablet" to enable the automatic appearance of the touch keyboard.

So the touch keyboard can appear automatically in tablet mode when users sets the input focus to a text control by using touch input. However, this won't happen in desktop mode and in UWP, there is no API to open it programmatically by now.

To show touch keyboard in desktop mode, we need the user manually enables it by clicking touch keyboard button and users can see this button by checking "Show touch keyboard button" in taskbar.

You are welcome to submit a request for this feature through UserVoice and Windows Feedback Hub app.

这篇关于在 UWP 中以编程方式打开屏幕键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆