From 739c35811e07135290ab084ea10b511fe256b83b Mon Sep 17 00:00:00 2001 From: Antoine Cellerier Date: Mon, 2 Mar 2026 14:49:28 +0100 Subject: [PATCH] [Glitch] Add g+e keyboard shortcut for /explore (trending) Port 87004ddb96c766a3dce889bad098c16f80bb3d0a to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/components/hotkeys/index.tsx | 1 + .../flavours/glitch/features/keyboard_shortcuts/index.jsx | 4 ++++ app/javascript/flavours/glitch/features/ui/index.jsx | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/app/javascript/flavours/glitch/components/hotkeys/index.tsx b/app/javascript/flavours/glitch/components/hotkeys/index.tsx index 29d43266e1..e923dc0d65 100644 --- a/app/javascript/flavours/glitch/components/hotkeys/index.tsx +++ b/app/javascript/flavours/glitch/components/hotkeys/index.tsx @@ -119,6 +119,7 @@ const hotkeyMatcherMap = { openMedia: just('e'), onTranslate: just('t'), goToHome: sequence('g', 'h'), + goToExplore: sequence('g', 'e'), goToNotifications: sequence('g', 'n'), goToLocal: sequence('g', 'l'), goToFederated: sequence('g', 't'), diff --git a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx index 5a4589aa17..6d0bd0db0b 100644 --- a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx +++ b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx @@ -142,6 +142,10 @@ class KeyboardShortcuts extends ImmutablePureComponent { g+h + + g+e + + g+n diff --git a/app/javascript/flavours/glitch/features/ui/index.jsx b/app/javascript/flavours/glitch/features/ui/index.jsx index f434bf7a8e..16ece913b0 100644 --- a/app/javascript/flavours/glitch/features/ui/index.jsx +++ b/app/javascript/flavours/glitch/features/ui/index.jsx @@ -580,6 +580,10 @@ class UI extends PureComponent { this.props.history.push('/home'); }; + handleHotkeyGoToExplore = () => { + this.props.history.push('/explore'); + }; + handleHotkeyGoToNotifications = () => { this.props.history.push('/notifications'); }; @@ -648,6 +652,7 @@ class UI extends PureComponent { moveToTop: this.handleMoveToTop, back: this.handleHotkeyBack, goToHome: this.handleHotkeyGoToHome, + goToExplore: this.handleHotkeyGoToExplore, goToNotifications: this.handleHotkeyGoToNotifications, goToLocal: this.handleHotkeyGoToLocal, goToFederated: this.handleHotkeyGoToFederated,