开发者

windows.sendkeys equivalent in flex/adobe air

开发者 https://www.devze.com 2023-02-10 01:23 出处:网络
Is it possible 开发者_如何学编程to capture user typed inputs from keyboard and overwrite user entered text with pre-defined words in Flex/Adobe Air? I\'m looking for afunctionality in Adobe Air someth

Is it possible 开发者_如何学编程to capture user typed inputs from keyboard and overwrite user entered text with pre-defined words in Flex/Adobe Air? I'm looking for a functionality in Adobe Air something like "typinator" does.


Yes, you can do this.

You can set up a KeyListener event on the stage, and it should catch any and all keystrokes. After that, you can send whatever command you like to whatever component you like. If you are looking to access programs outside of AIR, like windows.sendkeys can do, please look at this post for how that might work.

Specific components can stopPropagation(), but I don't think text input objects do this by default. See this doc for more on capture/bubble.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号