Skip to content

Commit c4f91f5

Browse files
committed
Update the copy hotkey to require the Shift key
1 parent c04bff3 commit c4f91f5

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

packages/ui/src/components/editor/ChatInput/ChatInput.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export const ChatInput: React.FC<Props> = (props) => {
265265
e.stopPropagation()
266266
props.on_search_click()
267267
}
268-
if (e.key == 'c' && (e.ctrlKey || e.metaKey)) {
268+
if (e.key == 'c' && e.shiftKey && (e.ctrlKey || e.metaKey)) {
269269
if (props.on_copy) {
270270
e.stopPropagation()
271271
e.preventDefault()
@@ -309,8 +309,10 @@ export const ChatInput: React.FC<Props> = (props) => {
309309
)}
310310
onClick={props.on_search_click}
311311
title={`${props.translations.search} (${
312-
navigator.userAgent.toUpperCase().indexOf('MAC') >= 0 ? '⌘' : 'Ctrl'
313-
}+F)`}
312+
navigator.userAgent.toUpperCase().indexOf('MAC') >= 0
313+
? '⌘F'
314+
: 'Ctrl+F'
315+
})`}
314316
/>
315317

316318
{props.on_copy && (
@@ -330,9 +332,9 @@ export const ChatInput: React.FC<Props> = (props) => {
330332
? props.submit_disabled_title ?? ''
331333
: `Copy to clipboard (${
332334
navigator.userAgent.toUpperCase().indexOf('MAC') >= 0
333-
? ''
334-
: 'Ctrl'
335-
}+C)`
335+
? '⇧⌘C'
336+
: 'Ctrl+Shift+C'
337+
})`
336338
}
337339
disabled={!props.is_in_code_completions_mode && !props.value}
338340
/>

0 commit comments

Comments
 (0)