Java Code Examples for java.awt.event.KeyEvent#VK_F12

The following examples show how to use java.awt.event.KeyEvent#VK_F12 . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PowerPCDisassembleAction.java    From ghidra with Apache License 2.0 6 votes vote down vote up
public PowerPCDisassembleAction(DisassemblerPlugin plugin, String groupName,
		boolean disassemblePPC) {
	super("Disassemble " + (disassemblePPC ? "PPC-VLE" : "PPC"), plugin.getName());
	this.groupName = groupName;
	this.plugin = plugin;
	this.disassemblePPC = disassemblePPC;

	// Need to override the default help location since this action doesn't have its own
	// section in the help.
	HelpLocation location = new HelpLocation("DisassemblerPlugin", "Disassemble");
	this.setHelpLocation(location);

	initializeContextMenu();

	int keyEvent = (disassemblePPC ? KeyEvent.VK_F12 : KeyEvent.VK_F11);
	setKeyBindingData(new KeyBindingData(keyEvent, 0));
}
 
Example 2
Source File: MipsDisassembleAction.java    From ghidra with Apache License 2.0 6 votes vote down vote up
public MipsDisassembleAction(DisassemblerPlugin plugin, String groupName,
		boolean disassembleMIPS16) {
	super("Disassemble " + (disassembleMIPS16 ? "MIPS16/Micromips" : "MIPS"), plugin.getName());
	this.groupName = groupName;
	this.plugin = plugin;
	this.disassembleMIPS16 = disassembleMIPS16;

	// Need to override the default help location since this action doesn't have its own
	// section in the help.
	HelpLocation location = new HelpLocation("DisassemblerPlugin", "Disassemble");
	this.setHelpLocation(location);

	// menu data will be adjusted based upon specific popup context
	setPopupMenuData(new MenuData(new String[] { "Disassemble - MIPS" }, null, groupName));

	int keyEvent = (disassembleMIPS16 ? KeyEvent.VK_F12 : KeyEvent.VK_F11);
	setKeyBindingData(new KeyBindingData(keyEvent, 0));
}
 
Example 3
Source File: Hcs12DisassembleAction.java    From ghidra with Apache License 2.0 6 votes vote down vote up
public Hcs12DisassembleAction(DisassemblerPlugin plugin, String groupName, boolean disassembleXgate) {
	super("Disassemble " + (disassembleXgate ? "HCS12" : "XGate"), plugin.getName());
	
	this.plugin = plugin;
	this.disassembleXgate = disassembleXgate;

	// Need to override the default help location since this action doesn't have its own
	// section in the help.
	HelpLocation location = new HelpLocation("DisassemblerPlugin", "Disassemble");
	this.setHelpLocation(location);
	
	setPopupMenuData( new MenuData( 
		new String[]{"Disassemble - "+ (disassembleXgate ? "XGate" : "HCS12") }, 
		null, 
		groupName ) );
	
	int keyEvent = (disassembleXgate ? KeyEvent.VK_F12 : KeyEvent.VK_F11);
	setKeyBindingData( new KeyBindingData( keyEvent, 0 ) );
}
 
Example 4
Source File: ArmDisassembleAction.java    From ghidra with Apache License 2.0 5 votes vote down vote up
public ArmDisassembleAction(DisassemblerPlugin plugin, String groupName, boolean disassembleThumb) {
	super("Disassemble " + (disassembleThumb ? "Thumb" : "Arm"), plugin.getName());
	
	this.plugin = plugin;
	this.disassembleThumb = disassembleThumb;
	
	setPopupMenuData( new MenuData( 
		new String[]{"Disassemble - "+ (disassembleThumb ? "Thumb" : "Arm") }, 
		null, 
		groupName ) );
	
	int keyEvent = (disassembleThumb ? KeyEvent.VK_F12 : KeyEvent.VK_F11);
	setKeyBindingData( new KeyBindingData( keyEvent, 0 ) );
}
 
Example 5
Source File: ModifierRobotEnhancedKeyTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public ModifierRobotEnhancedKeyTest() throws Exception {
    modifierKeys =  new int[4];
    modifierKeys[0] = KeyEvent.VK_SHIFT;
    modifierKeys[1] = KeyEvent.VK_CONTROL;
    modifierKeys[2] = KeyEvent.VK_ALT;
    modifierKeys[3] = KeyEvent.VK_ALT_GRAPH;

    inputMasks = new int[4];
    inputMasks[0] =  InputEvent.SHIFT_MASK;
    inputMasks[1] =  InputEvent.CTRL_MASK;
    inputMasks[2] =  InputEvent.ALT_MASK;
    inputMasks[3] =  InputEvent.ALT_GRAPH_MASK;

    modifierStatus = new boolean[modifierKeys.length];

    textKeys = new int[6];
    textKeys[0] = KeyEvent.VK_A;
    textKeys[1] = KeyEvent.VK_S;
    textKeys[2] = KeyEvent.VK_DELETE;
    textKeys[3] = KeyEvent.VK_HOME;
    textKeys[4] = KeyEvent.VK_F12;
    textKeys[5] = KeyEvent.VK_LEFT;

    textStatus = new boolean[textKeys.length];

    EventQueue.invokeAndWait( () -> { initializeGUI(); });
}
 
Example 6
Source File: Config.java    From Repeat with Apache License 2.0 5 votes vote down vote up
public Config(MainBackEndHolder backEnd) {
	this.backEnd = backEnd;
	useTrayIcon = DEFAULT_TRAY_ICON_USE;
	this.enabledHaltingKeyPressed = true;
	this.executeOnKeyReleased = true;
	this.nativeHookDebugLevel = DEFAULT_NATIVE_HOOK_DEBUG_LEVEL;

	this.mouseGestureActivationKey = KeyEvent.VK_CAPS_LOCK;
	RECORD = new KeyChain(KeyEvent.VK_F9);
	REPLAY = new KeyChain(KeyEvent.VK_F11);
	COMPILED_REPLAY = new KeyChain(KeyEvent.VK_F12);
}
 
Example 7
Source File: RuneLiteConfig.java    From runelite with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@ConfigItem(
	keyName = "panelToggleKey",
	name = "Plugin Panel Toggle Key",
	description = "The key that will toggle the current or last opened plugin panel (accepts modifiers)",
	position = 46,
	section = windowSettings
)
default Keybind panelToggleKey()
{
	return new Keybind(KeyEvent.VK_F12, InputEvent.CTRL_DOWN_MASK);
}
 
Example 8
Source File: ProjectToolbar.java    From TrakEM2 with GNU General Public License v3.0 5 votes vote down vote up
static public void keyPressed(KeyEvent ke) {
	switch (ke.getKeyCode()) {
		case KeyEvent.VK_F1:
			setTool(Toolbar.RECTANGLE);
			break;
		case KeyEvent.VK_F2:
			setTool(Toolbar.POLYGON);
			break;
		case KeyEvent.VK_F3:
			setTool(Toolbar.FREEROI);
			break;
		case KeyEvent.VK_F4:
			setTool(Toolbar.TEXT);
			break;
		case KeyEvent.VK_F5:
			setTool(Toolbar.MAGNIFIER);
			break;
		case KeyEvent.VK_F6:
			setTool(Toolbar.HAND);
			break;
		case KeyEvent.VK_F7:
			break;
		case KeyEvent.VK_F8:
			break;
		case KeyEvent.VK_F9:
			setTool(SELECT);
			break;
		case KeyEvent.VK_F10:
			setTool(PENCIL);
			break;
		case KeyEvent.VK_F11:
			setTool(PEN);
			break;
		case KeyEvent.VK_F12:
			setTool(BRUSH);
			break;
	}
}
 
Example 9
Source File: ActionUtils.java    From workcraft with MIT License 4 votes vote down vote up
public static String getKeyString(int keyCode) {
    // Letters and numbers
    if (((keyCode >= KeyEvent.VK_0) && (keyCode <= KeyEvent.VK_9))
            || ((keyCode >= KeyEvent.VK_A) && (keyCode <= KeyEvent.VK_Z))) {
        return String.valueOf((char) keyCode);
    }
    switch (keyCode) {
    // Navigation keys
    case KeyEvent.VK_LEFT: return "Left";
    case KeyEvent.VK_UP: return "Up";
    case KeyEvent.VK_RIGHT: return "Right";
    case KeyEvent.VK_DOWN: return "Down";
    // Extra navigation keys
    case KeyEvent.VK_INSERT: return "Insert";
    case KeyEvent.VK_DELETE: return "Delete";
    case KeyEvent.VK_END: return "End";
    case KeyEvent.VK_HOME: return "Home";
    case KeyEvent.VK_PAGE_UP: return "PgUp";
    case KeyEvent.VK_PAGE_DOWN: return "PgDn";
    // Function keys
    case KeyEvent.VK_F1: return "F1";
    case KeyEvent.VK_F2: return "F2";
    case KeyEvent.VK_F3: return "F3";
    case KeyEvent.VK_F4: return "F4";
    case KeyEvent.VK_F5: return "F5";
    case KeyEvent.VK_F6: return "F6";
    case KeyEvent.VK_F7: return "F7";
    case KeyEvent.VK_F8: return "F8";
    case KeyEvent.VK_F9: return "F9";
    case KeyEvent.VK_F10: return "F10";
    case KeyEvent.VK_F11: return "F11";
    case KeyEvent.VK_F12: return "F12";
    // Symbols
    case KeyEvent.VK_EXCLAMATION_MARK: return "!";
    case KeyEvent.VK_QUOTEDBL: return "\"";
    case KeyEvent.VK_EURO_SIGN: return "€";
    case KeyEvent.VK_DOLLAR: return "$";
    case KeyEvent.VK_CIRCUMFLEX: return "^";
    case KeyEvent.VK_AMPERSAND: return "&";
    case KeyEvent.VK_ASTERISK: return "*";
    case KeyEvent.VK_UNDERSCORE: return "_";
    case KeyEvent.VK_MINUS: return "-";
    case KeyEvent.VK_PLUS: return "+";
    case KeyEvent.VK_EQUALS: return "=";
    case KeyEvent.VK_AT: return "@";
    case KeyEvent.VK_NUMBER_SIGN: return "#";
    case KeyEvent.VK_COLON: return ":";
    case KeyEvent.VK_SEMICOLON: return ";";
    case KeyEvent.VK_COMMA: return ",";
    case KeyEvent.VK_PERIOD: return ".";
    case KeyEvent.VK_SLASH: return "/";
    case KeyEvent.VK_BACK_SLASH: return "\\";
    case KeyEvent.VK_DEAD_TILDE: return "~";
    // Parenthesis and brackets
    case KeyEvent.VK_LEFT_PARENTHESIS: return "(";
    case KeyEvent.VK_RIGHT_PARENTHESIS: return ")";
    case KeyEvent.VK_OPEN_BRACKET: return "[";
    case KeyEvent.VK_CLOSE_BRACKET: return "]";
    case KeyEvent.VK_BRACELEFT: return "{";
    case KeyEvent.VK_BRACERIGHT: return "}";
    case KeyEvent.VK_LESS: return "<";
    case KeyEvent.VK_GREATER: return ">";
    // Formatting keys
    case KeyEvent.VK_SPACE: return "Space";
    case KeyEvent.VK_TAB: return "Tab";
    case KeyEvent.VK_ENTER: return "Enter";
    case KeyEvent.VK_BACK_SPACE: return "Backspace";
    case KeyEvent.VK_ESCAPE: return "Esc";
    }
    return "0x" + Integer.toString(keyCode, 16);
}
 
Example 10
Source File: VncClientPacketSender.java    From cosmic with Apache License 2.0 4 votes vote down vote up
private int mapAwtKeyToVncKey(final int key) {
    switch (key) {
        case KeyEvent.VK_BACK_SPACE:
            return 0xff08;
        case KeyEvent.VK_TAB:
            return 0xff09;
        case KeyEvent.VK_ENTER:
            return 0xff0d;
        case KeyEvent.VK_ESCAPE:
            return 0xff1b;
        case KeyEvent.VK_INSERT:
            return 0xff63;
        case KeyEvent.VK_DELETE:
            return 0xffff;
        case KeyEvent.VK_HOME:
            return 0xff50;
        case KeyEvent.VK_END:
            return 0xff57;
        case KeyEvent.VK_PAGE_UP:
            return 0xff55;
        case KeyEvent.VK_PAGE_DOWN:
            return 0xff56;
        case KeyEvent.VK_LEFT:
            return 0xff51;
        case KeyEvent.VK_UP:
            return 0xff52;
        case KeyEvent.VK_RIGHT:
            return 0xff53;
        case KeyEvent.VK_DOWN:
            return 0xff54;
        case KeyEvent.VK_F1:
            return 0xffbe;
        case KeyEvent.VK_F2:
            return 0xffbf;
        case KeyEvent.VK_F3:
            return 0xffc0;
        case KeyEvent.VK_F4:
            return 0xffc1;
        case KeyEvent.VK_F5:
            return 0xffc2;
        case KeyEvent.VK_F6:
            return 0xffc3;
        case KeyEvent.VK_F7:
            return 0xffc4;
        case KeyEvent.VK_F8:
            return 0xffc5;
        case KeyEvent.VK_F9:
            return 0xffc6;
        case KeyEvent.VK_F10:
            return 0xffc7;
        case KeyEvent.VK_F11:
            return 0xffc8;
        case KeyEvent.VK_F12:
            return 0xffc9;
        case KeyEvent.VK_SHIFT:
            return 0xffe1;
        case KeyEvent.VK_CONTROL:
            return 0xffe3;
        case KeyEvent.VK_META:
            return 0xffe7;
        case KeyEvent.VK_ALT:
            return 0xffe9;
        case KeyEvent.VK_ALT_GRAPH:
            return 0xffea;
        case KeyEvent.VK_BACK_QUOTE:
            return 0x0060;
    }

    return key;
}
 
Example 11
Source File: GOSwingEventConverter.java    From settlers-remake with MIT License 4 votes vote down vote up
private String getKeyName(KeyEvent e) {
	String text = KeyEvent.getKeyText(e.getKeyCode());
	if (text == null || text.length() != 1) {
		switch (e.getKeyCode()) {
		case KeyEvent.VK_LEFT:
			text = "LEFT";
			break;
		case KeyEvent.VK_RIGHT:
			text = "RIGHT";
			break;
		case KeyEvent.VK_DOWN:
			text = "DOWN";
			break;
		case KeyEvent.VK_UP:
			text = "UP";
			break;
		case KeyEvent.VK_PAUSE:
			text = "PAUSE";
			break;
		case KeyEvent.VK_F1:
			text = "F1";
			break;
		case KeyEvent.VK_F2:
			text = "F2";
			break;
		case KeyEvent.VK_F3:
			text = "F3";
			break;
		case KeyEvent.VK_F4:
			text = "F4";
			break;
		case KeyEvent.VK_F5:
			text = "F5";
			break;
		case KeyEvent.VK_F6:
			text = "F6";
			break;
		case KeyEvent.VK_F7:
			text = "F7";
			break;
		case KeyEvent.VK_F8:
			text = "F8";
			break;
		case KeyEvent.VK_F9:
			text = "F9";
			break;
		case KeyEvent.VK_F10:
			text = "F10";
			break;
		case KeyEvent.VK_F11:
			text = "F11";
			break;
		case KeyEvent.VK_F12:
			text = "F12";
			break;
		case KeyEvent.VK_PLUS:
			text = "+";
			break;
		case KeyEvent.VK_MINUS:
			text = "-";
			break;
		case KeyEvent.VK_DELETE:
			text = "DELETE";
			break;
		case KeyEvent.VK_SPACE:
			text = " ";
			break;
		case KeyEvent.VK_ESCAPE:
			text = "ESCAPE";
			break;
		case KeyEvent.VK_BACK_SPACE:
			text = "BACK_SPACE";
			break;
		case KeyEvent.VK_TAB:
			text = "TAB";
			break;
		default:
			text = "" + e.getKeyChar();
		}
	}
	return text;
}
 
Example 12
Source File: VncClientPacketSender.java    From cloudstack with Apache License 2.0 4 votes vote down vote up
private int mapAwtKeyToVncKey(int key) {
    switch (key) {
        case KeyEvent.VK_BACK_SPACE:
            return 0xff08;
        case KeyEvent.VK_TAB:
            return 0xff09;
        case KeyEvent.VK_ENTER:
            return 0xff0d;
        case KeyEvent.VK_ESCAPE:
            return 0xff1b;
        case KeyEvent.VK_INSERT:
            return 0xff63;
        case KeyEvent.VK_DELETE:
            return 0xffff;
        case KeyEvent.VK_HOME:
            return 0xff50;
        case KeyEvent.VK_END:
            return 0xff57;
        case KeyEvent.VK_PAGE_UP:
            return 0xff55;
        case KeyEvent.VK_PAGE_DOWN:
            return 0xff56;
        case KeyEvent.VK_LEFT:
            return 0xff51;
        case KeyEvent.VK_UP:
            return 0xff52;
        case KeyEvent.VK_RIGHT:
            return 0xff53;
        case KeyEvent.VK_DOWN:
            return 0xff54;
        case KeyEvent.VK_F1:
            return 0xffbe;
        case KeyEvent.VK_F2:
            return 0xffbf;
        case KeyEvent.VK_F3:
            return 0xffc0;
        case KeyEvent.VK_F4:
            return 0xffc1;
        case KeyEvent.VK_F5:
            return 0xffc2;
        case KeyEvent.VK_F6:
            return 0xffc3;
        case KeyEvent.VK_F7:
            return 0xffc4;
        case KeyEvent.VK_F8:
            return 0xffc5;
        case KeyEvent.VK_F9:
            return 0xffc6;
        case KeyEvent.VK_F10:
            return 0xffc7;
        case KeyEvent.VK_F11:
            return 0xffc8;
        case KeyEvent.VK_F12:
            return 0xffc9;
        case KeyEvent.VK_SHIFT:
            return 0xffe1;
        case KeyEvent.VK_CONTROL:
            return 0xffe3;
        case KeyEvent.VK_META:
            return 0xffe7;
        case KeyEvent.VK_ALT:
            return 0xffe9;
        case KeyEvent.VK_ALT_GRAPH:
            return 0xffea;
        case KeyEvent.VK_BACK_QUOTE:
            return 0x0060;
    }

    return key;
}