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
4ebcc40895
commit
5731c6fb90
@ -312,11 +312,13 @@ function MozKeyboard() {
|
||||
}
|
||||
|
||||
MozKeyboard.prototype = {
|
||||
sendKey: function mozKeyboardSendKey(keyCode) {
|
||||
sendKey: function mozKeyboardSendKey(keyCode, charCode) {
|
||||
charCode = (charCode == undefined) ? keyCode : charCode;
|
||||
|
||||
var utils = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils);
|
||||
['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