keyboard-events - Apache Royale:如何检测 j:textInput 上的输入键
问题描述
我有这个代码:
<j:TextInput localId="ti_pass" >
<j:beads><j:PasswordInput/></j:beads>
</j:TextInput>
不幸的是,看着https://apache.github.io/royale-docs/component-sets/jewel/textinput我没有找到 KeyDown 事件的珠子。是否有特定的事件来监听它?
有没有办法知道是否按下了输入键?
感谢和问候
解决方案
我必须说你的问题有更好的解决方案,但由于专注于 keydown,我完全忘记了。对不起。
您enter
在 TextInput 中有一个可以直接使用的事件。示例在 TextInputPlayGround 的 Tour De Jewel 中。
private function enterPress(event:Event):void
{
trace("enter pressed");
}
<j:TextInput text="A TextInput" enter="enterPress(event)"/>
高温高压
卡洛斯
推荐阅读
- redis - redis sentinel 没有将 +sdown 提升为 +odown
- c# - Unity3D:如何从附加到预制件的其他脚本中调用一个脚本中的函数?
- javascript - ajax成功后返回空值?
- macos - 如何将拖放文件列表传递给 install4J 启动器?
- google-cloud-platform - 从 Java 访问 Bigquery IAM
- angular - Nativscript getRootView()不起作用
- c - 为什么当前宏会返回 14 的值?
- bash - 找不到简单变量赋值的 Bash 命令
- matplotlib - Matplotlib 图未显示在 Jupyter 笔记本第一个单元格的输出小部件中
- python - 如何在不更改熊猫中其他列的情况下对一列进行排序?