How to detect a combination of pressed keys

Hello all,

hope somebody can help me with this one.

I have a JTextArea on which I registered a KeyListener. Now, in case there is pressed a combination of keys (e.g. CTRL-C) I want to redirect this to a log file. Otherwise the pressed key has to be shown in the textarea. I noticed that the C is both handled by the keyPressed and keyTyped method. I would expect that in case of CTRL-C the C is only detected by the keyPressed and not the keyTyped. Anybody an idea how I can perform what I try to do ?

Thanks !

[535 byte] By [ica78a] at [2007-9-30 2:18:09]
# 1
nobody ?
ica78a at 2007-7-16 13:26:53 > top of Java-index,Archived Forums,Swing...
# 2
The KeyEvent object you get passed in keyTyped has methods suchas isAltDown etc. You can use those to detect ctrl-C etc.
armalcolma at 2007-7-16 13:26:53 > top of Java-index,Archived Forums,Swing...