mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 713498 - [b2g] Allow keyCode and charCode to be different in the mozKeyboard interface r=vingtetun
This commit is contained in:
parent
2ae85fdb11
commit
ba150e9b44
@ -312,11 +312,13 @@ function MozKeyboard() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MozKeyboard.prototype = {
|
MozKeyboard.prototype = {
|
||||||
sendKey: function mozKeyboardSendKey(keyCode) {
|
sendKey: function mozKeyboardSendKey(keyCode, charCode) {
|
||||||
|
charCode = (charCode == undefined) ? keyCode : charCode;
|
||||||
|
|
||||||
var utils = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
var utils = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
.getInterface(Ci.nsIDOMWindowUtils);
|
.getInterface(Ci.nsIDOMWindowUtils);
|
||||||
['keydown', 'keypress', 'keyup'].forEach(function sendKeyEvents(type) {
|
['keydown', 'keypress', 'keyup'].forEach(function sendKeyEvents(type) {
|
||||||
utils.sendKeyEvent(type, keyCode, keyCode, null);
|
utils.sendKeyEvent(type, keyCode, charCode, null);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user