Java 类com.intellij.ui.KeyStrokeAdapter 实例源码

项目:consulo    文件:ShortcutTextField.java   
@Override
protected void processKeyEvent(KeyEvent e) {
  if (e.getID() == KeyEvent.KEY_PRESSED) {
    int keyCode = e.getKeyCode();
    if (
            keyCode == KeyEvent.VK_SHIFT ||
            keyCode == KeyEvent.VK_ALT ||
            keyCode == KeyEvent.VK_CONTROL ||
            keyCode == KeyEvent.VK_ALT_GRAPH ||
            keyCode == KeyEvent.VK_META
            ){
      return;
    }
    setKeyStroke(KeyStrokeAdapter.getDefaultKeyStroke(e));
  }
}
项目:intellij-ce-playground    文件:ShortcutTextField.java   
protected void processKeyEvent(KeyEvent e) {
  if (e.getID() == KeyEvent.KEY_PRESSED) {
    int keyCode = e.getKeyCode();
    if (
      keyCode == KeyEvent.VK_SHIFT ||
      keyCode == KeyEvent.VK_ALT ||
      keyCode == KeyEvent.VK_CONTROL ||
      keyCode == KeyEvent.VK_ALT_GRAPH ||
      keyCode == KeyEvent.VK_META
    ){
      return;
    }
    setKeyStroke(KeyStrokeAdapter.getDefaultKeyStroke(e));
  }
}
项目:MavenHelper    文件:JumpToSourceAction.java   
@NotNull
private static String getLabel() {
    Shortcut[] shortcuts = KeymapManager.getInstance().getActiveKeymap().getShortcuts("EditSource");
    if (shortcuts.length > 0) {
        Shortcut shortcut = shortcuts[0];
        if (shortcut.isKeyboard()) {
            KeyboardShortcut key = (KeyboardShortcut) shortcut;
            String s = KeyStrokeAdapter.toString(key.getFirstKeyStroke());
            if (s != null) {
                return "Jump To Source [" + s.toUpperCase() + "]";
            }
        }
    }
    return "Jump To Source";
}
项目:intellij-ce-playground    文件:KeymapImpl.java   
/**
 * @return string representation of passed keystroke.
 */
public static String getKeyShortcutString(KeyStroke keyStroke) {
  return KeyStrokeAdapter.toString(keyStroke);
}
项目:consulo    文件:KeymapImpl.java   
/**
 * @return string representation of passed keystroke.
 */
public static String getKeyShortcutString(KeyStroke keyStroke) {
  return KeyStrokeAdapter.toString(keyStroke);
}