-
Notifications
You must be signed in to change notification settings - Fork 315
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
Add Jump-To hotkeys #3483
base: master
Are you sure you want to change the base?
Add Jump-To hotkeys #3483
Conversation
This binds CTRL/META-J to brewJump and SHIFT-CTRL/META-J to sourceJump.
Those hotkeys are already in use in chrome https://support.google.com/chrome/answer/157179?hl=en&co=GENIE.Platform%3DDesktop |
Now, we don't need to add more hotkeys at all (I would actually prefer we don't). One person in the original issue only suggested it as a lesser alternative if we couldn't get scroll linking to work, but the other PR takes care of that. |
As a primarily hot key user, I know I would use the keys more than the buttons and live scrolling would annoy the crap out of me. |
Fair enough. Just didn't want to add a feature if nobody actually wanted it. |
I think hotkeys for navigating the page is a good idea. And this counts as navigating the page (it is changing the view). I do think we can remove hotkeys for many snippets (and I made most of those hot keys so no one should be offended). The snippet menus themselves should have better keyboard navigation (cough radix cough), but in the meantime if there is a snippet hot key that would be better used for something else, I think it’s fine to claim it. I intend to work on snippet menu very soon, 1) to convert to function components and 2) look at keyboard navigation and/or radix. |
I'm sorry but: https://homebrewery.naturalcrit.com/share/1Em9UpHcoKws3xv65lWCRGzPDr3xPAWzvp9-Fp6cxI0Ac Ctrl-M is used to input spans. Usual problem with hotkeys, every damn program uses them, windows, chrome, HB... |
if(!(e.ctrlKey || e.metaKey)) return; | ||
console.log(e); | ||
const X_KEY = 88; | ||
if((!e.shiftKey) && (e.keyCode == X_KEY)) this.brewJump(); |
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.
CTRL + x
is "cut". We definitely don't want to overwrite that.
This binds CTRL/META-X to brewJump and SHIFT-CTRL/META-X to sourceJump.
Solves part one in #241
edit: Reflect change in hotkey binding.