From 904022a2f76b74d3360cc7d3124f30e720eb9196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?rini=20=E2=98=94?= Date: Sun, 18 Aug 2024 15:20:03 -0300 Subject: [PATCH] [Webkeybinds] Don't override browser keybinds (#2792) --- src/plugins/webKeybinds.web/index.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/webKeybinds.web/index.ts b/src/plugins/webKeybinds.web/index.ts index 12d485aa..1c43dc0c 100644 --- a/src/plugins/webKeybinds.web/index.ts +++ b/src/plugins/webKeybinds.web/index.ts @@ -35,6 +35,7 @@ export default definePlugin({ if (hasCtrl) switch (e.key) { case "t": case "T": + if (!IS_VESKTOP) return; e.preventDefault(); if (e.shiftKey) { if (SelectedGuildStore.getGuildId()) NavigationRouter.transitionToGuild("@me"); @@ -47,14 +48,15 @@ export default definePlugin({ }); } break; + case "Tab": + if (!IS_VESKTOP) return; + const handler = e.shiftKey ? KeyBinds.SERVER_PREV : KeyBinds.SERVER_NEXT; + handler.action(e); + break; case ",": e.preventDefault(); SettingsRouter.open("My Account"); break; - case "Tab": - const handler = e.shiftKey ? KeyBinds.SERVER_PREV : KeyBinds.SERVER_NEXT; - handler.action(e); - break; default: if (e.key >= "1" && e.key <= "9") { e.preventDefault();