public static @Nullable KeyStroke getKeyStroke(final @NotNull ShortcutSet shortcutSet) {
    final Shortcut[] shortcuts = shortcutSet.getShortcuts();
    if (shortcuts.length == 0 || !(shortcuts[0] instanceof KeyboardShortcut shortcut)) return null;
    if (shortcut.getSecondKeyStroke() != null) {
      return null;
    }
    return shortcut.getFirstKeyStroke();
  }
public static @Nullable KeyStroke getKeyStroke(final @NotNull ShortcutSet shortcutSet)