import{r as s,g8 as i,g9 as c,G as w}from"./index-d6499a22.js";const l={Meta:"Control"},p=n=>{const[u,o]=s.useState(!1);s.useEffect(()=>{const e=()=>o(!1);return window.addEventListener("blur",e),()=>window.removeEventListener("blur",e)},[]);const{name:d}=i(),t=s.useMemo(()=>d===c.MAC?n:w(n,n,l),[d,n]),r=s.useCallback(({key:e})=>{e===t&&o(!0)},[t]),a=s.useCallback(({key:e})=>{e===t&&o(!1)},[t]);return s.useEffect(()=>(window.addEventListener("keydown",r),window.addEventListener("keyup",a),()=>{window.removeEventListener("keydown",r),window.removeEventListener("keyup",a)}),[r,a]),u};export{p as u};
