-
Notifications
You must be signed in to change notification settings - Fork 327
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
Support modifiers in special key mappings #1248
Conversation
I've been thinking about this as well. I don't remember if there are any important subtleties, but I'd like to double-check and compare it to what I did in a bit more detail. One observation is that these keys will not work with the |
I think this PR works fine. For reference, there still are some keys we could, in principle, support but don't even after this PR. For example: Some of this keyboard-handling code makes me itch to try to make it more systematic, but I'm not sure that's easy or worth the effort. If we want to do that, we should write some unit tests first. |
@joelim-work These changes work for me well and are very welcome. Thank you. |
@ilyagr Thanks very much for your review comments. I have actually managed to implement |
@DusanLesan Thanks for helping out. I updated the PR description with a few more things that I have changed. If you're interested you can help me by playing around with the new changes to see if they work for you. |
+1. I think simplifying this is a totally reasonable project. The main reason I haven't tried to do it myself is that the current version, in spite of all of its imperfections, does seem to cover all the essential stuff. I'm of two minds about your latest improvements (support for I guess now that you did it all, we can keep it, though maybe I'll give it another look to search for potential bugs just in case. |
I actually sort of had the opposite experience. At first I thought the only thing that needed change was the I understand that for the most part users would only care about |
@joelim-work Thanks for the patch. @ilyagr is right that the additional logic is somewhat complex, though the patch itself looks pretty clean so I think it's ok. I'm also inclined towards consistency in this case. Also, I have just released r30 so there will likely be plenty of time to fix things until r31 is released if something is broken. |
Fixes #205
Fixes #1163
Closes #943 (
tcell
can't distinguish between<enter>
andShift+<enter>
)For me the following mappings now work and are all distinguishable from each other:
cmap
expressions are also supported:push
commands also work with these new mappings:It would be nice if someone could also try this out to see if they can map some new key combinations.