From c8f0715d2923f6da85eecbab8924377b2f8311db Mon Sep 17 00:00:00 2001 From: Chris Bilodeau <7334990+chrisbilodeau@users.noreply.github.com> Date: Fri, 3 Jan 2025 16:44:30 -0700 Subject: [PATCH] fix: use mod for default keybinds mod evaluates to ctrl on Windows/Linux and cmd on MacOS fixes https://github.com/franciscoBSalgueiro/en-croissant/issues/338 --- src/state/keybinds.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/state/keybinds.ts b/src/state/keybinds.ts index 7fdbf1ff..a03a419b 100644 --- a/src/state/keybinds.ts +++ b/src/state/keybinds.ts @@ -5,12 +5,12 @@ import type { } from "jotai/vanilla/utils/atomWithStorage"; const keys = { - NEW_TAB: { name: "New tab", keys: "ctrl+t" }, - CLOSE_TAB: { name: "Close tab", keys: "ctrl+w" }, - OPEN_FILE: { name: "Open File", keys: "ctrl+o" }, - SAVE_FILE: { name: "Save File", keys: "ctrl+s" }, + NEW_TAB: { name: "New tab", keys: "mod+t" }, + CLOSE_TAB: { name: "Close tab", keys: "mod+w" }, + OPEN_FILE: { name: "Open File", keys: "mod+o" }, + SAVE_FILE: { name: "Save File", keys: "mod+s" }, SWAP_ORIENTATION: { name: "Swap orientation", keys: "f" }, - CLEAR_SHAPES: { name: "Clear shapes", keys: "ctrl+l" }, + CLEAR_SHAPES: { name: "Clear shapes", keys: "mod+l" }, NEXT_MOVE: { name: "Next move", keys: "arrowright" }, PREVIOUS_MOVE: { name: "Previous move", keys: "arrowleft" }, GO_TO_BRANCH_START: { name: "Go to start of branch", keys: "arrowup" }, @@ -42,8 +42,8 @@ const keys = { ANNOTATION_DUBIOUS: { name: "Toggle dubious move annotation", keys: "4" }, ANNOTATION_MISTAKE: { name: "Toggle mistake move annotation", keys: "5" }, ANNOTATION_BLUNDER: { name: "Toggle blunder move annotation", keys: "6" }, - TOGGLE_ALL_ENGINES: { name: "Toggle all engines", keys: "ctrl+a" }, - TOGGLE_BLUR: { name: "Toggle blur", keys: "ctrl+b" }, + TOGGLE_ALL_ENGINES: { name: "Toggle all engines", keys: "mod+a" }, + TOGGLE_BLUR: { name: "Toggle blur", keys: "mod+b" }, PREVIOUS_GAME: { name: "Previous game", keys: "pageup" }, NEXT_GAME: { name: "Next game", keys: "pagedown" }, };