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

Package description: it's an input library... but input from what? #480

Open
hi2u opened this issue Mar 15, 2024 · 1 comment
Open

Package description: it's an input library... but input from what? #480

hi2u opened this issue Mar 15, 2024 · 1 comment

Comments

@hi2u
Copy link

hi2u commented Mar 15, 2024

Before installing, I spent quite a while looking through this package description on npm, github... searching through issues etc... trying to figure out if this package can be used to monitor global hotkeys at the OS level for nodejs apps (i.e. unrelated to browsers entirely).

But couldn't see this clearly described anywhere...

A robust Javascript library for capturing keyboard input.

HotKeys.js is an input capture library

...from what?

I see some supported browsers noted in the README.md, but nothing to indicate if it's only for just inside web browsers?

There's other places input can be monitored too: i.e.

  • my OS global hotkeys use case, i.e. regardless of what window/program is focused
  • node.js console apps when the terminal is focused
  • electron apps

I ended up asking chatgpt, and it said:

The npm package "hotkeys-js" primarily focuses on managing keyboard shortcuts within web applications

Still not clear. So eventually I decided to just install it and tried running in my nodejs console app....

ReferenceError: document is not defined

So I guess I eventually got my answer, after about 30 minutes of confusion. Although I'm still not even completely sure now.

If non-browser input isn't supported, no problem. I'm not asking for it to be added.

In this case, I'm just requesting: could you please update the package description to make it clear what the package is actually for, i.e. if it's just keyboard activity inside web browsers, maybe change the descriptions to something like:

A robust Javascript library for capturing keyboard input in web browsers.

HotKeys.js is a web browser input capture library

Or if some of these other contexts are actually supported, mention them too.

Some yes/no bullet points at the top of the README.md would be useful to clarify quickly too.

@hi2u
Copy link
Author

hi2u commented Mar 15, 2024

Another thing I couldn't find any info about was the "windows key". Doesn't seem to be mentioned anywhere I could find.

From the demo page it appears that the term used is "command key"... but would save time if the term "windows key" was also mentioned here at least once in the README.md to let us know they're synonyms in this case.

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

No branches or pull requests

1 participant