@@ -321,7 +321,11 @@ export function isTerminalCopyShortcut(
321321 event : Pick < KeyboardEvent , "ctrlKey" | "key" | "metaKey" | "shiftKey" > ,
322322 platform = navigator . platform ,
323323) {
324- if ( event . key . toLowerCase ( ) !== "c" ) return false ;
324+ const key = event . key . toLowerCase ( ) ;
325+ if ( key === "insert" && ! isMacPlatform ( platform ) ) {
326+ return event . ctrlKey && ! event . shiftKey && ! event . metaKey ;
327+ }
328+ if ( key !== "c" ) return false ;
325329 return isMacPlatform ( platform ) ? event . metaKey : event . ctrlKey ;
326330}
327331
@@ -1027,12 +1031,12 @@ export class GhosttyTerminalSurface {
10271031 // A plain Ctrl+C/Cmd+C fires the browser's native copy event, caught in
10281032 // onCopyEvent; not preventing the default keeps that path alive. WebKit
10291033 // omits the keyboard copy event without a DOM selection, so race the
1030- // clipboard write against it the same way paste races its read. The
1031- // Shift variant has no native event (Chrome binds Ctrl+Shift+C to
1034+ // clipboard write against it the same way paste races its read. Ctrl+Shift+C
1035+ // and Ctrl+Insert have no native copy event (Chrome binds the former to
10321036 // inspect), so synthesize one with execCommand("copy").
10331037 const selection = this . getSelection ( ) ;
10341038 this . primeCopy ( selection ) ;
1035- if ( event . shiftKey ) {
1039+ if ( event . shiftKey || event . key . toLowerCase ( ) === "insert" ) {
10361040 event . preventDefault ( ) ;
10371041 document . execCommand ( "copy" ) ;
10381042 } else {
0 commit comments