You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found that in another place, when I see "Ignored as it was not expected, and has already been simulated.", my hotkeys all start failing. If I unfocus and refocus, it will fix it. In this case, it only fixes it for literally 1 keypress.
What Configuration options are you using?
configure({
/**
* The level of logging of its own behaviour React HotKeys should perform.
*/
logLevel: 'verbose',
/**
* Default key event key maps are bound to (keydown|keypress|keyup)
*/
defaultKeyEvent: 'keydown',
/**
* The default component type to wrap HotKey components' children in, to provide
* the required focus and keyboard event listening for HotKeys to function
*/
defaultComponent: 'div',
/**
* The default tabIndex value passed to the wrapping component used to contain
* HotKey components' children. -1 skips focusing the element when tabbing through
* the DOM, but allows focusing programmatically.
*/
defaultTabIndex: '-1',
/**
* The HTML tags that React HotKeys should ignore key events from. This only works
* if you are using the default ignoreEventsCondition function.
* @type {String[]}
*/
ignoreTags: [],
/**
* The function used to determine whether a key event should be ignored by React
* Hotkeys. By default, keyboard events originating elements with a tag name in
* ignoreTags, or a isContentEditable property of true, are ignored.
*
* @type {Function<KeyboardEvent>}
*/
ignoreEventsCondition: (e) => {
return false;
},
/**
* Whether to ignore changes to keyMap and handlers props by default
* (this reduces a significant amount of unnecessarily resetting
* internal state)
* @type {boolean}
*/
ignoreKeymapAndHandlerChangesByDefault: false,
/**
* Whether to ignore repeated keyboard events when a key is being held down
* @type {boolean}
*/
ignoreRepeatedEventsWhenKeyHeldDown: true,
/**
* Whether React HotKeys should simulate keypress events for the keys that do not
* natively emit them.
* @type {boolean}
*/
simulateMissingKeyPressEvents: false,
/**
* Whether to call stopPropagation() on events after they are
* handled (preventing the event from bubbling up any further, both within
* React Hotkeys and any other event listeners bound in React).
*
* This does not affect the behaviour of React Hotkeys, but rather what
* happens to the event once React Hotkeys is done with it (whether it's
* allowed to propagate any further through the Render tree).
*/
stopEventPropagationAfterHandling: true,
/**
* Whether to call stopPropagation() on events after they are
* ignored (preventing the event from bubbling up any further, both within
* React Hotkeys and any other event listeners bound in React).
*
* This does not affect the behaviour of React Hotkeys, but rather what
* happens to the event once React Hotkeys is done with it (whether it's
* allowed to propagate any further through the Render tree).
*/
stopEventPropagationAfterIgnoring: true,
/**
* Whether to allow combination submatches - e.g. if there is an action
* bound to cmd, pressing shift+cmd will *not* trigger that action when
* allowCombinationSubmatches is false.
*/
allowCombinationSubmatches: false,
/**
* A mapping of custom key codes to key names that you can then use in your
* key sequences
*/
customKeyCodes: {}
})
The text was updated successfully, but these errors were encountered:
Unfortunately I do not have the time to actively work on this package, but I am seeking other active maintainers. If you are willing to create a pull request or help out, that would be an excellent way of moving this forward.
Describe the bug
When my
<HotKeys></HotKeys>
tag is dynamically added to the UI, its handlers are getting ignored.How are you using react hotkeys components? (HotKeys, GlobalHotKeys, IgnoreKeys etc)
Here is a trimmed down version of what I'm doing
Expected behavior
Hotkey handlers for component in focus are triggered
Platform (please complete the following information):
Are you willing and able to create a PR request to fix this issue?
Yes, if given a little guidance
Include the smallest log that includes your issue:
I've found that in another place, when I see "Ignored as it was not expected, and has already been simulated.", my hotkeys all start failing. If I unfocus and refocus, it will fix it. In this case, it only fixes it for literally 1 keypress.
What Configuration options are you using?
The text was updated successfully, but these errors were encountered: