This content has been marked as final. Show 3 replies
That codes a little bit old school, if this code is on a button or something and is the code to be actioned on release of that, then you want to check which key is down inside the handler.
but if you want to perform an action when the enter button has been release independant of interacting with anything else then best bet is to adapt the code found in the Key.addListener section of the help file. Lot more detailed than a long article here.
Hope that helped, Ade
I agree that there are alternative ways but if 'keyPress"<Enter>"' doesn't work, then why should it be displayed in the pull down list?
I think it as a different case.......
A button alone is not able to detect the keyPress event.
Have an input text field inside the button and click that field. The input cursor will be blinking. Now, pressing Enter will work fine.
i figured it out, I had to give the button a tabIndex along with the input fields to get <Enter> to work