public static void triggerText(Component destination, String string,
			BiConsumer<Component, KeyEvent> consumer) {

		for (int i = 0; i < string.length(); i++) {
			char c = string.charAt(i);
			int mods = 0;
			int keyCode = 0;

			if (Character.isLetter(c)) {
				if (Character.isUpperCase(c)) {
					mods = InputEvent.SHIFT_DOWN_MASK;
					keyCode = KeyEvent.VK_A + (c - 'A');
				}
				else {
					keyCode = KeyEvent.VK_A + (c - 'a');
				}
			}
			else if (Character.isDigit(c)) {
				keyCode = KeyEvent.VK_0 + (c - '0');
			}
			else {
				switch (c) {
					case '~':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = c;
						break;
					case '!':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_EXCLAMATION_MARK;
						break;
					case '@':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_AT;
						break;
					case '#':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_NUMBER_SIGN;
						break;
					case '$':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_DOLLAR;
						break;
					case '%':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_5;
						break;
					case '^':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_CIRCUMFLEX;
						break;
					case '&':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_AMPERSAND;
						break;
					case '*':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_ASTERISK;
						break;
					case '(':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_LEFT_PARENTHESIS;
						break;
					case ')':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_RIGHT_PARENTHESIS;
						break;
					case '_':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_UNDERSCORE;
						break;
					case '+':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_PLUS;
						break;
					case '{':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_BRACELEFT;
						break;
					case '}':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_BRACERIGHT;
						break;
					case '|':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_BACK_SLASH;
						break;
					case ':':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_SEMICOLON;
						break;
					case '"':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_QUOTEDBL;
						break;
					case '<':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_COMMA;
						break;
					case '>':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_PERIOD;
						break;
					case '?':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_SLASH;
						break;
					case '\'':
						mods = InputEvent.SHIFT_DOWN_MASK;
						keyCode = KeyEvent.VK_QUOTE;
						break;
					default:
						mods = 0;
						keyCode = c;
						break;
				}
			}

			triggerKey(destination, mods, keyCode, c, consumer);
		}
	}
Types the indicated string using the
{@link #triggerKey(Component, int, int, char)} method.

This method should be used when typing into
text components. For example, JTextFields and JTextAreas.
All three events are fired, KEY_PRESSED, KEY_TYPED, and KEY_RELEASED.

<br>Note: Handles the following characters:
<br>
<br>ABCDEFGHIJKLMNOPQRSTUVWXYZ
<br>abcdefghijklmnopqrstuvwxyz
<br>`1234567890-=[]\;',./
<br>{@literal ~!@#$%^&*()_+{}|:"<>?}
<br>
<br>It also handles '\n', '\t', and '\b'.

@param destination the component to receive the events
@param string the string to be typed.
@param consumer the consumer of the text to be generated
Ghidra/Framework/Docking/src/main/java/docking/test/AbstractDockingTest.java