MCPcopy Create free account
hub / github.com/coder/coder / handleKeyDown

Function handleKeyDown

site/src/modules/tasks/TaskPrompt/TaskPrompt.tsx:232–237  ·  view source on GitHub ↗
(e: React.KeyboardEvent<HTMLTextAreaElement>)

Source from the content-addressed store, hash-verified

230 };
231
232 const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
233 // Submit form on Cmd+Enter (Mac) or Ctrl+Enter (Windows/Linux)
234 if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
235 onSubmit(e);
236 }
237 };
238
239 return (
240 <form

Callers

nothing calls this directly

Calls 1

onSubmitFunction · 0.70

Tested by

no test coverage detected