Java Code Examples for java.awt.event.KeyEvent#VK_I
The following examples show how to use
java.awt.event.KeyEvent#VK_I .
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: ModifierRobotKeyTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public ModifierRobotKeyTest() 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[2]; textKeys[0] = KeyEvent.VK_A; String os = System.getProperty("os.name").toLowerCase(); if (os.contains("solaris") || os.contains("sunos")) textKeys[1] = KeyEvent.VK_S; else if (os.contains("os x")) textKeys[1] = KeyEvent.VK_K; else textKeys[1] = KeyEvent.VK_I; textStatus = new boolean[textKeys.length]; EventQueue.invokeAndWait( () -> { initializeGUI(); }); }
Example 2
Source File: SmoothMoves.java From filthy-rich-clients with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * Toggles various rendering flags */ public void keyPressed(KeyEvent ke) { int keyCode = ke.getKeyCode(); if (keyCode == KeyEvent.VK_B) { // B: Motion blur - displays trail of ghost images motionBlur = !motionBlur; } else if (keyCode == KeyEvent.VK_A) { // A: Antialiasing - Displays soft edges around graphics useAA = !useAA; createAnimationImage(); } else if (keyCode == KeyEvent.VK_C) { // C: Color - Toggles rectangle color between dark and light colors alterColor = !alterColor; createAnimationImage(); } else if (keyCode == KeyEvent.VK_I) { // I: Image - Toggles use of image or filled rectangle to show how // straight edges affect animation perception useImage = !useImage; createAnimationImage(); } else if (keyCode == KeyEvent.VK_UP) { // Up Arrow: Speed - Speeds up frame rate changeResolution(true); } else if (keyCode == KeyEvent.VK_DOWN) { // Down Arrow: Speed - Slows down frame rate changeResolution(false); } else if (keyCode == KeyEvent.VK_L) { // L: Linearity: Toggles linear/nonlinear motion linear = !linear; } else if (keyCode >= KeyEvent.VK_1 && keyCode <= KeyEvent.VK_9) { // 0-9: Blur size: Toggles size of ghost trail for motion blur blurSize = keyCode - KeyEvent.VK_0; prevMoveX = prevMoveY = null; } }
Example 3
Source File: FunctionPanel.java From opensim-gui with Apache License 2.0 | 5 votes |
public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_CONTROL) { picking = true; } else if (e.getKeyCode() == KeyEvent.VK_I) { zoomPlot(lastMouseX, lastMouseY, true); } else if (e.getKeyCode() == KeyEvent.VK_O) { zoomPlot(lastMouseX, lastMouseY, false); } else if (e.getKeyCode() == KeyEvent.VK_L || e.getKeyCode() == KeyEvent.VK_R || e.getKeyCode() == KeyEvent.VK_U || e.getKeyCode() == KeyEvent.VK_D) { panPlot(e.getKeyCode()); } else if (e.getKeyCode() == KeyEvent.VK_DELETE) { deleteSelectedNodes(); } }
Example 4
Source File: OpenEditorCommand.java From gcs with Mozilla Public License 2.0 | 4 votes |
private OpenEditorCommand() { super(I18n.Text("Open Detail Editor"), CMD_OPEN_EDITOR, KeyEvent.VK_I); }
Example 5
Source File: InitialisationAnalyserTool.java From workcraft with MIT License | 4 votes |
@Override public int getHotKeyCode() { return KeyEvent.VK_I; }
Example 6
Source File: Robot.java From xnx3 with Apache License 2.0 | 4 votes |
/** * 将字符型转换为按键码,可直接使用 {@link #press(int)}调用 * @param key 字符型文字,包含 0~9 a~z . * @return 按键码 */ public int StringToKey(String key){ switch (key) { case "a": return KeyEvent.VK_A; case "b": return KeyEvent.VK_B; case "c": return KeyEvent.VK_C; case "d": return KeyEvent.VK_D; case "e": return KeyEvent.VK_E; case "f": return KeyEvent.VK_F; case "g": return KeyEvent.VK_G; case "h": return KeyEvent.VK_H; case "i": return KeyEvent.VK_I; case "j": return KeyEvent.VK_J; case "k": return KeyEvent.VK_K; case "l": return KeyEvent.VK_L; case "m": return KeyEvent.VK_M; case "n": return KeyEvent.VK_N; case "o": return KeyEvent.VK_O; case "p": return KeyEvent.VK_P; case "q": return KeyEvent.VK_Q; case "r": return KeyEvent.VK_R; case "s": return KeyEvent.VK_S; case "t": return KeyEvent.VK_T; case "u": return KeyEvent.VK_U; case "v": return KeyEvent.VK_V; case "w": return KeyEvent.VK_W; case "x": return KeyEvent.VK_X; case "y": return KeyEvent.VK_Y; case "z": return KeyEvent.VK_Z; case "0": return KeyEvent.VK_0; case "1": return KeyEvent.VK_1; case "2": return KeyEvent.VK_2; case "3": return KeyEvent.VK_3; case "4": return KeyEvent.VK_4; case "5": return KeyEvent.VK_5; case "6": return KeyEvent.VK_6; case "7": return KeyEvent.VK_7; case "8": return KeyEvent.VK_8; case "9": return KeyEvent.VK_9; case ".": return KeyEvent.VK_PERIOD; default: break; } return 0; }
Example 7
Source File: KeyCodeToChar.java From Repeat with Apache License 2.0 | 4 votes |
private static String getLowerCaseAlphaChar(int code) { switch (code) { case KeyEvent.VK_Q: return "q"; case KeyEvent.VK_W: return "w"; case KeyEvent.VK_E: return "e"; case KeyEvent.VK_R: return "r"; case KeyEvent.VK_T: return "t"; case KeyEvent.VK_Y: return "y"; case KeyEvent.VK_U: return "u"; case KeyEvent.VK_I: return "i"; case KeyEvent.VK_O: return "o"; case KeyEvent.VK_P: return "p"; case KeyEvent.VK_A: return "a"; case KeyEvent.VK_S: return "s"; case KeyEvent.VK_D: return "d"; case KeyEvent.VK_F: return "f"; case KeyEvent.VK_G: return "g"; case KeyEvent.VK_H: return "h"; case KeyEvent.VK_J: return "j"; case KeyEvent.VK_K: return "k"; case KeyEvent.VK_L: return "l"; case KeyEvent.VK_Z: return "z"; case KeyEvent.VK_X: return "x"; case KeyEvent.VK_C: return "c"; case KeyEvent.VK_V: return "v"; case KeyEvent.VK_B: return "b"; case KeyEvent.VK_N: return "n"; case KeyEvent.VK_M: return "m"; default: return ""; } }
Example 8
Source File: KeyCodeToChar.java From Repeat with Apache License 2.0 | 4 votes |
private static String getUpperCaseAlphaChar(int code) { switch (code) { case KeyEvent.VK_Q: return "Q"; case KeyEvent.VK_W: return "W"; case KeyEvent.VK_E: return "E"; case KeyEvent.VK_R: return "R"; case KeyEvent.VK_T: return "T"; case KeyEvent.VK_Y: return "Y"; case KeyEvent.VK_U: return "U"; case KeyEvent.VK_I: return "I"; case KeyEvent.VK_O: return "O"; case KeyEvent.VK_P: return "P"; case KeyEvent.VK_A: return "A"; case KeyEvent.VK_S: return "S"; case KeyEvent.VK_D: return "D"; case KeyEvent.VK_F: return "F"; case KeyEvent.VK_G: return "G"; case KeyEvent.VK_H: return "H"; case KeyEvent.VK_J: return "J"; case KeyEvent.VK_K: return "K"; case KeyEvent.VK_L: return "L"; case KeyEvent.VK_Z: return "Z"; case KeyEvent.VK_X: return "X"; case KeyEvent.VK_C: return "C"; case KeyEvent.VK_V: return "V"; case KeyEvent.VK_B: return "B"; case KeyEvent.VK_N: return "N"; case KeyEvent.VK_M: return "M"; default: return ""; } }
Example 9
Source File: ImportAction.java From PIPE with MIT License | 4 votes |
public ImportAction() { super("Import", "Import from eDSPN", KeyEvent.VK_I, InputEvent.META_DOWN_MASK); }
Example 10
Source File: ImmediateTransitionAction.java From PIPE with MIT License | 4 votes |
/** * Constructor * @param applicationModel PIPE current application model */ public ImmediateTransitionAction(PipeApplicationModel applicationModel) { super("Immediate transition", "Add an immediate transition (alt-I)", KeyEvent.VK_I, InputEvent.ALT_DOWN_MASK, applicationModel); }