public static Action getAction(JComponent component, KeyStroke keyStroke, int focusCondition) {
		InputMap inputMap = component.getInputMap(focusCondition);
		ActionMap actionMap = component.getActionMap();
		if (inputMap == null || actionMap == null) {
			return null;
		}

		Object binding = inputMap.get(keyStroke);
		return (binding == null) ? null : actionMap.get(binding);
	}
Returns the registered action for the given keystroke, or null of no
action is bound to that keystroke.

@param component the component for which to check the binding
@param keyStroke the keystroke for which to find a bound action
@param focusCondition the focus condition under which to check for the
           binding ({@link JComponent#getInputMap(int)})
@return the action registered to the given keystroke, or null of no
        action is registered
Ghidra/Framework/Docking/src/main/java/docking/actions/KeyBindingUtils.java