MCPcopy
hub / github.com/wavetermdev/waveterm / registerGlobalKeys

Function registerGlobalKeys

frontend/app/store/keymodel.ts:503–766  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

501}
502
503function registerGlobalKeys() {
504 globalKeyMap.set("Cmd:]", () => {
505 switchTab(1);
506 return true;
507 });
508 globalKeyMap.set("Shift:Cmd:]", () => {
509 switchTab(1);
510 return true;
511 });
512 globalKeyMap.set("Cmd:[", () => {
513 switchTab(-1);
514 return true;
515 });
516 globalKeyMap.set("Shift:Cmd:[", () => {
517 switchTab(-1);
518 return true;
519 });
520 globalKeyMap.set("Cmd:n", () => {
521 handleCmdN();
522 return true;
523 });
524 globalKeyMap.set("Cmd:d", () => {
525 handleSplitHorizontal("after");
526 return true;
527 });
528 globalKeyMap.set("Shift:Cmd:d", () => {
529 handleSplitVertical("after");
530 return true;
531 });
532 globalKeyMap.set("Cmd:i", () => {
533 handleCmdI();
534 return true;
535 });
536 globalKeyMap.set("Cmd:t", () => {
537 createTab();
538 return true;
539 });
540 globalKeyMap.set("Cmd:w", () => {
541 genericClose();
542 return true;
543 });
544 globalKeyMap.set("Cmd:Shift:w", () => {
545 simpleCloseStaticTab();
546 return true;
547 });
548 globalKeyMap.set("Cmd:m", () => {
549 const layoutModel = getLayoutModelForStaticTab();
550 const focusedNode = globalStore.get(layoutModel.focusedNode);
551 if (focusedNode != null) {
552 layoutModel.magnifyNodeToggle(focusedNode.id);
553 }
554 return true;
555 });
556 globalKeyMap.set("Ctrl:Shift:ArrowUp", () => {
557 const disableCtrlShiftArrows = globalStore.get(getSettingsKeyAtom("app:disablectrlshiftarrows"));
558 if (disableCtrlShiftArrows) {
559 return false;
560 }

Callers 1

initWaveFunction · 0.90

Calls 15

createTabFunction · 0.90
getSettingsKeyAtomFunction · 0.90
getFocusedBlockIdFunction · 0.90
replaceBlockFunction · 0.90
getActiveTabModelFunction · 0.90
getBlockComponentModelFunction · 0.90
recordTEventFunction · 0.90
isWindowsFunction · 0.90
getApiFunction · 0.90
switchTabFunction · 0.85
handleCmdNFunction · 0.85
handleSplitHorizontalFunction · 0.85

Tested by

no test coverage detected