/* * Vencord, a Discord client mod * Copyright (c) 2026 Evandro * SPDX-License-Identifier: GPL-3.0-or-later */ import { IS_LINUX } from "@utils/constants"; import { findStoreLazy } from "@webpack"; export type Shortcut = [number, number, ...unknown[]][]; export const KeybindsStore = findStoreLazy("KeybindsStore"); export function discordUtils() { return DiscordNative.nativeModules.requireModule("discord_utils"); } export function portalActive(): boolean { return IS_LINUX && discordUtils().isWaylandGlobalShortcutsAvailable?.() === true; } export function portalTrigger(shortcut: Shortcut): string { return discordUtils().getWaylandPortalTrigger?.(shortcut.map(([type, code]) => [type, code])) ?? ""; }