如何通过 Python 访问 Windows on_screen 键盘附件 [英] How to access Windows on_screen keyboard accessory through Python

查看:41
本文介绍了如何通过 Python 访问 Windows on_screen 键盘附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过Python Card"创建一个触摸屏项目.要在文本框中填充数据,我可以将 Windows 屏幕键盘带入我的程序,而不是自己创建软键盘吗?我正在尝试使用 PyWin32 获取 Windows 屏幕键盘,但它无法正确执行.
有没有更好的方法可以将此键盘功能引入我的应用程序中?

I am creating a touch screen project through "Python Card". To fill data in a text box, can I bring the Windows on-screen keyboard to my program instead of creating a soft keyboard myself? I am trying to get the Windows on-screen keyboard using PyWin32, but it doesn't execute properly.
Are there better ways to get this keyboard functionality into my application?

请帮帮我.

推荐答案

import os
os.system("osk")

这将调用屏幕键盘,为调用它的窗口激活.

This will invoke the on screen keyboard, active for the window that invokes it.

这篇关于如何通过 Python 访问 Windows on_screen 键盘附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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