可以将Shift,Ctrl,Alt或Win键之一用于其他目的,例如键入文本吗? [英] Can one of the Shift, Ctrl, Alt or Win keys be used in other purpose like, to type text?

查看:102
本文介绍了可以将Shift,Ctrl,Alt或Win键之一用于其他目的,例如键入文本吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想修改 Shift Ctrl Alt Win 键之一的使用.例如,如果我只是击打(而不是按住它并按另一个键)右移键,则它应该执行类似在文本框中显示特殊字符的操作.有人可以让我知道使用Java之类的任何编程语言是否有可能?

I want to modify the use of the one of the Shift, Ctrl, Alt or Win keys. For example, if I just hit (not hold it and press another key) the right shift key, it should do something like displaying a special character in a text box. Could some one let me know if this is possible using any programming language like Java?

推荐答案

是的,您可以这样做.

教程中查看有关如何编写 Java + Swing 中的>关键侦听器" .

Check this tutorial on how to write a Key Listener in Java + Swing.

关于键绑定教程的另一种有趣的方法/strong>(在 Java + Swing 中也可能很有用).为了定义对特定键的特殊反应,请使用本教程.

Another interesting tutorial about Key Bindings in Java + Swing that could also be useful. In order to define special reactions to particular keys use this tutorial.

希望有帮助.

这篇关于可以将Shift,Ctrl,Alt或Win键之一用于其他目的,例如键入文本吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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