From 2f020099ecb08af5f2fe63dd5d254f92992fe42e Mon Sep 17 00:00:00 2001 From: sawka Date: Mon, 19 Aug 2024 22:39:52 -0700 Subject: [PATCH] cmd:n and cmd:t --- emain/emain.ts | 2 +- frontend/app/appkey.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/emain/emain.ts b/emain/emain.ts index ee76d548d..8d76c3cb3 100644 --- a/emain/emain.ts +++ b/emain/emain.ts @@ -677,7 +677,7 @@ function getAppMenu() { const fileMenu: Electron.MenuItemConstructorOptions[] = [ { label: "New Window", - accelerator: "CommandOrControl+N", + accelerator: "CommandOrControl+Shift+N", click: () => fireAndForget(createNewWaveWindow), }, { diff --git a/frontend/app/appkey.ts b/frontend/app/appkey.ts index 932c55633..834d0f51d 100644 --- a/frontend/app/appkey.ts +++ b/frontend/app/appkey.ts @@ -247,10 +247,16 @@ function appHandleKeyDown(waveEvent: WaveKeyboardEvent): boolean { switchTab(-1); return true; } - if (keyutil.checkKeyPressed(waveEvent, "Cmd:t")) { + if (keyutil.checkKeyPressed(waveEvent, "Cmd:n")) { handleCmdT(); return true; } + if (keyutil.checkKeyPressed(waveEvent, "Cmd:t")) { + const workspace = globalStore.get(atoms.workspace); + const newTabName = `T${workspace.tabids.length + 1}`; + services.ObjectService.AddTabToWorkspace(newTabName, true); + return true; + } for (let idx = 1; idx <= 9; idx++) { if (keyutil.checkKeyPressed(waveEvent, `Cmd:${idx}`)) { switchTabAbs(idx);