Package docking
Class KeyBindingOverrideKeyEventDispatcher
java.lang.Object
docking.KeyBindingOverrideKeyEventDispatcher
- All Implemented Interfaces:
KeyEventDispatcher
Allows Ghidra to give preference to its key event processing over the default Java key event
processing. See
dispatchKeyEvent(KeyEvent)
for a more detailed explanation of how
Ghidra processes key events.
install()
must be called in order to install this Singleton
into Java's
key event processing system.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
dispatchKeyEvent
(KeyEvent event) Overridden to change the Java's key event processing to insert Ghidra's top level tool key bindings into the event processing.
-
Constructor Details
-
KeyBindingOverrideKeyEventDispatcher
public KeyBindingOverrideKeyEventDispatcher()
-
-
Method Details
-
dispatchKeyEvent
Overridden to change the Java's key event processing to insert Ghidra's top level tool key bindings into the event processing. Java's normal key event processing is:- KeyListeners on the focused Component
- InputMap and ActionMap actions for the Component
- InputMap and ActionMap actions for the Component's parent, and so on up the Swing hierarchy
- Reserved keybinding actions
- KeyListeners on the focused Component
- InputMap and ActionMap actions for the Component
- Ghidra tool-level actions
- InputMap and ActionMap actions for the Component's parent, and so on up the Swing hierarchy
There are some exceptions to this processing chain:
- We don't do any processing when the focused component is an instance of
JTextComponent
. - We don't do any processing if the active window is an instance of
DockingDialog
.
- Specified by:
dispatchKeyEvent
in interfaceKeyEventDispatcher
- See Also:
-