awt.KeyEvents, advanced question.
How do you capture KeyEvents system- wide?
Some cool java 1.2 (or later) code:
Toolkit.getDefaultToolkit().addAWTEventListener (this, AWTEvent.KEY_EVENT_MASK);
...
publicvoid eventDispatched(AWTEvent event)
{
//...event captured! I can react on it here!
}
This nice piece of code is java 1.2 and hence can抰 be used by my applet. (My users are stuck with a browser that only supports java 1.1.8, and they don抰 want to download any plug-in)
How do I do this in java 1.1.8?
My approach so far has been to use addKeyListener() recursively on the applet and all its awt.Component抯. It works ok but it is a little messy, especially when components are added or removed (Then I have to detect it and perform the recursive adding of KeyListeners again.). Is there any other way?

