-
Notifications
You must be signed in to change notification settings - Fork 18
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
Reconsider use of 'Alt' for majority of commands #19
Comments
Hello Nastevens! Thanks a lot for your feedback, this topic is something I've been thinking about. When deciding the key commands I didn't think about that it might not work in other systems, it's my first time deploying software so im figuring out many things as i go along here. First of all, since I wasnt using ctrl+(h/k/k/l) or ctrl+arrowkeys anyway, i've now simply added that as an option too, didnt push that change yet. If you updated Speki recently you may also have noticed that you can now click with your mouse button as well, although ik thats not ideal for terminal apps. Regarding your idea of simply using arrow-keys and then entering an insert mode for text input, there's some issues to consider here. Mainly it wouldn't just be the text-editing that is behind a separate mode but other widgets too, for example all the list objects also use the arrow-keys, meaning those would also have to have a separate state of being in focus, or else when you press the up arrow key you couldnt know if you wanna go up in the list or to the widget above it. To have some kind of uniformity I would then have to put this extra state on all the widget, perhaps one color for "hovering" over the widget and another color to say that the widget will consume your keystrokes. I'm not really convinced that this would be either less confusing for newcomers or easier to use. to go from widget A to widget B, you'd have to:
This is in contrast to using a modifier key where you would simply move directly and it'll automatically be in focus. The downside of the current approach is that whatever combination is used, cannot be used by the widget itself, and also the compatibility issues you've mentioned. I know VIM uses alt-key for some of its commands yet it seems to work on any platform though, do you know how it manages to do that? I think i'll start a reddit post asking for advice on this, or perhaps just start using Ctrl for everything as you suggested. I think the alt-key is slightly more ergonomic but compatibility is more important as you point out. Btw about the incremental reading, I didn't go any direction with it in this regard, it uses the same widget as the question/answer fields, it just adds the extract and cloze function when you're in visual mode. But in all those fields you can enter insert/command/visual! I'm going to work on making it more vim-like in the future. Once again thanks a lot for your feedback, I'd love to hear your thoughts on what I just wrote. I want to be clear that i'm not arguing against you but rather giving my thoughts on the pros and cons of what to do. |
First of all, thank you for developing |
I'm opening this to start a discussion - Speki is your project and you can bind keys however you want! But from experience I can tell you that there will be more issues like #8 in the future if the project continues to heavily use the Alt modifier key. The problem is that too many other terminals, window managers, and even OS's intercept Alt for their own purposes. Ctrl is a little better but still not perfect.
My recommendation is to use key bindings that don't require modifiers at all, and to put any sort of text editing behind a mode. So, for example, instead of
Alt+arrow
to move around, just useArrow
. Then use a binding likeEnter
ori
to go into an editing mode andEsc
to exit it. This is similar to the direction you've already gone for in the incremental reading section.Thanks for sharing Speki with the community - I think there's a lot of potential here!
The text was updated successfully, but these errors were encountered: