java 小程序热键

发布于 2024-09-06 13:11:59 字数 157 浏览 3 评论 0原文

我很好奇是否可以在 jApplet 中创建小程序全局的热键...例如全局键处理程序或其他东西。 例如,我希望能够按下“F11”键,然后出现一个 jPanel,然后再次按“f11”使其消失......无论我关注哪个组件。当我不专注于应用程序而只专注于内部时,我不希望它起作用。

谢谢。

I was curious if it was possible to create hotkeys in a jApplet that are global for the applet...like a global key handler or something.
For example, I would like to be able to press the key, 'F11' lets say, then have a jPanel appear, and then press 'f11' again to make it disappear... regardless of which component I'm focused on.I don't expect it to work when I'm not focused on the application, just within.

thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

把时间冻结 2024-09-13 13:11:59

您需要使用按键绑定

You need to use Key Bindings.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文