Skip to content

Commit

Permalink
feat: add keybind to exit the app
Browse files Browse the repository at this point in the history
Technically for MacOS it should be 'quit' instead of 'exit' but using
exit keeps it consistent to the current app and translations.
  • Loading branch information
chrisbilodeau committed Jan 6, 2025
1 parent 9187102 commit 0cbba1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ function RootLayout() {

useHotkeys(keyMap.NEW_BOARD_TAB.keys, createNewTab);
useHotkeys(keyMap.OPEN_FILE.keys, openNewFile);
useHotkeys(keyMap.EXIT_APP.keys, () => exit(0));
const [opened, setOpened] = useState(false);

const menuActions: MenuGroup[] = useMemo(
Expand Down
1 change: 1 addition & 0 deletions src/state/keybinds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
const keys = {
OPEN_FILE: { name: "Open File", keys: "mod+o" },
SAVE_FILE: { name: "Save File", keys: "mod+s" },
EXIT_APP: { name: "Exit En-Croissant", keys: "mod+q" },
NEW_BOARD_TAB: { name: "New board tab", keys: "mod+t" },
CLOSE_BOARD_TAB: { name: "Close board tab", keys: "mod+w" },
BOARD_TAB_ONE: { name: "Go to board tab one", keys: "mod+1" },
Expand Down

0 comments on commit 0cbba1e

Please sign in to comment.