Open tdryer opened 8 years ago
My proposal:
key-prev-tab: ctrl p
key-next-tab: ctrl n
key-close-tab: ctrl x
key-quit: meta x
key-menu: ctrl r
None of these conflict with readline keys for text editing. Yes, ctrl p
ctrl n
ctrl r
are used for readline (as many bash users will be familiar with) but they are used for command history which is not something that hangups needs.
ctrl p
ctrl n
were chosen on analogy with GNU screen and tmux previous/next window.ctrl x
with a mnemonic of e(x)it windowmeta x
e(x)its the entire programctrl r
mnemonic of (r)ename as this is the only thing it does right now. In the future, no doubt it will do more. Unfortunately ctrl m
is not available to use (#55). Maybe meta m
?Some tiling window managers use meta
keys for their commands, so maybe it is best to avoid meta
? I use a tiling WM but with super
as the prefix. I considered ctrl shift x
for exiting hangups but this conflicts with a key binding from my terminal (rxvt-unicode). I do think exiting should be a little more difficult so that one does not exit by mistake.
I would certainly be willing to workaround my terminal issue as the binding is for a feature that I don't use.
Another consideration would be to trap ctrl c
to take advantage of it to exit cleanly. I find hangups to be very stable and have never needed to kill it.
Lastly, I am an avid vim user, so I would be very interested in a vi-like proposal but I'm not sure how that could be accomplished intuitively without implementing modes.
+1 for trapping ctrl c
.
The current keybinding work well enough for me, but I suppose this new proposal is more intuitive.
In order to make accidental quitting more difficult, I would suggest that whatever the keybinding, it can only be done from the main menu, and not from a conversation window. But I am not sure that is possible at all.
ctrl c
is definitely an option for quit and seems like the most intuitive choice.
For preventing accidental quitting: how about using the same key for both close tab and quit, and have closing the conversation list tab quit hangups?
Sounds good to me.
My first thought was that having to navigate to the conversation list to exit would be kind of slow but if you hit it a few times in a row, then you would exit pretty quickly. Maybe we could also add an exit entry to the bottom of the menu in the case where you have a lot of tabs open?
Or maybe we make a binding to switch to a numbered tab (again like screen/tmux)?
I would really appreciate the option for standard bash keybindings for text editing: c-w, c-a, c-u, and c-e in particular. I use these constantly and they appear in most other terminal apps I use, and not having them makes writing text more cumbersome.
hangups' current default keybindings were chosen rather arbitrarily. Pick some better defaults. Suggestions welcome!
Related: