private boolean willBeHandledByTextComponent(KeyEvent event) {

		Component destination = event.getComponent();
		if (destination == null) {
			Component focusOwner = focusProvider.getFocusOwner();
			destination = focusOwner;
		}

		if (!(destination instanceof JTextComponent textComponent)) {
			return false; // we only handle text components
		}

		// Note: don't do this--it breaks key event handling for text components, as they do
		//       not get to handle key events when they are not editable (they still should
		//       though, so things like built-in copy/paste still work).
		// JTextComponent textComponent = (JTextComponent) focusOwner;
		// if (!textComponent.isEditable()) {
		//	return false;
		// }

		// Special Case: We allow Escape to go through.  This doesn't seem useful to text widgets
		// but does allow for closing of windows.   If we find text widgets that need Escape, then 
		// we will have to update how we make this decision, such as by having the concerned text
		// widgets register actions for Escape and then check for that action.
		int code = event.getKeyCode();
		if (code == KeyEvent.VK_ESCAPE) {
			// Cell editors will process the Escape key, so let them have it.  Otherwise, allow the
			// system to process the Escape key as, described above.
			return isCellEditing(textComponent);
		}

		// We've made the executive decision to allow all keys to go through to the text component
		// unless they are modified with the 'Alt'/'Ctrl'/etc keys, unless they directly used
		// by the text component
		if (!isModified(event)) {
			return true; // unmodified keys will be given to the text component
		}

		// the key is modified; let it through if the component has a mapping for the key
		return hasRegisteredKeyBinding(textComponent, event);
	}
Used to clear the flag that signals we are in the middle of processing a Ghidra action.
Ghidra/Framework/Docking/src/main/java/docking/KeyBindingOverrideKeyEventDispatcher.java