fixed vkey

pull/1705/head
antelle 2021-01-30 20:29:26 +01:00
parent cd2de3a1db
commit 8dc3a4b51f
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
2 changed files with 2 additions and 2 deletions

View File

@ -240,7 +240,7 @@ AutoTypeRunner.prototype.tryParseCommand = function (op) {
// {VKEY 10} {VKEY 0x1F}
op.type = 'key';
op.value = parseInt(op.arg);
if (isNaN(op.value) || op.value <= 0) {
if (isNaN(op.value) || op.value < 0) {
throw 'Bad vkey: ' + op.arg;
}
return true;

View File

@ -135,7 +135,7 @@ const messageHandlers = {
return getAutoType().keyMoveWithModifier(down, kbdModifier(modifiers));
},
kbdKeyPressWithCharacter(down, character, code, modifiers) {
kbdKeyPressWithCharacter(character, code, modifiers) {
const typer = getAutoType();
typer.keyMoveWithCharacter(true, character, code, kbdModifier(modifiers));
typer.keyMoveWithCharacter(false, character, code, kbdModifier(modifiers));