function e(e,r){const t=Object.keys(r);for(let n=0,{length:c}=t[n];n<c;n+=1){const c=t[n];"string"==typeof c&&c.length>0&&(r[c]?e.add(c):e.remove(c))}}const r={tab:9,backspace:8,enter:13,escape:27,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46,shift:16};function t(e){switch(e){case"Spacebar":return" ";case"Esc":return"Escape";case"Del":return"Delete";case"Left":return"ArrowLeft";case"Right":return"ArrowRight";case"Down":return"ArrowDown";case"Up":return"ArrowUp";default:return e}}const n={};function c(e){return e.shiftKey||e.metaKey||e.ctrlKey}function a(e,r){const t=e.key;if(t&&t.length>1)return;n._clearBufferId&&clearTimeout(n._clearBufferId),n._keyBuffer=n._keyBuffer||[],n._keyBuffer.push(t);r(n._keyBuffer.join("").toLowerCase()),n._clearBufferId=setTimeout(()=>{n._keyBuffer=[]},700)}export{e as c,c as i,r as k,t as n,a as r};
