// ===== PRIVATE METHODS =====
_sendKeyEvent: function (keysym, code, down) {
+ if (down) {
+ this._keyDownList[code] = keysym;
+ } else {
+ // Do we really think this key is down?
+ if (!(code in this._keyDownList)) {
+ return;
+ }
+ delete this._keyDownList[code];
+ }
+
Log.Debug("onkeyevent " + (down ? "down" : "up") +
", keysym: " + keysym, ", code: " + code);
this._pendingKey = null;
stopEvent(e);
- this._keyDownList[code] = keysym;
-
this._sendKeyEvent(keysym, code, true);
},
return;
}
- this._keyDownList[code] = keysym;
-
this._sendKeyEvent(keysym, code, true);
},
_handleKeyPressTimeout: function (e) {
keysym = 0;
}
- this._keyDownList[code] = keysym;
-
this._sendKeyEvent(keysym, code, true);
},
return;
}
- // Do we really think this key is down?
- if (!(code in this._keyDownList)) {
- return;
- }
-
this._sendKeyEvent(this._keyDownList[code], code, false);
-
- delete this._keyDownList[code];
},
_allKeysUp: function () {
for (var code in this._keyDownList) {
this._sendKeyEvent(this._keyDownList[code], code, false);
};
- this._keyDownList = {};
Log.Debug("<< Keyboard.allKeysUp");
},