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 bdd2406 commit ce6be68Copy full SHA for ce6be68
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 ((event.metaKey || event.ctrlKey) && ['k', 'o', 'p'].includes(event.key)) {
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