@Override
		public void keyPressed(KeyEvent e) {
			Caret caret = linked.field.getCaret();
			boolean sel = caret.getMark() != caret.getDot();
			switch (e.getKeyCode()) {
				case KeyEvent.VK_BACK_SPACE:
					if (!sel && state.isAfterSep(linked.index)) {
						state.removeSep(linked.index - 1);
						e.consume();
					}
					break;
				case KeyEvent.VK_CLEAR:
					clear();
					break;
				case KeyEvent.VK_DELETE:
					if (!sel && state.isBeforeSep(linked.index)) {
						state.removeSep(linked.index);
						e.consume();
					}
					break;
				case KeyEvent.VK_KP_LEFT:
				case KeyEvent.VK_LEFT:
					if (state.isAfterSep(linked.index)) {
						state.navigateFieldLeft(linked.index - 1);
					}
					break;
				case KeyEvent.VK_KP_RIGHT:
				case KeyEvent.VK_RIGHT:
					if (state.isBeforeSep(linked.index)) {
						state.navigateFieldRight(linked.index + 1);
					}
					break;
				default:
					return;
			}
			syncStateLater();
		}
A listener for all my callbacks

<p>
A separate listener is constructed and installed on each field so that we have a reference to
the field in every callback.
Ghidra/Framework/Docking/src/main/java/docking/widgets/textfield/TextFieldLinker.java