Added CMD+T keyboard shortcut that takes you to the Home tab (#4541)

Signed-off-by: Guillaume Simard <2000390+GuiSim@users.noreply.github.com>
This commit is contained in:
Guillaume Simard
2025-09-30 12:43:11 -04:00
committed by GitHub
parent 114a3b31cb
commit 29fd4b97aa
+15 -3
View File
@@ -1864,6 +1864,18 @@ async function appMain() {
if (fileMenu?.submenu) {
fileMenu.submenu.insert(
0,
new MenuItem({
label: 'New Chat',
accelerator: 'CmdOrCtrl+T',
click() {
const focusedWindow = BrowserWindow.getFocusedWindow();
if (focusedWindow) focusedWindow.webContents.send('set-view', '');
},
})
);
fileMenu.submenu.insert(
1,
new MenuItem({
label: 'New Chat Window',
accelerator: process.platform === 'darwin' ? 'Cmd+N' : 'Ctrl+N',
@@ -1875,7 +1887,7 @@ async function appMain() {
// Open goose to specific dir and set that as its working space
fileMenu.submenu.insert(
1,
2,
new MenuItem({
label: 'Open Directory...',
accelerator: 'CmdOrCtrl+O',
@@ -1887,7 +1899,7 @@ async function appMain() {
const recentFilesSubmenu = buildRecentFilesMenu();
if (recentFilesSubmenu.length > 0) {
fileMenu.submenu.insert(
2,
3,
new MenuItem({
label: 'Recent Directories',
submenu: recentFilesSubmenu,
@@ -1895,7 +1907,7 @@ async function appMain() {
);
}
fileMenu.submenu.insert(3, new MenuItem({ type: 'separator' }));
fileMenu.submenu.insert(4, new MenuItem({ type: 'separator' }));
// The Close Window item is here.