开发者

Is it possible to replace the User's keyboard input with another string in Adobe AIR + Flex application?

开发者 https://www.devze.com 2022-12-19 07:37 出处:网络
One of our application is implemented in flex and adobe air. We want to have the user press combination of keys, say \'ABC\', and have the keyboard return a different character, \'FOG\', to whatever a

One of our application is implemented in flex and adobe air. We want to have the user press combination of keys, say 'ABC', and have the keyboard return a different character, 'FOG', to whatever app is in focus. This should work开发者_StackOverflow社区 even if app has no focus.

Will it possible in Adobe Air/Flex? If yes, provide me some examples?

Thanks in advance


That won't work. Flash/AIR can only listen to keyboard events when it has focus, so as a background application it won't be able to manipulate the key codes that come directly from the driver.

Even if it was possible to notice when a key was pressed, it is not possible to change that value. So if you want to change which key codes are returned, you should rather write a driver for it, or try to get access to it with a lower level approach (C & WinAPI maybe).

0

精彩评论

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

关注公众号