-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Discussed in #10620
Originally posted by juniqlim February 8, 2026
PR #10089 added performable paste support for GTK β when the clipboard has no text (e.g. only an image), paste_from_clipboard returns false so the key passes through to the application.
macOS doesn't have this yet. The embedded apprt's clipboardRequest() always returns true, so the keybind is always consumed even when there's nothing to paste.
This matters for TUI apps like Claude Code that handle image paste natively β they need to receive the keypress when the clipboard contains only image data.
The GTK implementation checks clipboard content types synchronously before starting the async read. As mitchellh noted in #10089, macOS clipboards are also async but the empty/type check can be done synchronously via NSPasteboard.
Would it be acceptable to implement the same pattern for the embedded apprt? The approach would be:
- Add a
clipboard_has_textcallback to the embedded runtime options - Check it in
clipboardRequest()for paste requests, returnfalsewhen no text - Make default paste bindings
performable(matching what config: make default copy_to_clipboard binds performableΒ #8504 did for copy)
I have a working local build with this approach and confirmed it works with Claude Code on macOS.