Skip to content

Commit

Permalink
Add some comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
octalmage committed Oct 12, 2015
1 parent 1526cf3 commit 07a6b11
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/robotjs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,16 @@ NAN_METHOD(keyToggle)
bool down;
char *k;
char *f;

//Get arguments from JavaScript.
Nan::Utf8String kstr(info[0]);
Nan::Utf8String fstr(info[2]);

//Convert arguments to chars.
k = *kstr;
f = *fstr;


//Check and confirm number of arguments.
switch (info.Length())
{
case 3:
Expand Down Expand Up @@ -521,6 +525,7 @@ NAN_METHOD(keyToggle)
}
}

//Get key modifier.
if (f)
{
switch(CheckKeyFlags(f, &flags))
Expand All @@ -534,6 +539,7 @@ NAN_METHOD(keyToggle)
}
}

//Get the acutal key.
switch(CheckKeyCodes(k, &key))
{
case -1:
Expand Down

0 comments on commit 07a6b11

Please sign in to comment.