Example usage for javafx.scene.input KeyCode SHIFT

List of usage examples for javafx.scene.input KeyCode SHIFT

Introduction

In this page you can find the example usage for javafx.scene.input KeyCode SHIFT.

Prototype

KeyCode SHIFT

To view the source code for javafx.scene.input KeyCode SHIFT.

Click Source Link

Document

Constant for the Shift key.

Usage

From source file:org.eclipse.jubula.rc.javafx.driver.RobotJavaFXImpl.java

/**
 * @param clickModifier//from  w  w w .  j  av a 2  s. co  m
 *            the click modifier to use for this click
 * @return an array of modifiers to press before click and release after
 *         click
 */
private int[] getModifierMask(ClickModifier clickModifier) {
    int[] modifier = new int[0];
    if (clickModifier.hasModifiers(ClickModifier.M1)) {
        modifier = ArrayUtils.add(modifier, KeyCode.CONTROL.impl_getCode());
    }
    if (clickModifier.hasModifiers(ClickModifier.M2)) {
        modifier = ArrayUtils.add(modifier, KeyCode.SHIFT.impl_getCode());
    }
    if (clickModifier.hasModifiers(ClickModifier.M3)) {
        modifier = ArrayUtils.add(modifier, KeyCode.ALT.impl_getCode());
    }
    if (clickModifier.hasModifiers(ClickModifier.M4)) {
        modifier = ArrayUtils.add(modifier, KeyCode.META.impl_getCode());
    }
    return modifier;
}