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:
+15
-3
@@ -1864,6 +1864,18 @@ async function appMain() {
|
|||||||
if (fileMenu?.submenu) {
|
if (fileMenu?.submenu) {
|
||||||
fileMenu.submenu.insert(
|
fileMenu.submenu.insert(
|
||||||
0,
|
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({
|
new MenuItem({
|
||||||
label: 'New Chat Window',
|
label: 'New Chat Window',
|
||||||
accelerator: process.platform === 'darwin' ? 'Cmd+N' : 'Ctrl+N',
|
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
|
// Open goose to specific dir and set that as its working space
|
||||||
fileMenu.submenu.insert(
|
fileMenu.submenu.insert(
|
||||||
1,
|
2,
|
||||||
new MenuItem({
|
new MenuItem({
|
||||||
label: 'Open Directory...',
|
label: 'Open Directory...',
|
||||||
accelerator: 'CmdOrCtrl+O',
|
accelerator: 'CmdOrCtrl+O',
|
||||||
@@ -1887,7 +1899,7 @@ async function appMain() {
|
|||||||
const recentFilesSubmenu = buildRecentFilesMenu();
|
const recentFilesSubmenu = buildRecentFilesMenu();
|
||||||
if (recentFilesSubmenu.length > 0) {
|
if (recentFilesSubmenu.length > 0) {
|
||||||
fileMenu.submenu.insert(
|
fileMenu.submenu.insert(
|
||||||
2,
|
3,
|
||||||
new MenuItem({
|
new MenuItem({
|
||||||
label: 'Recent Directories',
|
label: 'Recent Directories',
|
||||||
submenu: recentFilesSubmenu,
|
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.
|
// The Close Window item is here.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user