YUI.add("event-key",function(h,e){var p="+alt",y="+ctrl",i="+meta",o="+shift",l=h.Lang.trim,t={KEY_MAP:{enter:13,space:32,esc:27,backspace:8,tab:9,pageup:33,pagedown:34},_typeRE:/^(up|down|press):/,_keysRE:/^(?:up|down|press):|\+(alt|ctrl|meta|shift)/g,processArgs:function(e){var t,s,a,e=e.splice(3,1)[0],r=h.Array.hash(e.match(/\+(?:alt|ctrl|meta|shift)\b/g)||[]),n={type:this._typeRE.test(e)?RegExp.$1:null,mods:r,keys:null},c=e.replace(this._keysRE,"");if(c)for(c=c.split(","),n.keys={},a=c.length-1;0<=a;--a)(t=l(c[a]))&&(+t==t?n.keys[t]=r:(s=t.toLowerCase(),this.KEY_MAP[s]?(n.keys[this.KEY_MAP[s]]=r,n.type||(n.type="down")):(s=(t=t.charAt(0)).toUpperCase(),r["+shift"]&&(t=s),n.keys[t.charCodeAt(0)]=t===s?h.merge(r,{"+shift":!0}):r)));return n.type||(n.type="press"),n},on:function(e,t,s,a){var r=t._extra,n="key"+r.type,c=r.keys;t._detach=e[a?"delegate":"on"](n,function(e){var t=c?c[e.which]:r.mods;t&&(!t[p]||t[p]&&e.altKey)&&(!t[y]||t[y]&&e.ctrlKey)&&(!t[i]||t[i]&&e.metaKey)&&(!t[o]||t[o]&&e.shiftKey)&&s.fire(e)},a)},detach:function(e,t,s){t._detach.detach()}};t.delegate=t.on,t.detachDelegate=t.detach,h.Event.define("key",t,!0)},"patched-v3.18.3",{requires:["event-synthetic"]});