Add the function and browser objects to your project. Add a function and call it "on alt pressed". Next add a "on start of layout" event and add a "browser->execute javascript" action with this:
"document.addEventListener('keydown', function(e){if(e.altKey)c2_callFunction('on alt pressed',[]);});"[/code:3elnakfb]
I'm trying to check when the player presses a key if Alt is pressed and if it isn't, the key's code is added to the variable "Text"...
(This was the easiest way that I could come up with to register key codes from only certain keys and not from other. Do let me know if there is a simpler way =D)
Do you want to post the .capx?
There's an alternate method here:
I haven't understood it very well, could you explain it in more detail?