Feature request: "Copy selection or send control-C" keybinding like in iTerm2
iTerm2 allows you to bind a key to "Copy selection or send ^C", i.e. copy the current selection, or if nothing is selected, instead send control-C to the current application (i.e. to SIGINT it). It would be great if such a command were added and could be bound (e.g. to control-C).
Seconded, i'm searching for a terminal which supports this (and some other features).
Other examples of this:
Kitty: you can bind a copy_and_clear_or_interrupt action
WezTerm: Lua callback function in config to achieve this
Windows Terminal: Works like this by default
I think it would be enough to allow configuring multiple consecutive actions for a keybind, which isn't possible right now. It should be doable by storing a Vec<Action> here: https://github.com/raphamorim/rio/blob/bb6fc1f7818a31b18f418692fa7939f03c139123/frontends/rioterm/src/bindings/mod.rs#L73 and looping here: https://github.com/raphamorim/rio/blob/bb6fc1f7818a31b18f418692fa7939f03c139123/frontends/rioterm/src/screen/mod.rs#L717
It seems simple enough i was half-way to cloning the repo before i stopped to think that maybe the maintainers have something else in mind for more flexible config
Please go ahead and do a PR @laundmo , haven’t been able to look this issue yet 🙏