在 flex 中捕获 ALT 键事件时出现问题 [英] Problem while capturing ALT key event in flex

查看:29
本文介绍了在 flex 中捕获 ALT 键事件时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为应用程序中的某些按钮启用 alt- 选择语义.如果我为 Button 编写 KeyDownEventListener,当我按下键盘中的 ALT 键时它不会被触发.有没有办法为按钮启用 alt 键语义?

I need to enable alt-<key> selection semantics for some Buttons in my application. If I write KeyDownEventListener for the Button, its not getting triggered when I press ALT key in the keyboard. Is there any way to enable alt key semantics for the buttons?

提前致谢

推荐答案

KeyboadEvent 类有一个 altKey 属性,可用于检查在按下当前键时是否按住了 Alt 键.

KeyboadEvent class has an altKey property that you can use to check if Alt key was held-down while the current key was pressed.

这篇关于在 flex 中捕获 ALT 键事件时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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