-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Revamp handling of multiple key press #545
Conversation
LeoLamCY
commented
May 3, 2017
- use keyCodes instead of strings to detect keys
- delete key from keyPressed array on key up
- fix Shift / ctrl key introducing asterisks #540
- use keyCodes instead of strings to detect keys - delete key from keyPressed array on key up - fix BoostIO#540
-check if number of keys pressed is the same as number of keys in a shortcut key combo before matching to avoid incorrect detection
Hi, @LeoLamCY! Thank you for this PR! I'd like to ask you a question. Why do you think numbers is better than string in keyCodes? I think a string is readable. |
please refer to #540 Strings are definitely more readable, I would prefer strings too if you could find another solution to the bug in #540 edit: keyPressed should become {Shift: true, :: true} instead of {Shift: true, ;: true, :: true} |
Oh, I understand. The keyboard difference between US and others makes this issue difficult. I'm using JP keyboard. But no worry, it's my mistake. We should implement shortcuts in US keyboard. Thank you so much for informing me! BTW, have you used |
I don't use it personally but I think it doesn't hurt to have a few keyboard shortcuts in the program. Some people might use them, you never know :) |
Yes, exactly true...! Umm, |
By the way, is it really caused by the difference between US and JP keyboards?
|
In JP keyboard, |
Oh ok, good to know :) |
@LeoLamCY @asmsuechan ... ye please don't use As a side note, in vim ports across editors, being in insert mode also allows the use of these emacs shortcuts allowing one to stay in insert mode to do minor movements while still keeping your hands in home position (and without going back to normal mode). i.e. vim mode or not... these shortcuts are used across many editors and are likely to be ingrained in some ppl's muscle memory. For the record, I don't personally use Also, @asmsuechan - you had an issue open about a "dot config" file for Boostnote (which I can't seem to find now). That's a great idea and would probably be the ideal place to map these keyboard bindings - so users can change according to personal prefs. |
Hi, @justin-calleja! I got it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Thanks for good PR 😄