Skip to content

Commit

Permalink
Added additional keys for keyTap.
Browse files Browse the repository at this point in the history
  • Loading branch information
octalmage committed Feb 6, 2015
1 parent ec8adb9 commit 1895133
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/robotjs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,26 @@ NAN_METHOD(keyTap)
{
key = K_ESCAPE;
}
else if (strcmp(k, "delete") == 0)
{
key = K_DELETE;
}
else if (strcmp(k, "home") == 0)
{
key = K_HOME;
}
else if (strcmp(k, "end") == 0)
{
key = K_END;
}
else if (strcmp(k, "pageup") == 0)
{
key = K_PAGEUP;
}
else if (strcmp(k, "pagedown") == 0)
{
key = K_PAGEDOWN;
}
else
{
return NanThrowError("Invalid key specified.");
Expand Down

0 comments on commit 1895133

Please sign in to comment.