Is it possible to replace the User's keyboard input with another string in Adobe AIR + Flex application?
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).
精彩评论