hotkeys-js icon indicating copy to clipboard operation
hotkeys-js copied to clipboard

➷ A robust Javascript library for capturing keyboard input. It has no dependencies.

Results 152 hotkeys-js issues
Sort by recently updated
recently updated
newest added

When moving from manually checking KeyboardEvent keys, etc., to this library, it would be really useful if it was possible to use this library from the KeyboardEvent so only the...

My handlers like this: ![image](https://user-images.githubusercontent.com/33776415/199458174-7b24221e-d0b5-4828-83f1-1d6a82db7210.png) The source code in trigger function: ![image](https://user-images.githubusercontent.com/33776415/199458547-3e31a33d-58e2-4a86-9515-a457f7eb3133.png) So it just invoke the first handler.

The type declaration file does not declare `getPressedKeyString`. Currently, I cannot use the function without a `@ts-ignore` comment.

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react](https://reactjs.org/) ([source](https://togithub.com/facebook/react/tree/HEAD/packages/react)) | [`~18.2.0` -> `~18.3.0`](https://renovatebot.com/diffs/npm/react/18.2.0/18.3.1) |...

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [eslint](https://eslint.org) ([source](https://togithub.com/eslint/eslint)) | [`^8.44.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/eslint/8.55.0/9.0.0) |...

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [eslint](https://eslint.org) ([source](https://togithub.com/eslint/eslint)) | [`^8.44.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/eslint/8.55.0/9.2.0) |...

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@rollup/plugin-commonjs](https://togithub.com/rollup/plugins/tree/master/packages/commonjs/#readme) ([source](https://togithub.com/rollup/plugins/tree/HEAD/packages/commonjs)) | [`^25.0.7` -> `^26.0.0`](https://renovatebot.com/diffs/npm/@rollup%2fplugin-commonjs/25.0.7/26.0.1) |...

First of all, thank you for your work on this library! I have been trying to capture when the user enters ?, but that does not seem to work... For...

``` hotkeys("*", function (event, handler) { console.log("event", event); // not trigger }); setTimeout(() => { hotkeys.trigger("r"); }, 3000); ```

The trigger method is missing the event object and needs to handle getPressedKeyCodes() in this case and isPressed() etc...