Note that the KeyboardFocusManager itself implements KeyEventPostProcessor. By default, the current KeyboardFocusManager will be the final KeyEventPostProcessor in the chain. The current KeyboardFocusManager cannot be completely deregistered as a KeyEventPostProcessor. However, if a KeyEventPostProcessor reports that no further post-processing of the KeyEvent should take place, the AWT will consider the event fully handled and will take no additional action with regard to the event. (While it is possible for client code to register the current KeyboardFocusManager as a KeyEventPostProcessor one or more times, this is usually unnecessary and not recommended.)
KeyboardFocusManager#addKeyEventPostProcessor, KeyboardFocusManager#removeKeyEventPostProcessor
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the AWT should take no further action with
regard to the KeyEvent; false otherwisethe KeyEvent to post-process e)This method is called by the current KeyboardFocusManager, requesting that this KeyEventPostProcessor perform any necessary post-processing which should be part of the KeyEvent's final resolution. |
| postProcessKeyEvent | back to summary |
|---|---|
| public boolean postProcessKeyEvent(KeyEvent e) This method is called by the current KeyboardFocusManager, requesting
that this KeyEventPostProcessor perform any necessary post-processing
which should be part of the KeyEvent's final resolution. At the time
this method is invoked, typically the KeyEvent has already been
dispatched to and handled by its target. However, if no Component in
the application currently owns the focus, then the KeyEvent has not
been dispatched to any Component. Typically, KeyEvent post-processing
will be used to implement features which require global KeyEvent
post-handling, such as menu shortcuts. Note that if a
KeyEventPostProcessor wishes to dispatch the KeyEvent, it must use
If an implementation of this method returns
| |