Revert "Support "produced characters" as hotkeys"

This reverts commit bc66d52701.

"useKey" is broken https://github.com/JohannesKlauss/react-hotkeys-hook/issues/1318
This commit is contained in:
schroda
2026-05-13 23:31:48 +02:00
parent bc66d52701
commit 34efed7470
7 changed files with 486 additions and 508 deletions

View File

@@ -1,24 +0,0 @@
/*
* Copyright (C) Contributors to the Suwayomi project
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
// oxlint-disable-next-line no-restricted-imports
import { useHotkeys as orgUseHotkeys } from 'react-hotkeys-hook';
export const useHotkeys = (...args: Parameters<typeof orgUseHotkeys>): ReturnType<typeof orgUseHotkeys> => {
const [keys, callback, options, dependencies] = args;
return orgUseHotkeys(
keys,
callback,
{
preventDefault: true,
useKey: true,
...options,
},
dependencies,
);
};