Skip to content

Commit 24fb1fa

Browse files
committed
feat: add shortcuts list in documentation
1 parent a8473bf commit 24fb1fa

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed

website/src/app/documentation/page.tsx

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import Link from "next/link";
44

55
import { Fade } from "react-awesome-reveal";
66

7+
import { Kbd } from "@/components/ui/kbd";
8+
79
import { NextChapterComponent } from "./components/next-chapter";
810

911
export default function DocumentationPage() {
@@ -78,6 +80,70 @@ export default function DocumentationPage() {
7880
engine. The most powerful, beautiful, simple, and open web rendering engine in the world.
7981
</div>
8082

83+
<div className="text-3xl md:text-2xl lg:text-3xl mt-3">Shortcults</div>
84+
85+
<div className="text-xl font-semibold">In Editor</div>
86+
87+
<div className="flex flex-col">
88+
<div>
89+
<Kbd>⌘Q</Kbd> or <Kbd>CTRL+Q</Kbd>: Quit application.
90+
</div>
91+
<div>
92+
<Kbd>⌘,</Kbd> (macOS only): Open editor's preferences.
93+
</div>
94+
95+
<br />
96+
97+
<div>
98+
<Kbd>⌘C</Kbd> or <Kbd>CTRL+C</Kbd>: Copy selected text / selected object.
99+
</div>
100+
<div>
101+
<Kbd>⌘V</Kbd> or <Kbd>CTRL+V</Kbd>: Paste text / copied object.
102+
</div>
103+
104+
<br />
105+
106+
<div>
107+
<Kbd>⌘S</Kbd> or <Kbd>CTRL+S</Kbd>: Save project.
108+
</div>
109+
<div>
110+
<Kbd>⌘G</Kbd> or <Kbd>CTRL+G</Kbd>: Generate project output (downsized & compressed textures, scripts map, output scene, assets copy, etc.).
111+
</div>
112+
<div>
113+
<Kbd>⌘P</Kbd> or <Kbd>CTRL+P</Kbd>: Open commands dialog.
114+
</div>
115+
<div>
116+
<Kbd>⌘F</Kbd> or <Kbd>CTRL+F</Kbd>: Focus selected object in preview panel.
117+
</div>
118+
119+
<br />
120+
121+
<div>
122+
<Kbd>⌘T</Kbd> or <Kbd>CTRL+T</Kbd>: Select translation gizmo.
123+
</div>
124+
<div>
125+
<Kbd>⌘R</Kbd> or <Kbd>CTRL+R</Kbd>: Select rotation gizmo.
126+
</div>
127+
<div>
128+
<Kbd>⌘D</Kbd> or <Kbd>CTRL+D</Kbd>: Select scaling gizmo.
129+
</div>
130+
131+
<br />
132+
133+
<div>
134+
<Kbd>⌘B</Kbd> or <Kbd>CTRL+B</Kbd>: Play / Stop scene in preview panel.
135+
</div>
136+
137+
<br />
138+
139+
<div>
140+
<Kbd>⌘M</Kbd> or <Kbd>CTRL+M</Kbd>: Minimize focused window.
141+
</div>
142+
<div>
143+
<Kbd>⌘W</Kbd> or <Kbd>CTRL+W</Kbd>: Close focused windows.
144+
</div>
145+
</div>
146+
81147
<NextChapterComponent href="/documentation/creating-project" title="Creating project" />
82148
</div>
83149
</Fade>

website/src/components/ui/kbd.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { cn } from "@/lib/utils";
2+
3+
function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
4+
return (
5+
<kbd
6+
data-slot="kbd"
7+
className={cn(
8+
"bg-neutral-800 pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium",
9+
"[&_svg:not([class*='size-'])]:size-3",
10+
"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
11+
className
12+
)}
13+
{...props}
14+
/>
15+
);
16+
}
17+
18+
function KbdGroup({ className, ...props }: React.ComponentProps<"div">) {
19+
return <kbd data-slot="kbd-group" className={cn("inline-flex items-center gap-1", className)} {...props} />;
20+
}
21+
22+
export { Kbd, KbdGroup };

0 commit comments

Comments
 (0)