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

Support generic sequence hotkeys #10

Open
anstosa opened this issue Jan 11, 2021 · 5 comments
Open

Support generic sequence hotkeys #10

anstosa opened this issue Jan 11, 2021 · 5 comments

Comments

@anstosa
Copy link

@anstosa anstosa commented Jan 11, 2021

Would love to extend this to sequence style hotkeys in addition to ones just starting with a fixed leader key. For example, my leader key is ctrl+b but I'm used to creating a new vertical split with ctrl+w v.

@tgrosinger
Copy link
Owner

@tgrosinger tgrosinger commented Jan 11, 2021

This is a tricky one. Currently I am using Obsidian hotkeys to call the plugin by registering the leader as a command. If there were multiple leaders, it would need to register multiple commands. Probably not a very good experience.

I could side-step the Obsidian hotkeys and listen for keystrokes myself (I do that to listen for enter and tab in the Advanced Tables plugin), but then there would not be a method of warning a user when their leader conflicts with another hotkey.

I'll have to think about this one some more. There is a new way of setting up hotkeys that I need to look into for tgrosinger/advanced-tables-obsidian#53 so maybe that will produce something interesting.

@anstosa
Copy link
Author

@anstosa anstosa commented Jan 11, 2021

Also worth considering a library for this. Mousetrap is the canonical JS solution. It's tiny and supports sequence keys out of the box.

@lyndhurst
Copy link

@lyndhurst lyndhurst commented Apr 14, 2021

👍 I would also find multiple leaders / hotkey sequences a great enhancement.
Thanks for your time.

@Ampa
Copy link

@Ampa Ampa commented Apr 26, 2021

This would be super useful.
I'd like to have all my Advanced Tables shortcuts start Ctrl+T
Pane Relief start Ctrl + R for example.

@WhiteNoiseDev
Copy link

@WhiteNoiseDev WhiteNoiseDev commented Dec 31, 2021

Do you think it's possible to support a complete hotkey as second key? To support something like ctrl+b ctrl+k?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants