Hi, I have a default button on a form that I want to be pressed when I hit enter on a few controls like textfields and list boxes, but I don't want to be press when hitting enter on a few other list boxes. In the case of those controls, I want to be able to process their onClick event and not press the default button.
I have tried not using a default button but using the onKeyUp event on those controls, then searched if the key 13 was released on them and execute the code that I want to be executed at onClick() event. The code works, but with big issues. For example, if a dialog window appears and I hit enter to close it, and the focus goes to one of those controls, I need to release the enter key there and the code is executed again, or if the focus is on one of those controls and I choose a menu item using enter... So that's not a good approach. Is there a better one? Thank you. Teddy