We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5063ee commit a0d9bb8Copy full SHA for a0d9bb8
components/dashboard/src/workspaces/Workspaces.tsx
@@ -44,6 +44,19 @@ export default function () {
44
const showStartWSModal = () => setIsTemplateModelOpen(true);
45
const hideStartWSModal = () => setIsTemplateModelOpen(false);
46
47
+ useEffect(() => {
48
+ const onKeyDown = (event: KeyboardEvent) => {
49
+ if (['k', 'o', 'p'].includes(event.key) && (event.metaKey || event.ctrlKey)) {
50
+ event.preventDefault();
51
+ showStartWSModal();
52
+ }
53
+ };
54
+ window.addEventListener('keydown', onKeyDown);
55
+ return () => {
56
+ window.removeEventListener('keydown', onKeyDown);
57
58
+ }, []);
59
+
60
return <>
61
<Header title="Workspaces" subtitle="Manage recent and stopped workspaces." />
62
0 commit comments