Stop keyboard injection as soon as any real keyboard activity is detected
This commit is contained in:
parent
6e6e95eb1f
commit
8f8082d170
5 changed files with 14 additions and 9 deletions
|
|
@ -1359,6 +1359,11 @@ class Keyboard extends Component {
|
|||
|
||||
var keyCode = event.keyCode;
|
||||
|
||||
/*
|
||||
* Let's stop any injection currently in progress...
|
||||
*/
|
||||
this.sInjectBuffer = "";
|
||||
|
||||
/*
|
||||
* Although it would be nice to pay attention ONLY to these "up" and "down" events, and ignore "press"
|
||||
* events, iOS devices force us to process "press" events, because they don't give us shift-key events,
|
||||
|
|
@ -1499,6 +1504,11 @@ class Keyboard extends Component {
|
|||
event = event || window.event;
|
||||
var keyCode = event.which || event.keyCode;
|
||||
|
||||
/*
|
||||
* Let's stop any injection currently in progress...
|
||||
*/
|
||||
this.sInjectBuffer = "";
|
||||
|
||||
if (this.fAllDown) {
|
||||
var simCode = this.checkActiveKey();
|
||||
if (simCode && this.isAlphaKey(simCode) && this.isAlphaKey(keyCode) && simCode != keyCode) {
|
||||
|
|
@ -1510,11 +1520,6 @@ class Keyboard extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Let's stop any injection currently in progress, too
|
||||
*/
|
||||
this.sInjectBuffer = "";
|
||||
|
||||
var fPass = !Keyboard.SIMCODES[keyCode] || !!(this.bitsState & Keyboard.STATE.CMD);
|
||||
|
||||
if (!COMPILED && this.messageEnabled(Messages.KEYS)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue