Always allow releasing keys.
This commit is contained in:
@@ -106,13 +106,6 @@ export function useKeyPress(
|
|||||||
};
|
};
|
||||||
|
|
||||||
const upHandler = (event: KeyboardEvent) => {
|
const upHandler = (event: KeyboardEvent) => {
|
||||||
const preventAction =
|
|
||||||
(!modifierPressed.current || (modifierPressed.current && !options.actInsideInputWithModifier)) &&
|
|
||||||
isInputDOMNode(event);
|
|
||||||
|
|
||||||
if (preventAction) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const keyOrCode = useKeyOrCode(event.code, keysToWatch);
|
const keyOrCode = useKeyOrCode(event.code, keysToWatch);
|
||||||
|
|
||||||
if (isMatchingKey(keyCodes, pressedKeys.current, true)) {
|
if (isMatchingKey(keyCodes, pressedKeys.current, true)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user