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

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

问题描述

我需要为应用程序中的某些按钮启用 alt-< key> 选择语义。如果我为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天全站免登陆