Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

Add hotkey to toggle minimap (`Mod-Shift-i`) (#5730)

Trevor Manz5fb782ba76ce
diff --git a/frontend/src/components/editor/chrome/wrapper/minimap.tsx b/frontend/src/components/editor/chrome/wrapper/minimap.tsx
index eade978628..9838d48a73 100644
--- a/frontend/src/components/editor/chrome/wrapper/minimap.tsx
+++ b/frontend/src/components/editor/chrome/wrapper/minimap.tsx
@@ -9,6 +9,7 @@ import { cellFocusAtom, useCellFocusActions } from "@/core/cells/focus";
import type { CellId } from "@/core/cells/ids";
import { useVariables } from "@/core/variables/state";
import type { VariableName } from "@/core/variables/types";
+import { useHotkey } from "@/hooks/useHotkey";
import { cn } from "@/utils/cn";
import { useChromeActions, useChromeState } from "../state";
import {
@@ -186,8 +187,9 @@ const MinimapInternal: React.FC<{
};
export const Minimap: React.FC = () => {
- const { setIsMinimapOpen } = useChromeActions();
+ const { setIsMinimapOpen, toggleMinimap } = useChromeActions();
const { isMinimapOpen } = useChromeState();
+ useHotkey("global.toggleMinimap", () => toggleMinimap());
return <MinimapInternal open={isMinimapOpen} setOpen={setIsMinimapOpen} />;
};
diff --git a/frontend/src/core/hotkeys/hotkeys.ts b/frontend/src/core/hotkeys/hotkeys.ts
index 35a6cdd9d1..614ef0a7b6 100644
--- a/frontend/src/core/hotkeys/hotkeys.ts
+++ b/frontend/src/core/hotkeys/hotkeys.ts
@@ -349,6 +349,11 @@ const DEFAULT_HOT_KEY = {
group: "Editing",
key: "Mod-Shift-/",
},
+ "global.toggleMinimap": {
+ name: "Toggle Minimap",
+ group: "Other",
+ key: "Mod-Shift-i",
+ },
// Global Navigation
"global.focusTop": {