@Test
	public void testSetReservedKeybinding() throws Exception {
		// try to set a reserved keybinding
		KeyStroke reservedKeystroke = SystemKeyBindings.UPDATE_KEY_BINDINGS_KEY; // F4

		selectRowForAction(action1);
		typeKeyStroke(reservedKeystroke);
		assertNoKeyStrokeText();
		assertMessage("F4 in use by System action 'Set KeyBinding'");

		apply();
		assertEquals(null, getKeyStroke(action1));

		// set a valid binding
		setUpDialog();
		selectRowForAction(action1);

		KeyStroke validKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_DOWN_MASK);
		typeKeyStroke(validKeyStroke);
		assertKeyFieldText(validKeyStroke);

		apply();
		assertEquals(validKeyStroke, getKeyStroke(action1));

		// try again to set a reserved binding
		setUpDialog();
		selectRowForAction(action1);
		assertEquals(validKeyStroke, getKeyStroke(action1));

		typeKeyStroke(reservedKeystroke);
		assertNoKeyStrokeText();
		assertMessage("F4 in use by System action 'Set KeyBinding'");

		apply();
		assertEquals(validKeyStroke, getKeyStroke(action1));
	}
Tests for key bindings option panel
Ghidra/Features/Base/src/test.slow/java/ghidra/framework/plugintool/dialog/KeyBindingsTest.java