fix(useKeyPress): handle combinations closes #2022 closes #2030

This commit is contained in:
moklick
2022-03-30 11:24:23 +02:00
parent 0365b7593a
commit b413c768dd
3 changed files with 23 additions and 8 deletions
+11
View File
@@ -0,0 +1,11 @@
import { useKeyPress } from 'react-flow-renderer';
const UseKeyPressComponent = () => {
const metaPressed = useKeyPress(['Meta']);
console.log({ metaPressed });
return <div />;
};
export default UseKeyPressComponent;
+5
View File
@@ -33,6 +33,7 @@ import UpdateNode from './UpdateNode';
import UseUpdateNodeInternals from './UseUpdateNodeInternals';
import UseReactFlow from './UseReactFlow';
import Validation from './Validation';
import UseKeyPress from './UseKeyPress';
const routes = [
{
@@ -159,6 +160,10 @@ const routes = [
path: '/controlled-uncontrolled',
component: ControlledUncontrolled,
},
{
path: '/use-key-press',
component: UseKeyPress,
},
];
const Header = () => {