public static @NotNull Condition<AnAction> isActionFiltered(@NotNull ActionManager actionManager,
                                                              @NotNull Keymap keymap,
                                                              @NotNull Condition<? super Shortcut> predicate) {
    return action -> {
      if (action == null) return false;
      Shortcut[] actionShortcuts = keymap.getShortcuts(actionManager.getId(action));
      for (Shortcut actionShortcut : actionShortcuts) {
        if (predicate.value(actionShortcut)) {
          return true;
        }
      }
      return false;
    };
  }
public static @NotNull Condition<AnAction> isActionFiltered(@NotNull ActionManager actionManager,
                                                              @NotNull Keymap keymap,
                                                              @NotNull Condition<? super Shortcut> predicate)