Swing's KeyListener and multiple keys pressed at the same time.

Posted by Negai on Stack Overflow See other posts from Stack Overflow or by Negai
Published on 2010-04-12T17:25:47Z Indexed on 2010/04/12 17:53 UTC
Read the original article Hit count: 305

Filed under:
|
|

Hi everyone,

is there any conventional way in swing of tracking down the events, when two keyboard keys are pressed at the same time? I have a couple of ideas e.g. remembering the key and event generation time so that we could in a consecutive event handler invocation check the time difference between these two events and decide, whether it's a two-button event or not. Phew. But it looks like a kludge.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about swing

Related posts about java