Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/docs/keybindings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Chords are shown with a + between the keys. You have 2 seconds to hit the 2nd ch
| <Kbd k="Cmd:Shift:w"/> | Close the current tab |
| <Kbd k="Cmd:m"/> | Magnify / Un-Magnify the current block |
| <Kbd k="Cmd:g"/> | Open the "connection" switcher |
| <Kbd k="Cmd:,"/> | Open Settings |
| <Kbd k="Cmd:i"/> | Refocus the current block (useful if the block has lost input focus) |
| <Kbd k="Ctrl:Shift"/> | Show block numbers |
| <Kbd k="Ctrl:Shift:0"/> | Focus WaveAI input |
Expand Down
8 changes: 8 additions & 0 deletions frontend/app/element/quicktips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@ const QuickTips = () => {
<span className="text-[15px]">Open Wave AI Panel</span>
<KeyBinding keyDecl="Cmd:Shift:a" />
</div>
<div className="flex flex-col gap-0.5 p-2 rounded-md hover:bg-white/5 transition-colors">
<span className="text-[15px]">Open Settings</span>
<KeyBinding keyDecl="Cmd:," />
</div>
<div className="flex flex-col gap-0.5 p-2 rounded-md hover:bg-white/5 transition-colors">
<span className="text-[15px]">Close Settings / Close Search</span>
<KeyBinding keyDecl="Escape" />
</div>
</div>

<div className="flex flex-col gap-1.5">
Expand Down
15 changes: 15 additions & 0 deletions frontend/app/store/keymodel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,10 @@ function registerGlobalKeys() {
return true;
}
});
globalKeyMap.set("Cmd:,", () => {
createBlock({ meta: { view: "waveconfig" } }, false, true);
return true;
});
globalKeyMap.set("Ctrl:Shift:i", () => {
const tabModel = getActiveTabModel();
if (tabModel == null) {
Expand Down Expand Up @@ -738,6 +742,17 @@ function registerGlobalKeys() {
if (deactivateSearch()) {
return true;
}
const layoutModel = getLayoutModelForStaticTab();
const focusedNode = globalStore.get(layoutModel.focusedNode);
const blockId = focusedNode?.data?.blockId;
if (blockId != null) {
const blockAtom = WOS.getWaveObjectAtom<Block>(WOS.makeORef("block", blockId));
const blockData = globalStore.get(blockAtom);
if (blockData?.meta?.view === "waveconfig" || blockData?.meta?.view === "tips") {
fireAndForget(layoutModel.closeFocusedNode.bind(layoutModel));
return true;
}
}
return false;
});
globalKeyMap.set("Cmd:Shift:a", () => {
Expand Down