[WIN] determining key press
- Posted by joshua goldberg <futures8 at bellsouth.net> Sep 10, 2001
- 566 views
Hi, all. I'm having trouble understanding how to determine (via Win32lib) whether the Enter key was pressed. I've read the docs in Win32lib.ew re: onKeyDown and found them to be unintelligible (to me). Also, have found no examples of using onKeyDown in any of the sample programs. My need occurs in a program with a number of EditText fields. If the user inadvertantly presses the enter key instead of tabbing to the next fields, the program assumes data entry is finished, and then proceeds to try to process without the required data, and crashes. I'd like to be able to trap the pressing of the Enter key, and just setFocus to the next EditText field if that event occured. After a long, sleepless night trying to solve this, I must turn, once again to my knowledgeable mentors. Any help will be gratefully received. Thanks. Josh