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

Examples of org.waveprotocol.wave.client.common.util.KeyCombo


            return;
          }
          // Test that the event is meaningful (and stop bubbling if it is not).
          SignalEvent signal = SignalEventImpl.create(realEvent.<Event>cast(), true);
          if (signal != null) {
            KeyCombo key = EventWrapper.getKeyCombo(signal);
            if (globalHandler.onKeySignal(key)) {
              event.preventDefault();
            }
          }
        } finally {
View Full Code Here


   *
   * @return true if it is safe to ignore, or false which will result in further
   *         handling.
   */
  private boolean isWhiteListedCombo(SignalEvent signal) {
    KeyCombo keyCombo = EventWrapper.getKeyCombo(signal);
    switch (keyCombo) {
      // Edit actions:
      // Allow cut/copy/paste combos and handle the actual clipboard events
      // later.
      case ORDER_C: // copy
View Full Code Here

    return false;
  }

  private boolean isBlackListedCombo(SignalEvent event) {
    KeyCombo keyCombo = EventWrapper.getKeyCombo(event);
    switch (keyCombo) {
      // Disallow undo
      case ORDER_Z:
        return true;
    }
View Full Code Here

        return;
      }
      // Test that the event is meaningful (and stop bubbling if it is not).
      SignalEvent signal = SignalEventImpl.create(realEvent.<Event>cast(), true);
      if (signal != null) {
        KeyCombo key = EventWrapper.getKeyCombo(signal);
        if (globalHandler.onKeySignal(key)) {
          event.preventDefault();
        }
      }
    }
View Full Code Here

    @Override
    public boolean handleRangeKeyCombo(EditorEvent event, ContentRange selection) {
      assert !selection.isCollapsed();

      KeyCombo combo = EventWrapper.getKeyCombo(event.asEvent());

      // TODO(patcoleman): separate collapsed and normal, maybe also incorporate handled flag.
      if (keyBindings.hasAction(combo)) {
        keyBindings.getAction(combo).execute(EditorImpl.this);
        return true;
View Full Code Here

    @Override
    public boolean handleCollapsedKeyCombo(EditorEvent event, Point<ContentNode> caret) {
      // Handle events with carets
      // TODO(user): handle lots more events here
      KeyCombo combo = EventWrapper.getKeyCombo(event.asEvent());

      // TODO(patcoleman): separate collapsed and normal, maybe also incorporate handled flag.
      if (keyBindings.hasAction(combo)) {
        keyBindings.getAction(combo).execute(EditorImpl.this);
        return true;
View Full Code Here

        editorUndoManager.redo();

        return true;
      }

      KeyCombo combo = new EventWrapper(event.asEvent()).getKeyCombo();
      switch (combo) {
        // TODO(user): deprecate CTRL_ALT_D in favour of CTRL_ALT_G, ctrl alt d
        // is a bad combo for linux as it minimizes the window in many
        // window managers.
        case CTRL_ALT_D:
View Full Code Here

    }
  }

  @Override
  public boolean onKeySignal(Widget sender, SignalEvent signal) {
    KeyCombo key = EventWrapper.getKeyCombo(signal);
    switch (key) {
      case SHIFT_ENTER:
        endSession();
        return true;
      case ESC:
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.client.common.util.KeyCombo

Copyright © 2018 www.massapicom. 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.