diff --git a/app/javascript/mastodon/components/hotkeys/hotkeys.stories.tsx b/app/javascript/mastodon/components/hotkeys/hotkeys.stories.tsx index 9baef18668..43002013a3 100644 --- a/app/javascript/mastodon/components/hotkeys/hotkeys.stories.tsx +++ b/app/javascript/mastodon/components/hotkeys/hotkeys.stories.tsx @@ -50,6 +50,9 @@ const hotkeyTest: Story['play'] = async ({ canvas, userEvent }) => { await userEvent.keyboard('gh'); await confirmHotkey('goToHome'); + await userEvent.keyboard('ge'); + await confirmHotkey('goToExplore'); + await userEvent.keyboard('gn'); await confirmHotkey('goToNotifications'); @@ -106,6 +109,9 @@ export const Default = { goToHome: () => { setMatchedHotkey('goToHome'); }, + goToExplore: () => { + setMatchedHotkey('goToExplore'); + }, goToNotifications: () => { setMatchedHotkey('goToNotifications'); }, diff --git a/app/javascript/mastodon/components/hotkeys/index.tsx b/app/javascript/mastodon/components/hotkeys/index.tsx index c62fc0c20a..751ec01fe5 100644 --- a/app/javascript/mastodon/components/hotkeys/index.tsx +++ b/app/javascript/mastodon/components/hotkeys/index.tsx @@ -118,6 +118,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/mastodon/features/keyboard_shortcuts/index.jsx b/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx index 8a6ebe6def..d2b041ec3f 100644 --- a/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx +++ b/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx @@ -134,6 +134,10 @@ class KeyboardShortcuts extends ImmutablePureComponent {