Example usage for javafx.scene.input KeyCode META

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

Introduction

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

Prototype

KeyCode META

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

Click Source Link

Document

Constant for the Meta key.

Usage

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

/**
 * @param clickModifier/*from  ww w .j  av a2 s.c  o 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;
}