function Shortcut(c,e,b,a,d){if(!c||!e){throw"KeyCode and callback needed for Shortcut"}b=b||false;a=a||false;d=d||false;this.getKeyCode=function(){return c};this.getCallback=function(){return e};this.getAltEnabled=function(){return b};this.getShiftPressed=function(){return a};this.getCtrlEnabled=function(){return d}}Shortcut.ESCAPE=27;Shortcut.ARROW_UP=38;Shortcut.ARROW_RIGHT=39;Shortcut.ARROW_DOWN=40;Shortcut.REMOVE=46;Shortcut.ZERO=48;Shortcut.ONE=49;Shortcut.TWO=50;Shortcut.THREE=51;Shortcut.FOUR=52;Shortcut.FIVE=53;Shortcut.SIX=54;Shortcut.SEVEN=55;Shortcut.EIGHT=56;Shortcut.NINE=57;Shortcut.CHAR_E=69;Shortcut.CHAR_L=76;Shortcut.CHAR_S=83;Shortcut.PLUS=107;Shortcut.MINUS=109;Shortcut.DOT=190;var ShortcutHandler=new function(){var a=[];function d(i){var h=-1;if(i.which){h=i.which}else{if(i.keyCode){h=i.keyCode}}if(h===-1){return}var g=(i.altKey==true||(window.event&&window.event.altKey))||false;var f=(i.shiftKey==true||(window.event&&window.event.shiftKey))||false;var j=(i.ctrlKey==true||(window.event&&window.event.ctrlKey))||false;c(h,g,f,j)}function c(j,i,h,k){var f;for(var g in a){f=a[g];if(f.getKeyCode()==j&&f.getAltEnabled()==i&&f.getShiftPressed()==h&&f.getCtrlEnabled()==k){e(f,j)}}}function e(f,g){var h=f.getCallback();switch(typeof h){case"function":h(g);break;case"string":b(h);break}}function b(g){var f=document.getElementById(g);if(f){if(!f.href){return}document.location.href=f.href}}this.addShortcut=function(f){if(!(f instanceof Shortcut)){throw"Cannot push non-shortcut to ShortcutHandler"}a.push(f)};KYUI().use("node","event",function(f){f.on("keydown",d,document)})};
