Allow copy/paste keybindings to pass through if they did nothing #2811
-
I really like to use the natural ctrl+c and ctrl+v to copy in a terminal. For ctrl+c : For ctrl+v |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 8 replies
-
This would be pretty easy to support for Ghostty, we already have the I'd just like to repeat so I understand what you're asking: you want copy/paste but if they do nothing (i.e. the clipboard is empty) then you want them to encode the key and pass it on to the pty? |
Beta Was this translation helpful? Give feedback.
-
Yes, you are right, you've understood exactly what I want. |
Beta Was this translation helpful? Give feedback.
-
I've converted this to a discussion because actually I think we need to think about this a bit more. I'm very supportive of making this work, but I realized there's a central issue in the way keybindings work in Ghostty: We already know if an action was performed. We use this to pass through some keys already. But the keybindings are either always passthrough or always not on performed. What this issue is asking for is a conditional way to do that. The easy thing to do would be to make a new keybinding action like I want to consider introducing a new keybinding syntax so that we can generalize this to the behavior of "consume only if performed." This is missing today and it'd be possible for us to generalize. |
Beta Was this translation helpful? Give feedback.
-
Kitty has a For pasting, I'm not sure how useful this would be, because unless the clipboard is explicitly cleared, in my experience there is always something already in the clipboard from a previous copy action.
In Vim, you can use Another idea is to swap |
Beta Was this translation helpful? Give feedback.
-
+1 The main way I use this is with a smart copy feature, I use this with wezterm to handle copy when there is some selection: In termite, this is implemented like that: In kitty: |
Beta Was this translation helpful? Give feedback.
-
I like the way kitty handle it with |
Beta Was this translation helpful? Give feedback.
-
Made a mockup PR for an action similar to |
Beta Was this translation helpful? Give feedback.
-
Yes, this is a must for me as well. An easy way to set ctrl+c ctrl+v. Or else I prolly wont be using Ghostty in the future, due its a deal breaking thing for me. Why I tend to use the Konsole instead. Seems like there is a fix to? Or am I misstaken? Im not sure how you do this? If someone can make me a small guide to do it. I would be verry happy. |
Beta Was this translation helpful? Give feedback.
-
I'm trying out the new I've added this to my config:
While ctrl+C correctly only copies when text is highlighted, SIGINT never seems to get sent. I'm testing with This is on fedora 40 with gnome and wayland. version:
Is this working for anyone else? |
Beta Was this translation helpful? Give feedback.
Approved #4328