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.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
improve: Keyboard shortcut to toggle terminal (#2622)
Wasim Sandhu512886a0f850
diff --git a/docs/guides/editor_features/hotkeys.md b/docs/guides/editor_features/hotkeys.mdindex 4bcc111c09..3bb66af73e 100644--- a/docs/guides/editor_features/hotkeys.md+++ b/docs/guides/editor_features/hotkeys.md@@ -45,6 +45,7 @@ You can find a list of available hotkeys below:| `global.save` || `global.showHelp` || `global.toggleLanguage` |+| `global.toggleTerminal` || `global.toggleSidebar` || `global.unfoldCode` || `markdown.blockquote` |diff --git a/frontend/src/components/editor/chrome/wrapper/footer.tsx b/frontend/src/components/editor/chrome/wrapper/footer.tsxindex c89f5ee142..539183febb 100644--- a/frontend/src/components/editor/chrome/wrapper/footer.tsx+++ b/frontend/src/components/editor/chrome/wrapper/footer.tsx@@ -27,6 +27,7 @@ import {} from "@/components/ui/dropdown-menu";import { ChevronDownIcon } from "lucide-react";import { FooterItem } from "./footer-item";+import { useHotkey } from "@/hooks/useHotkey";export const Footer: React.FC = () => {const { selectedPanel, isTerminalOpen } = useChromeState();@@ -41,6 +42,10 @@ export const Footer: React.FC = () => {const errorPanel = PANELS.find((p) => p.type === "errors");invariant(errorPanel, "Error panel not found");+ useHotkey("global.toggleTerminal", () => {+ toggleTerminal();+ });+return (<footer className="h-10 py-2 bg-background flex items-center text-muted-foreground text-md pl-1 pr-4 border-t border-border select-none no-print text-sm shadow-[0_0_4px_1px_rgba(0,0,0,0.1)] z-50 print:hidden"><FooterItemdiff --git a/frontend/src/core/hotkeys/hotkeys.ts b/frontend/src/core/hotkeys/hotkeys.tsindex 76d3ae6f48..1a70445576 100644--- a/frontend/src/core/hotkeys/hotkeys.ts+++ b/frontend/src/core/hotkeys/hotkeys.ts@@ -289,6 +289,11 @@ const DEFAULT_HOT_KEY = {group: "Editing",key: "F4",},+ "global.toggleTerminal": {+ name: "Toggle terminal",+ group: "Other",+ key: "Ctrl-`",+ },// Global Navigation"global.focusTop": {