- window.addEvent("keydown", function(x) {
- if(!x.alt || x.control)
- return;
-
- var success = false;
- if(x.key == "a" || x.key == "A") {
- var highestNum = 0;
- var highestIndex = -1;
- success = true;
-
- new Event(x).stop();
- for(var i=0;i<this.windowArray.length;i++) {
- var h = this.windowArray[i].hilighted;
- if(h > highestNum) {
- highestIndex = i;
- highestNum = h;
- }
+ if(Browser.Engine.trident) {
+ ev = "keydown";
+ } else {
+ ev = "keypress";
+ }
+ document.addEvent(ev, this.__handleHotkey.bind(this));
+ },
+ __handleHotkey: function(x) {
+ if(!x.alt || x.control) {
+ if(x.key == "backspace" || x.key == "/")
+ if(!this.getInputFocused(x))
+ new Event(x).stop();
+ return;
+ }
+ var success = false;
+ if(x.key == "a" || x.key == "A") {
+ var highestNum = 0;
+ var highestIndex = -1;
+ success = true;
+
+ new Event(x).stop();
+ for(var i=0;i<this.windowArray.length;i++) {
+ var h = this.windowArray[i].hilighted;
+ if(h > highestNum) {
+ highestIndex = i;
+ highestNum = h;