private static boolean contains(@Nullable ShortcutSet shortcutSet, @NotNull KeyStroke keyStroke) {
        for (Shortcut shortcut : shortcutSet != null ? shortcutSet.getShortcuts() : Shortcut.EMPTY_ARRAY) {
          if (shortcut instanceof KeyboardShortcut &&
              ((KeyboardShortcut)shortcut).getFirstKeyStroke().equals(keyStroke)) {
            return true;
          }
        }
        return false;
      }
private static boolean contains(@Nullable ShortcutSet shortcutSet, @NotNull KeyStroke keyStroke)