Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

dbolack-ab
Copy link
Collaborator

@dbolack-ab dbolack-ab commented May 18, 2024

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.

This binds CTRL/META-J to brewJump and SHIFT-CTRL/META-J to sourceJump.
@5e-Cleric
Copy link
Member

5e-Cleric commented May 18, 2024

Those hotkeys are already in use in chrome
For me they open downloads, and dev tools console respectively.

image

https://support.google.com/chrome/answer/157179?hl=en&co=GENIE.Platform%3DDesktop

@5e-Cleric 5e-Cleric added the 🔍 R0 - Needs first review 👀 PR ready but has not been reviewed label May 19, 2024
@calculuschild
Copy link
Member

calculuschild commented May 19, 2024

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.

@dbolack-ab
Copy link
Collaborator Author

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.

@calculuschild
Copy link
Member

Fair enough. Just didn't want to add a feature if nobody actually wanted it.

@Gazook89
Copy link
Collaborator

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.

@5e-Cleric
Copy link
Member

5e-Cleric commented Jun 1, 2024

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();
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔍 R0 - Needs first review 👀 PR ready but has not been reviewed
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

None yet

5 participants