public static interface Component.KeyEventListener
This callback will be invoked before the component receives the event. The listener is valid only when a physical keyboard is used.
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
onKeyEvent(Component component,
KeyEvent event) |
Processes a key event dispatched to a component.
|
boolean onKeyEvent(Component component, KeyEvent event)
The listener responds to a key event before the component receives the event.
component - Indicates the component to which the key event is dispatched.event - Indicates all information about the key event.true if the listener has processed the event; returns false otherwise.