View Single Post
Join Date: Feb 2007
Posts: 77
Reputation: aot is an unknown quantity at this point 
Solved Threads: 1
aot's Avatar
aot aot is offline Offline
Junior Poster in Training

Re: KeyPress event with holding down the key

 
0
  #8
Mar 1st, 2007
Yep, by themselves they work fine.

Also, an update: I managed to get your example to work (I had to pack the frame instead of gridding it). However, my output is different:

  1.  
  2. key-press started
  3. choice made
  4. key-press started
  5. choice made
  6. key-press started
  7. choice made
  8. key-press started
  9. choice made
As you can see, my computer treats holding down the 'a' key as pressing and releasing it over and over (instead of just pressing it). As such, I don't really see a way to code what I want, as there's no way of determining what the final KeyRelease action is (unless there's some way of testing whether a key's been pressed in the last X milliseconds, then I could act only when it hasn't been, although there'd be a delay).

However, I've found an easy way out for now: it works fine with mouse button presses.
Reply With Quote