diff --git a/apps/marginfi-v2-ui/src/components/desktop/DesktopNavbar/DesktopNavbar.tsx b/apps/marginfi-v2-ui/src/components/desktop/DesktopNavbar/DesktopNavbar.tsx index b171190d9e..b5bdc65619 100644 --- a/apps/marginfi-v2-ui/src/components/desktop/DesktopNavbar/DesktopNavbar.tsx +++ b/apps/marginfi-v2-ui/src/components/desktop/DesktopNavbar/DesktopNavbar.tsx @@ -90,14 +90,17 @@ const DesktopNavbar: FC = () => { // Navigation in hotkey mode useHotkeys( - "l, s, b, e, o", + "l, s+1, s+2, b, e, o", (_, handler: HotkeysEvent) => { if (isHotkeyMode) { switch (handler.keys?.join("")) { case "l": router.push("/"); break; - case "s": + case "s1": + router.push("/stake"); + break; + case "s2": router.push("/swap"); break; case "b": @@ -114,28 +117,22 @@ const DesktopNavbar: FC = () => { setShowBadges(false); } }, - { preventDefault: currentRoute == "/" ? true : false, enableOnFormTags: true } + { enableOnFormTags: true } ); useHotkeys( "meta+k", () => { setShowBadges(true); + setIsHotkeyMode(true); setTimeout(() => { setShowBadges(false); + setIsHotkeyMode(false); }, 5000); }, { enableOnFormTags: true } ); - useHotkeys( - "meta+k", - () => { - setShowBadges(false); - }, - { keyup: true, enableOnFormTags: true } - ); - return (