Skip to content

Commit

Permalink
Update robotjs.cc
Browse files Browse the repository at this point in the history
Added function keys
  • Loading branch information
Hypercubed committed Aug 1, 2015
1 parent fc13b29 commit fb4198c
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/robotjs.cc
Expand Up @@ -251,6 +251,54 @@ int CheckKeyCodes(char* k, MMKeyCode *key)
{
*key = K_SPACE;
}
else if (strcmp(k, "f1") == 0)
{
*key = K_F1;
}
else if (strcmp(k, "f2") == 0)
{
*key = K_F2;
}
else if (strcmp(k, "f3") == 0)
{
*key = K_F3;
}
else if (strcmp(k, "f4") == 0)
{
*key = K_F4;
}
else if (strcmp(k, "f5") == 0)
{
*key = K_F5;
}
else if (strcmp(k, "f6") == 0)
{
*key = K_F6;
}
else if (strcmp(k, "f7") == 0)
{
*key = K_F7;
}
else if (strcmp(k, "f8") == 0)
{
*key = K_F8;
}
else if (strcmp(k, "f9") == 0)
{
*key = K_F9;
}
else if (strcmp(k, "f10") == 0)
{
*key = K_F10;
}
else if (strcmp(k, "f11") == 0)
{
*key = K_F11;
}
else if (strcmp(k, "f12") == 0)
{
*key = K_F12;
}
else if (strlen(k) == 1)
{
*key = keyCodeForChar(*k);
Expand Down

0 comments on commit fb4198c

Please sign in to comment.