Merge pull request #13064 from NousResearch/fix/right-click-paste

fix: enable right click to paste
This commit is contained in:
Austin Pickett 2026-04-20 09:30:17 -07:00 committed by GitHub
commit 093aec5a4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -616,6 +616,7 @@ export function handleMouseEvent(app: App, m: ParsedMouse): void {
if (baseButton !== 0) {
// Non-left press breaks the multi-click chain.
app.clickCount = 0
app.props.onMouseDownAt(col, row, baseButton)
return
}

View File

@ -713,6 +713,15 @@ export function TextInput({
setCur(next)
curRef.current = next
}}
onMouseDown={(e: { button: number }) => {
// Right-click to paste: route through the same hotkey path as
// Alt+V so the composer's clipboard RPC (text or image) handles it.
if (!focus || e.button !== 2) {
return
}
emitPaste({ cursor: curRef.current, hotkey: true, text: '', value: vRef.current })
}}
ref={boxRef}
>
<Text wrap="wrap">{rendered}</Text>