Package docking
Class KeyBindingOverrideKeyEventDispatcher
- java.lang.Object
-
- docking.KeyBindingOverrideKeyEventDispatcher
-
- All Implemented Interfaces:
java.awt.KeyEventDispatcher
public class KeyBindingOverrideKeyEventDispatcher extends java.lang.Object implements java.awt.KeyEventDispatcher
Allows Ghidra to give preference to its key event processing over the default Java key event processing. SeedispatchKeyEvent(KeyEvent)
for a more detailed explanation of how Ghidra processes key events.install()
must be called in order to install thisSingleton
into Java's key event processing system.
-
-
Constructor Summary
Constructors Constructor Description KeyBindingOverrideKeyEventDispatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
dispatchKeyEvent(java.awt.event.KeyEvent event)
Overridden to change the Java's key event processing to insert Ghidra's top level tool key bindings into the event processing.
-
-
-
Method Detail
-
dispatchKeyEvent
public boolean dispatchKeyEvent(java.awt.event.KeyEvent event)
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 interfacejava.awt.KeyEventDispatcher
- See Also:
KeyEventDispatcher.dispatchKeyEvent(java.awt.event.KeyEvent)
-
-