protected boolean isCtrtlDown(final InputState state) { if (System.getProperty("mrj.version") != null) { // mac return state.getKeyboardState().isAtLeastOneDown(Key.LEFT_META, Key.RIGHT_META); } else { // non-mac return state.getKeyboardState().isAtLeastOneDown(Key.LEFT_CONTROL, Key.RIGHT_CONTROL); } }
protected boolean isShiftDown(final InputState state) { return state.getKeyboardState().isAtLeastOneDown(Key.LEFT_SHIFT, Key.RIGHT_SHIFT); }
@Override public boolean mousePressed(final MouseButton button, final InputState state) { if (button != MouseButton.LEFT) { return super.mousePressed(button, state); } final boolean copyToggled = state.getKeyboardState().isAtLeastOneDown(Key.LEFT_SHIFT, Key.RIGHT_SHIFT); updateSelection(state.getMouseState(), copyToggled); return true; }
final boolean shiftKeyDown = state.getKeyboardState().isAtLeastOneDown(Key.LSHIFT, Key.RSHIFT); final boolean ctrlKeyDown = System.getProperty("mrj.version") == null ? state.getKeyboardState().isAtLeastOneDown(Key.LCONTROL, Key.RCONTROL) state.getKeyboardState().isAtLeastOneDown(Key.LMETA, Key.RMETA);
final boolean shiftKeyDown = state.getKeyboardState().isAtLeastOneDown(Key.LSHIFT, Key.RSHIFT); final boolean ctrlKeyDown = System.getProperty("mrj.version") == null ? state.getKeyboardState().isAtLeastOneDown(Key.LCONTROL, Key.RCONTROL) state.getKeyboardState().isAtLeastOneDown(Key.LMETA, Key.RMETA);
if (isCopyable() && state.getKeyboardState().isAtLeastOneDown(Key.LSHIFT, Key.RSHIFT)) { _selection.checkStart(); if (_selection.getState() == SelectionState.AT_START_OF_SELECTION) {
if (isCopyable() && state.getKeyboardState().isAtLeastOneDown(Key.LSHIFT, Key.RSHIFT)) { _selection.checkStart(); if (_selection.getState() == SelectionState.AT_START_OF_SELECTION) {