TTouchKeyboard:将击键发送到其他程序?
我如何在Delphi中使用TTouchKeyboard,以便它可以将击键发送到其他程序。例如,我想使用 TTouchKeyboard 组件在浏览器中输入密码。我不知道如何在点击键盘时使浏览器保持焦点。
How do I use TTouchKeyboard in Delphi, so it could send keystrokes to other program. For example, I want to type password in a browser using TTouchKeyboard component. I have no idea how make the browser stay focus while I'm clicking on my keyboard.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
TTouchKeyboard
将按键发送到当前控件焦点:因此,如果您有一个带有 焦点 的TEdit
,TEdit 将接收按键...您可以创建一个包含
TTouchKeyboard
的表单并添加以下过程:您的表单不能具有焦点...因此,该键将发送到前一个获得焦点的控件。 (我刚刚测试过,它有效:密钥已发送到此网页)
TTouchKeyboard
sends the keys to the current control focused: so if you have aTEdit
with the focus, the TEdit will receive the key...You can create a form which contains the
TTouchKeyboard
and add this procedure:Your form can't have the focus... so, the key is sent to the previous focused control. (I have just tested it and it works: the key has been sent to this webpage)