Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

global keyboard shortcuts react

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;
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #global #keyboard #shortcuts #react
ADD COMMENT
Topic
Name
8+3 =