需求:
进程:
yarn add react-hotkeys-hook
useHotkeys('ctrl+k', () => save());
useHotkeys('ctrl+k', () => save(), {}, [proFormRef]);
useHotkeys("alt+k", () => {
nextButton.current.click();
},{enableOnTags: ["INPUT", "TEXTAREA"]}, [nextButton.current]);
总结: