Repository navigation
Multiple actions in a keybind #3175
|
Is it possible to bind multiple actions in to a single trigger in a keybind? I didn't see this listed in the docs, but it would be nice to be able to have something like |
Replies: 12 comments 12 replies
|
I like this idea a lot. I'll come back to this to think more about the syntax then we can open an issue to track it. |
|
I'm also interested in this, with my initial use case being something like |
|
I just came here to open exactly the same request, so +1 from me. Alternatively, since "fullscreen" for me never means "with the decorations visible" maybe the Either |
|
Carrying over from discussion #4830 as suggested. We have the For instance: keybind = cmd+c=copy_to_clipboard||esc:CIf there's a selection copy it to the clipboard, with no selection send the escape sequence to the shell. The |
|
+1 as well! My use case is setting a keybind to create a new window or tab and invoking a specific command/alias, so i can make a |
|
+1, my use case was that I was hoping to have a single keybind for "increasing split size", rather than needing 4 for left,right,up,down. Something like (though I don't know if this would work in practice or if they'd just contradict). Incidentally, if anyone has suggestions on how I can accomplish this another way, I'm all ears! |
|
Would scripting or plugin support supersede this idea? For example creating a function that does two commands after each other and make a keybinding for this? Does this idea warrant its own existence by supplying a convenient way to express |
|
I can't think of any way to have ghostty open a split down, launch lazygit, and tie it all up to a keybinding. I hope sequential actions could solve this for me. |
|
It would be great if multiple actions could be chained. For now, I'm managing by emulating multiple keys. |
|
@risenowrise Hid your slop. It adds nothing to this conversation. |
|
I really want to tackle this soon. Every syntax I can think of complicates parsing binding actions which by this point can contain just about anything. So, instead, I thought of something different. Here is some proposed syntax for OP's example: The This adds a bit of verbosity but enables a bunch of good use cases for us:
I know its not ideal and the syntax is a bit odd at first glance, but I think its the best option we've got given the constraints. |
Promoted to an accepted issue #9961