• Post Reply Bookmark Topic Watch Topic
  • New Topic

ignoring fired key events or change rate  RSS feed

 
Rikki Bostelmann
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

how can I access or even disable the key repeat functionality of the OS?
Or change the rate in which keyEvents are fired?

Goal:
While keeping a cursor pressed, I would like to go through keyPressed() only about 2 or 3 times per second.
However, including a sleep function into keyPressed(), the OS keeps firing keyEvents resulting in several loopings through keyPressed even after the key is released.


Any suggestions?

Thanks a lot,
Rikki
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you may get the time for every key press, and if the differencet to the last-time is less than 0.25s do nothing.
[ October 05, 2004: Message edited by: Stefan Wagner ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!