We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1526cf3 commit 07a6b11Copy full SHA for 07a6b11
src/robotjs.cc
@@ -482,12 +482,16 @@ NAN_METHOD(keyToggle)
482
bool down;
483
char *k;
484
char *f;
485
+
486
+ //Get arguments from JavaScript.
487
Nan::Utf8String kstr(info[0]);
488
Nan::Utf8String fstr(info[2]);
489
490
+ //Convert arguments to chars.
491
k = *kstr;
492
f = *fstr;
-
493
494
+ //Check and confirm number of arguments.
495
switch (info.Length())
496
{
497
case 3:
@@ -521,6 +525,7 @@ NAN_METHOD(keyToggle)
521
525
}
522
526
523
527
528
+ //Get key modifier.
524
529
if (f)
530
531
switch(CheckKeyFlags(f, &flags))
@@ -534,6 +539,7 @@ NAN_METHOD(keyToggle)
534
539
535
540
536
541
542
+ //Get the acutal key.
537
543
switch(CheckKeyCodes(k, &key))
538
544
545
case -1:
0 commit comments