Package org.waveprotocol.wave.client.common.util.SignalEvent

Examples of org.waveprotocol.wave.client.common.util.SignalEvent.KeyModifier.check()


    // When modifier key is pressed on Mac it is instantly applied to modifiers.
    // So we check on Mac that only "CMD" is pressed.
    // On non-Mac when "CTRL" is the first key in sequence, there are no
    // modifiers applied yet.
    KeyModifier modifier = UserAgent.isMac() ? KeyModifier.META : KeyModifier.NONE;
    return modifier.check(signal) && (signal.getKeyCode() == getActionKeyCode());
  }

  private static int getActionKeyCode() {
    return UserAgent.isMac() ? COMMAND_KEY_CODE : KeyCodes.KEY_CTRL;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.