Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/browser/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ function AppInner() {
} else if (matchesKeybind(e, KEYBINDS.TOGGLE_SIDEBAR)) {
e.preventDefault();
setSidebarCollapsed((prev) => !prev);
} else if (matchesKeybind(e, KEYBINDS.OPEN_SETTINGS)) {
e.preventDefault();
openSettings();
}
};

Expand All @@ -473,6 +476,7 @@ function AppInner() {
isCommandPaletteOpen,
closeCommandPalette,
openCommandPalette,
openSettings,
]);

// Handle workspace fork switch event
Expand Down
3 changes: 2 additions & 1 deletion src/browser/components/SettingsButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Settings } from "lucide-react";
import { useSettings } from "@/browser/contexts/SettingsContext";
import { TooltipWrapper, Tooltip } from "./Tooltip";
import { formatKeybind, KEYBINDS } from "@/browser/utils/ui/keybinds";

export function SettingsButton() {
const { open } = useSettings();
Expand All @@ -16,7 +17,7 @@ export function SettingsButton() {
>
<Settings className="h-3.5 w-3.5" aria-hidden />
</button>
<Tooltip align="right">Settings</Tooltip>
<Tooltip align="right">Settings ({formatKeybind(KEYBINDS.OPEN_SETTINGS)})</Tooltip>
</TooltipWrapper>
);
}
4 changes: 4 additions & 0 deletions src/browser/utils/ui/keybinds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,4 +281,8 @@ export const KEYBINDS = {

/** Toggle hunk expand/collapse in Code Review panel */
TOGGLE_HUNK_COLLAPSE: { key: " " },

/** Open settings modal */
// macOS: Cmd+, Win/Linux: Ctrl+,
OPEN_SETTINGS: { key: ",", ctrl: true },
} as const;