diff --git a/src/ui/locales/en.json b/src/ui/locales/en.json index ea9dbfea6..89112aada 100644 --- a/src/ui/locales/en.json +++ b/src/ui/locales/en.json @@ -1514,6 +1514,18 @@ "title": "Keyboard Shortcuts", "description": "Bind keys to actions in the terminal and the app, or change the built-in shortcuts.", "defaultsHeading": "Built-in Shortcuts", + "fixedHeading": "App Shortcuts", + "fixed": { + "splitRight": "Split right", + "splitDown": "Split down", + "zoomPane": "Zoom the focused pane", + "navigatePane": "Move between panes", + "nextTab": "Next tab", + "previousTab": "Previous tab", + "jumpTab": "Jump to tab", + "previousView": "Back to the previous sidebar view", + "fullscreen": "Toggle fullscreen" + }, "customHeading": "Custom Shortcuts", "addBinding": "Add Shortcut", "addBindingTitle": "Add Shortcut", diff --git a/src/ui/sidebar/FixedShortcutsList.tsx b/src/ui/sidebar/FixedShortcutsList.tsx new file mode 100644 index 000000000..2e36ccd7d --- /dev/null +++ b/src/ui/sidebar/FixedShortcutsList.tsx @@ -0,0 +1,48 @@ +import { useTranslation } from "react-i18next"; +import { tabJumpHotkeyKeys } from "@/lib/tab-jump-hotkey"; + +/** Shortcuts the shell handles itself; they cannot be rebound. */ +export function fixedShortcuts(): Array<{ keys: string[]; labelKey: string }> { + return [ + { keys: ["Ctrl", "Shift", "\\"], labelKey: "splitRight" }, + { keys: ["Ctrl", "Shift", "-"], labelKey: "splitDown" }, + { keys: ["Ctrl", "Shift", "Enter"], labelKey: "zoomPane" }, + { keys: ["Alt", "↑↓←→"], labelKey: "navigatePane" }, + { keys: ["Ctrl", "Shift", "]"], labelKey: "nextTab" }, + { keys: ["Ctrl", "Shift", "["], labelKey: "previousTab" }, + { keys: tabJumpHotkeyKeys(), labelKey: "jumpTab" }, + { keys: ["Ctrl", "Shift", "E"], labelKey: "previousView" }, + { keys: ["Ctrl", "Shift", "F"], labelKey: "fullscreen" }, + ]; +} + +export function FixedShortcutsList() { + const { t } = useTranslation(); + return ( +