-
Notifications
You must be signed in to change notification settings - Fork 248
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
Added optional 'category' for hotkeys. #205
base: master
Are you sure you want to change the base?
Added optional 'category' for hotkeys. #205
Conversation
…, the hotkeys are shown per category in a 2 column layout. If no category is specified for a hotkey, the hotkey defaults to a configurable default category. If no hotkeys have a category, the cheatsheet looks just like it used to.
Thank you @ebbe-brandstrup. IMO this is just a necessary feature 😄 |
+1 |
@ebbe-brandstrup Did you just forget to also add this new capability i.e., |
@kfei yes, indeed, I didn't catch that. I haven't been using the directive for registering hotkeys. I have actually gone another direction with this since it doesn't look like the PR has interest. I have created an angular component (angular 1.5) to show the cheatsheet with categories. The component just injects the hotkeys service and extracts categories from the description field (I assume that hotkeys that contain a pipe character are of the format This approach has the advantage that I can keep updating angular-hotkeys without maintaining my fork :-) I have a put together a gist to share it in case you guys can also benefit from it: This then gets hooked up by just placing a Note, I'm using MeteorJS 1.3 and angular-meteor (via npm) and LESS and as you can see it's ES6. So you'll need to adjust a bit to register the component differently if you don't use ES6 and the import/export stuff. |
@ebbe-brandstrup Thanks for your tips. I'm going to just steal your idea of using the pipe character as a workaround now. You're right, maintaining an own fork is just a pain 😵 |
+1 |
When displaying the cheatsheet, the hotkeys are shown per category in a 2 column layout which also handles small window sizes.
If no category is specified for a hotkey, the hotkey defaults to a configurable default category.
If no hotkeys have a category, the cheatsheet looks like it used to.
Related to #120.
Thanks for a great hotkey system @chieffancypants