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.
Keybindings are processed here to manage how DockingActions will get executed. The basic
action processing flow is:
- System actions (e.g., F1 for help)
- Java text components
- Java widget key listeners
- Java action map bindings
ComponentBasedDockingActionsComponentProviderlocal actions- Tool global actions
MultipleKeyAction class is responsible for determining the correct priority for the
action to be processed. If there is more than one action that maps to a binding, then the user
will be shown a dialog to choose which action to execute.-
Constructor Summary
Constructors -
Method Summary
ChangeModifier and TypeMethodDescriptionbooleandispatchKeyEvent(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:
dispatchKeyEventin interfaceKeyEventDispatcher- See Also:
-