Java Code Examples for javafx.scene.input.KeyCode#A
The following examples show how to use
javafx.scene.input.KeyCode#A .
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: MainController.java From dev-tools with Apache License 2.0 | 5 votes |
@FXML private void handleKeyInput(final InputEvent event) { if (event instanceof KeyEvent) { final KeyEvent keyEvent = (KeyEvent) event; if (keyEvent.isControlDown() && keyEvent.getCode() == KeyCode.A) { debug("handleKeyInput"); } } }
Example 2
Source File: RTPlot.java From phoebus with Eclipse Public License 1.0 | 5 votes |
/** onKeyPressed */ private void keyPressed(final KeyEvent event) { if (! handle_keys || axisLimitsField.isVisible() ) return; if (event.getCode() == KeyCode.Z) plot.getUndoableActionManager().undoLast(); else if (event.getCode() == KeyCode.Y) plot.getUndoableActionManager().redoLast(); else if (event.getCode() == KeyCode.O) showConfigurationDialog(); else if (event.getCode() == KeyCode.T) showToolbar(! isToolbarVisible()); else if (event.getCode() == KeyCode.C) toolbar.toggleCrosshair(); else if (event.getCode() == KeyCode.L) plot.showLegend(! plot.isLegendVisible()); else if (event.getCode() == KeyCode.S) plot.stagger(true); else if (event.getCode() == KeyCode.A) plot.enableAutoScale(); else if (event.isControlDown()) toolbar.selectMouseMode(MouseMode.ZOOM_IN); else if (event.isAltDown()) toolbar.selectMouseMode(MouseMode.ZOOM_OUT); else if (event.isShiftDown()) toolbar.selectMouseMode(MouseMode.PAN); else toolbar.selectMouseMode(MouseMode.NONE); event.consume(); }
Example 3
Source File: KeyboardExample.java From JavaFX with MIT License | 5 votes |
@Override public void start(final Stage stage) { final Keyboard keyboard = new Keyboard(new Key(KeyCode.A), new Key( KeyCode.S), new Key(KeyCode.D), new Key(KeyCode.F)); final Scene scene = new Scene(new Group(keyboard.createNode())); stage.setScene(scene); stage.setTitle("Keyboard Example"); stage.show(); }