public static void triggerKey(Component c, int modifiers, int keyCode, char keyChar,
			BiConsumer<Component, KeyEvent> consumer) {

		Objects.requireNonNull(c);
		Objects.requireNonNull(consumer);

		if (c instanceof JTextComponent tf) {
			forceTextComponentFocus(tf);
		}

		KeyEvent pressedKE = new KeyEvent(c, KeyEvent.KEY_PRESSED, System.currentTimeMillis(),
			modifiers, keyCode, keyChar);
		consumer.accept(c, pressedKE);

		if (!pressedKE.isActionKey()) {
			// action keys are keys like the function (F1) keys

			char updatedKeyChar = (keyChar == KeyEvent.CHAR_UNDEFINED) ? (char) keyCode : keyChar;
			KeyEvent typedKE = new KeyEvent(c, KeyEvent.KEY_TYPED, System.currentTimeMillis(),
				modifiers, KeyEvent.VK_UNDEFINED, updatedKeyChar);
			consumer.accept(c, typedKE);
		}

		KeyEvent releasedKE = new KeyEvent(c, KeyEvent.KEY_RELEASED, System.currentTimeMillis(),
			modifiers, keyCode, keyChar);
		consumer.accept(c, releasedKE);
	}
Fires a {@link KeyListener#keyPressed(KeyEvent)}, {@link KeyListener#keyTyped(KeyEvent)}
and {@link KeyListener#keyReleased(KeyEvent)} for the given key code and char.

<P>If the key you need is not a character, but is an action, pass
{@link KeyEvent#CHAR_UNDEFINED} for the <CODE>keyChar</CODE> parameter.

@param c the destination component
@param modifiers any modifiers, like Control
@param keyCode the key code (see {@link KeyEvent}'s VK_xyz values)
@param keyChar the key char or {@link KeyEvent#CHAR_UNDEFINED}
Ghidra/Framework/Docking/src/main/java/docking/test/AbstractDockingTest.java