web: add keyboard shortcut for opening settings (#7701)

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
This commit is contained in:
01zulfi
2025-03-01 09:31:23 +05:00
committed by GitHub
parent 303282624e
commit 71fc2a3cac
2 changed files with 7 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ import { useEditorStore } from "../stores/editor-store";
import { useStore as useSearchStore } from "../stores/search-store";
import { useEditorManager } from "../components/editor/manager";
import { CommandPaletteDialog } from "../dialogs/command-palette";
import { hashNavigate } from "../navigation";
function isInEditor(e: KeyboardEvent) {
return (
@@ -198,6 +199,11 @@ const KEYMAP = [
isCommandMode: e.key === "k"
}).catch(() => {});
}
},
{
keys: ["ctrl+,", "command+,"],
description: "Open settings",
action: () => hashNavigate("/settings", { replace: true })
}
];

View File

@@ -275,6 +275,7 @@ function SettingsSideBar(props: SettingsSideBarProps) {
<Input
id="search"
name="search"
autoFocus
placeholder={strings.search()}
data-test-id="settings-search"
sx={{