cmd:n and cmd:t

This commit is contained in:
sawka 2024-08-19 22:39:52 -07:00
parent e70e08e531
commit 2f020099ec
2 changed files with 8 additions and 2 deletions

View File

@ -677,7 +677,7 @@ function getAppMenu() {
const fileMenu: Electron.MenuItemConstructorOptions[] = [
{
label: "New Window",
accelerator: "CommandOrControl+N",
accelerator: "CommandOrControl+Shift+N",
click: () => fireAndForget(createNewWaveWindow),
},
{

View File

@ -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);