Les raccourcis du clavier global réagissent
import { HotKeys } from "react-hotkeys";import MyNode from "./MyNode";import React from 'react'; const keyMap = { SNAP_LEFT: "command+left", DELETE_NODE: ["del", "backspace"]}; const App = () => { return ( <HotKeys keyMap={keyMap}> <div> <MyNode /> <MyNode /> </div> </HotKeys> );}; export default App;
Difficult Dolphin