omridevk / ng-keyboard-shortcuts

Dead Simple Keyboard Shortcuts Management for Angular

Home Page:https://ng-keyboard-shortcuts.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduce 'standard' web shortcuts?

jnfaerch opened this issue · comments

Is your feature request related to a problem? Please describe.
More and more sites have the same set of shortcuts that are not included in this great plug-in. For instance it is not possible to call the help modal with key ? like GitHub uses.

Describe the solution you'd like
It would be great to have the option of using the 'standard' set of web shortcuts. GitHub as an example:

  • ? gives you the help modal
  • g + c Go to the Code tab
  • g + i Go to the Issues tab
  • and so forth always with g as the first key to navigate (go to) different tabs in the app

Describe alternatives you've considered
See above where ? opens the help modal and key combinations starting with g are possible

Additional context
Not much else to be said :) Thx

commented

It is needed in my road map to add support for key sequences.
I do not have ETA yet, but I am thinking of a different implementation that will support key sequences.
I will mostly be basing my implementation on Mousetrap library.

commented

There's seems to be an issue with binding to ? key, will fix it in the next version, before even adding support for sequences, which will come in the next major version(no ETA though, still thinking of an optimized solution for this problem)

There's seems to be an issue with binding to ? key, will fix it in the next version, before even adding support for sequences, which will come in the next major version(no ETA though, still thinking of an optimized solution for this problem)

Yeah I saw it was missing in the key file.

Would love to help but don't think I'm capable of it yet (only started coding last year). Working hard on my skills though.

commented

@jnfaerch
No worries, I will release a fix for "?" and any shift required keys like ">" later today, if not today, then by the end of the week (I already have a fix for that)

commented

A quick update:
I am currently in the finishing stages of adding full support for key sequences, the API will be the same, but instead of "g+ c" you will declare a sequence like so: "g c"
we will have support for sequences like:
up up down down left right left right b a enter (konami code)
There's one caveat which I will mention in the documentation once this feature is released.
I will release it together with the fix for "?" and ">" and similar keys at the same time.

commented

Released version 7.1.2 with support for key sequences and fix for "?" and other shift required keys
Please feel free to install and provide any feedback, I have worked hard to make sure it works properly, but there may be some bugs or edge cases that I may have missed. feel free to report any new issue.
See more information about the feature and usages here:
https://github.com/omridevk/ng-keyboard-shortcuts#sequences