Skip to content

Commit 9c61e31

Browse files
authored
chore: Update CMD+R keybind for toggle focus, remove refreshing and the CMD+R refresh suggestion at bottom of app (#743)
1 parent babc9b7 commit 9c61e31

File tree

5 files changed

+4
-24
lines changed

5 files changed

+4
-24
lines changed

apps/twig/src/main/menu.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import os from "node:os";
66
import path from "node:path";
77
import {
88
app,
9-
BrowserWindow,
109
clipboard,
1110
dialog,
1211
Menu,
@@ -207,17 +206,6 @@ function buildViewMenu(): MenuItemConstructorOptions {
207206
return {
208207
label: "View",
209208
submenu: [
210-
{
211-
label: "Reload",
212-
accelerator: "CmdOrCtrl+Shift+R",
213-
click: () => BrowserWindow.getFocusedWindow()?.webContents.reload(),
214-
},
215-
{
216-
label: "Force Reload",
217-
accelerator: "CmdOrCtrl+Shift+Alt+R",
218-
click: () =>
219-
BrowserWindow.getFocusedWindow()?.webContents.reloadIgnoringCache(),
220-
},
221209
{ role: "toggleDevTools" },
222210
{ type: "separator" },
223211
{ role: "resetZoom" },

apps/twig/src/renderer/components/GlobalEventHandlers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export function GlobalEventHandlers({
173173
useHotkeys(SHORTCUTS.SHORTCUTS_SHEET, onToggleShortcutsSheet, globalOptions);
174174

175175
useHotkeys(
176-
SHORTCUTS.TASK_REFRESH,
176+
SHORTCUTS.TOGGLE_FOCUS,
177177
handleToggleFocus,
178178
{
179179
...globalOptions,

apps/twig/src/renderer/constants/keyboard-shortcuts.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const SHORTCUTS = {
1212
SWITCH_TASK: "mod+0,mod+1,mod+2,mod+3,mod+4,mod+5,mod+6,mod+7,mod+8,mod+9",
1313
OPEN_IN_EDITOR: "mod+o",
1414
COPY_PATH: "mod+shift+c",
15-
TASK_REFRESH: "mod+r",
15+
TOGGLE_FOCUS: "mod+r",
1616
BLUR: "escape",
1717
SUBMIT_BLUR: "mod+enter",
1818
} as const;
@@ -41,8 +41,8 @@ export const KEYBOARD_SHORTCUTS: KeyboardShortcut[] = [
4141
category: "general",
4242
},
4343
{
44-
id: "task-refresh",
45-
keys: SHORTCUTS.TASK_REFRESH,
44+
id: "toggle-focus",
45+
keys: SHORTCUTS.TOGGLE_FOCUS,
4646
description: "Toggle focus mode",
4747
category: "general",
4848
context: "Worktree task",

apps/twig/src/renderer/features/task-detail/components/TaskDetail.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ export function TaskDetail({ task: initialTask }: TaskDetailProps) {
5858
keys: [navigator.platform.includes("Mac") ? "⌘" : "Ctrl", "K"],
5959
description: "Command",
6060
},
61-
{
62-
keys: [navigator.platform.includes("Mac") ? "⌘" : "Ctrl", "R"],
63-
description: "Refresh",
64-
},
6561
],
6662
"replace",
6763
);

apps/twig/src/renderer/stores/statusBarStore.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ const defaultKeyHints: KeyHint[] = [
2727
keys: [navigator.platform.includes("Mac") ? "⌘" : "Ctrl", "K"],
2828
description: "Command",
2929
},
30-
{
31-
keys: [navigator.platform.includes("Mac") ? "⌘" : "Ctrl", "R"],
32-
description: "Refresh",
33-
},
3430
];
3531

3632
export const useStatusBarStore = create<StatusBarStore>((set, _get) => ({

0 commit comments

Comments
 (0)