Skip to content

Commit 07a6b11

Browse files
committed
Add some comments.
1 parent 1526cf3 commit 07a6b11

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/robotjs.cc

+7-1
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,16 @@ NAN_METHOD(keyToggle)
482482
bool down;
483483
char *k;
484484
char *f;
485+
486+
//Get arguments from JavaScript.
485487
Nan::Utf8String kstr(info[0]);
486488
Nan::Utf8String fstr(info[2]);
487489

490+
//Convert arguments to chars.
488491
k = *kstr;
489492
f = *fstr;
490-
493+
494+
//Check and confirm number of arguments.
491495
switch (info.Length())
492496
{
493497
case 3:
@@ -521,6 +525,7 @@ NAN_METHOD(keyToggle)
521525
}
522526
}
523527

528+
//Get key modifier.
524529
if (f)
525530
{
526531
switch(CheckKeyFlags(f, &flags))
@@ -534,6 +539,7 @@ NAN_METHOD(keyToggle)
534539
}
535540
}
536541

542+
//Get the acutal key.
537543
switch(CheckKeyCodes(k, &key))
538544
{
539545
case -1:

0 commit comments

Comments
 (0)