"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var a=require("react");function f(u,r){const[i,c]=a.useState(!1);function n(e){const{code:t}=e;t===u&&(c(!0),e.preventDefault())}const s=e=>{const{code:t}=e;t===u&&(c(!1),e.preventDefault())};return a.useEffect(()=>{var e,t;return(e=r.current)==null||e.addEventListener("keydown",n),(t=r.current)==null||t.addEventListener("keyup",s),()=>{var d,o;(d=r.current)==null||d.removeEventListener("keydown",n),(o=r.current)==null||o.removeEventListener("keyup",s)}},[n,s]),i}exports.useKeyPress=f;
