cmd+enter to run
Browse files
src/lib/components/InferencePlayground/InferencePlayground.svelte
CHANGED
@@ -125,7 +125,7 @@
|
|
125 |
}
|
126 |
|
127 |
function onKeydown(event: KeyboardEvent) {
|
128 |
-
if (
|
129 |
submit();
|
130 |
}
|
131 |
}
|
@@ -229,7 +229,7 @@
|
|
229 |
</div>
|
230 |
{:else}
|
231 |
Run <span class="inline-flex gap-0.5 rounded border border-white/20 bg-white/10 px-0.5 text-xs text-white/70"
|
232 |
-
>↵</span
|
233 |
>
|
234 |
{/if}
|
235 |
</button>
|
|
|
125 |
}
|
126 |
|
127 |
function onKeydown(event: KeyboardEvent) {
|
128 |
+
if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
|
129 |
submit();
|
130 |
}
|
131 |
}
|
|
|
229 |
</div>
|
230 |
{:else}
|
231 |
Run <span class="inline-flex gap-0.5 rounded border border-white/20 bg-white/10 px-0.5 text-xs text-white/70"
|
232 |
+
>⌘<span class="translate-y-px">↵</span></span
|
233 |
>
|
234 |
{/if}
|
235 |
</button>
|