-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show feedback for key presses #2
Comments
Thank you very much for your feedback! Some very interesting points there.
This would be very nice to have (I would like that too!). However, I believe this is very hard to implement. tmux status bar is not designed to be "dynamic". I'm not even sure how one could "intercept" the keys and update the status bar during a command sequence. If you (or someone else) have an idea, please tell.
Actually, any "invalid" key cancels the sequence (default in tmux). For example, if you hit
Hm there was someone else on Reddit that I believe suggested this as well. I told them to create an issue here on GitHub, but they haven't done it. Could you please create a separate issue (labeled with "enhancement") for this? That way we can track the progress of that feature easier. Thank you! |
Glad that you liked it
Just throwing out something here (probably stupid): can't we use the same mechanism that shows that
Good to know, I guess this goes hand in hand with the feedback part; if there was a way to provide feedback, then we would clearly see that "OK, now the combination is reset"
Will do in a bit -> UPDATE: created #3 (I don't think I'm able to add a label, am I?) Also, I'm not going to close it in case anyone (we or someone else) comes up with an idea about a method to have a "realtime feedback" for key combinations, if that's OK with you |
That design works since we just track two "states" here: normal and command ("modal") mode (see https://github.com/whame/tmux-modal/blob/master/tmux-modal.tmux#L577 for some rather complex code for such a "simple" feature). For arbitrary key presses that would be extremely complex (maybe not even possible). I believe one probably has to hack the tmux source code a bit to be able to easily "hook" in to the key press processing mechanism. As far as I know, there is no such thing today (or?).
I agree.
Yeah, that's fine. |
Maybe the way we display the modal icon (`[=]`) is in fact the way to go... This is similar to what you are suggesting.
As I said before, it would be quite complex and would take some time to develop. This might be better suitable for a future version (if there isn't an easier way right now).
|
somewhat related but hopefully simpler to implement: it would be great addition if it can show different icon/character in status for what "mode" we are in, e.g. window, window resize, cmd I think each mode at the moment has its own key table? A thing to consider is that too many icons/characters can hurt user experience too (users can't remember all of them), so maybe only the primary modes |
That's a good suggestion! Indeed, the different modes do have their own key table. This might be easier to implement. Something like:
or we can have icons, but that would probably be too difficult to remember. I like the idea of distraction free visualization. This will certainly be an option that will be off by default. |
Check `client_key_table` against the key tables and use corresponding "icon" to show the command sequence in status bar. This implements the idea in GitHub issue #2.
This has now been implemented in master (thank you @dnguyenzd for the simpler idea!). Please try it out with:
in Thanks for the suggestion! |
awesome, thanks a lot, it's working well |
Hi,
I really like the idea of the plugin. I think it would be nice to have some kind of feedback when we press keys in the "modal mode".
For example, in vim, when you press keys, you'd see them in the status bar, and since this plugin generally uses a sequential combination of keys, it would be helpful to see what keys you have pressed.
Also, that would somehow imply a way to "cancel" you current sequence (maybe by pressing
ESC
or something)Also, another suggestions to be able to press
ESC
to get out of the "modal" mode (in addition to theM-m
combination)As a bonus, it would be nice to have those as configurable options that we can enable/disable/change
Of course, all these are just suggestions; feel free to ignore 🙂
The text was updated successfully, but these errors were encountered: