is-hotkey icon indicating copy to clipboard operation
is-hotkey copied to clipboard

Check whether a browser event matches a hotkey.

Results 15 is-hotkey issues
Sort by recently updated
recently updated
newest added

Hey there can't make work `is-hotkey` with `alt+a` combination keyboard on Mac, layout `us`. I've try both: 1. `isHotkey("opt+a")` 2. `isHotkey("opt+a", {byKey: true})` Here is an example [code sandbox](https://codesandbox.io/embed/keyup-bug-forked-6wwsh?fontsize=14&hidenavigation=1&theme=dark) Thank...

It would be awesome if we could remove [`keycode`](https://www.npmjs.com/package/keycode) completely in favor of `is-hotkey`. Is it possible to reproduce the behavior? The below will match any Enter key press, whether...

The following code returns false instead of true ```js const e = new KeyboardEvent("keydown", { key: "Tab", code: "Tab", which: "9", shiftKey: true }); console.log(e.shiftKey, e.key); console.log(isHotKey("shift+Tab", e)); ``` Use...

I'm getting a type error within the `parseHotkey` function in my TypeScript project: > TypeError: hotkey.replace is not a function. (In 'hotkey.replace('++', '+add')', 'hotkey.replace' is undefined) at: ``` 125 |...

Hi, It looks like calling `isHotkey(key, event)` on a `keyup` event will not identify keys being released when trying to test a modifier key. You can find an example in...

First of all, thank you for this convenient library! I faced an issue with one hotkey on Mac, which I believe is somewhat similar to https://github.com/ianstormtaylor/is-hotkey/issues/1 The hotkey is defined...

We could distinguish between `A` and `a` by `keydownEvent.key`. Has a plan to support option `caseSensitive` when `byKey` is `true`? I'm pleasure to make a pr.

# Description I added a `toHotkeyName` and a `getHotKeyName` function in order to convert an event to a hotkey name that can then be used inside a switch statement. I...

Projects usually have a lot of hotkeys to check and this is often done using switch statements. Is-hotkey would prove far more useful if it had that feature.

https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/which states: > Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be...