java - How to stop repeated keyPressed() / keyReleased() events in Swing -


so problem having appears bug occurs on linux. i'm trying have swing app record when key pressed down, detect when key released. shouldn't in issue because keylistener supposed handle me.

the problem when hold key down lots of repeated keypressed()/keyreleased() events instead of single keypressed(). have solution or workaround knowing when key released on linux?

thank you.

so problem having appears bug occurs on linux

yes linux problem.

on windows when key held down multiple keypressed events single keyreleased event.

this question asked , i've never seen solution.

but think basis of solution use timer. when key pressed start timer. when keypressed restart timer. long timer interval greater repeat rate of key board timer continually reset when key held down. when keypresses stop being generated timer fire assume key has been released. implies have delay in processing keyreleased.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -