简体   繁体   English

在Windows 10 IoT核心版上的Windows Universal App中手动触发屏幕键盘吗?

[英]Manually trigger on-screen keyboard in Windows Universal App on Windows 10 IoT Core?

For some reason the on-screen keyboard in Windows 10 IoT Core on raspberry pi 2 model b does not always come to front. 由于某些原因,树莓派2型b的Windows 10 IoT核心版中的屏幕键盘并不总是在前面。 (actually 99% it does not work). (实际上99%无效)。

is is possible to manually make a call in codebehind (for example when the OnFocus event happens) to show the osk? 是否可以手动在后台代码中进行调用(例如,发生OnFocus事件时)以显示osk?

The osk is actually a separate program, you could call it using the External Process Launcher API. osk实际上是一个单独的程序,您可以使用External Process Launcher API对其进行调用。
https://developer.microsoft.com/en-us/windows/iot/samples/externalprocesslauncher https://developer.microsoft.com/zh-CN/windows/iot/samples/externalprocesslauncher

From what I understand it is only available on Windows SDK: Version 15063 and up however. 据我了解,它仅适用于Windows SDK:版本15063及更高版本。

I don't have the SDK installed at work so this code may be wrong, but it would look a bit like this: 我没有在工作时安装SDK,因此此代码可能是错误的,但看起来有点像这样:

var result = await ProcessLauncher.RunToCompletionAsync("C:\\Windows\\System32\\osk.exe", string.Empty);

Edit: 编辑:
I'm thinking this may block the UI Thread though, which would be undesirable. 我在想这可能会阻止UI线程,这是不可取的。 Maybe if you run the task in the background though... Perhaps through the CoreDispatcher. 也许如果您在后台运行任务……也许通过CoreDispatcher。
https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Core.CoreDispatcher#Windows_UI_Core_CoreDispatcher_RunAsync_Windows_UI_Core_CoreDispatcherPriority_Windows_UI_Core_DispatchedHandler_ https://docs.microsoft.com/zh-cn/uwp/api/Windows.UI.Core.CoreDispatcher#Windows_UI_Core_CoreDispatcher_RunAsync_Windows_UI_Core_CoreDispatcherPriority_Windows_UI_Core_DispatchedHandler_

var ignored = dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>
    {
        await ProcessLauncher.RunToCompletionAsync("C:\\Windows\\System32\\osk.exe", string.Empty);
    });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows IoT上的Windows通用应用程序中的屏幕键盘? - On-screen keyboard in Windows Universal App on Windows IoT? 在Windows 10 Universal App上捕获应用程序的屏幕 - Capture screen of the application on a Windows 10 Universal App 在Windows 10 IOT Core上运行的通用Windows应用程序中的HttpClient从HRESULT抛出异常:0x80072EFD - HttpClient in Universal Windows app running on Windows 10 IOT Core throws Exception from HRESULT: 0x80072EFD 在Windows 10 IoT中更改屏幕键盘语言的布局 - Change On-Screen-Keyboard language layout in windows 10 iot 在Windows Phone WinRT / Universal应用程序中手动触发NavigationThemeTransition - Manually trigger NavigationThemeTransition in Windows Phone WinRT/Universal app 在焦点事件上打开触摸键盘窗口10 通用应用 - Open touch keyboard windows 10 on focus event TextBox | Universal App 在Windows应用商店应用程序中的文本框焦点事件弹出屏幕键盘 - Popup On-Screen Keyboard On Text-box Focus Event in Windows Store App 响应Windows Store C#/ XAML应用中屏幕键盘的外观 - Responding to the appearance of the on-screen keyboard in windows store c#/XAML app 滚动视图在 UWP windows 10 IoT 核心应用程序中不起作用 - Scroll View not working in UWP windows 10 IoT core app 适用于Windows的通用应用程序10.如何触发后台任务? - Universal app for windows 10. how to trigger background task?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM