mirror of
https://github.com/wavetermdev/waveterm
synced 2026-05-24 01:08:27 +00:00
cmd:n and cmd:t
This commit is contained in:
parent
e70e08e531
commit
2f020099ec
2 changed files with 8 additions and 2 deletions
|
|
@ -677,7 +677,7 @@ function getAppMenu() {
|
||||||
const fileMenu: Electron.MenuItemConstructorOptions[] = [
|
const fileMenu: Electron.MenuItemConstructorOptions[] = [
|
||||||
{
|
{
|
||||||
label: "New Window",
|
label: "New Window",
|
||||||
accelerator: "CommandOrControl+N",
|
accelerator: "CommandOrControl+Shift+N",
|
||||||
click: () => fireAndForget(createNewWaveWindow),
|
click: () => fireAndForget(createNewWaveWindow),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -247,10 +247,16 @@ function appHandleKeyDown(waveEvent: WaveKeyboardEvent): boolean {
|
||||||
switchTab(-1);
|
switchTab(-1);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (keyutil.checkKeyPressed(waveEvent, "Cmd:t")) {
|
if (keyutil.checkKeyPressed(waveEvent, "Cmd:n")) {
|
||||||
handleCmdT();
|
handleCmdT();
|
||||||
return true;
|
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++) {
|
for (let idx = 1; idx <= 9; idx++) {
|
||||||
if (keyutil.checkKeyPressed(waveEvent, `Cmd:${idx}`)) {
|
if (keyutil.checkKeyPressed(waveEvent, `Cmd:${idx}`)) {
|
||||||
switchTabAbs(idx);
|
switchTabAbs(idx);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue