Skip to content

Commit

Permalink
Added Tab key to keyTap
Browse files Browse the repository at this point in the history
  • Loading branch information
infiniteluke committed Apr 21, 2015
1 parent 7ad2129 commit d1e7b01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/keycode.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ enum _MMKeyCode {
K_BACKSPACE = kVK_Delete,
K_DELETE = kVK_ForwardDelete,
K_RETURN = kVK_Return,
K_TAB = kVK_Tab,
K_ESCAPE = kVK_Escape,
K_UP = kVK_UpArrow,
K_DOWN = kVK_DownArrow,
Expand Down Expand Up @@ -56,6 +57,7 @@ enum _MMKeyCode {
K_BACKSPACE = XK_BackSpace,
K_DELETE = XK_Delete,
K_RETURN = XK_Return,
K_TAB = XK_Tab,
K_ESCAPE = XK_Escape,
K_UP = XK_Up,
K_DOWN = XK_Down,
Expand Down Expand Up @@ -92,6 +94,7 @@ enum _MMKeyCode {
K_BACKSPACE = VK_BACK,
K_DELETE = VK_DELETE,
K_RETURN = VK_RETURN,
K_TAB = VK_TAB,
K_ESCAPE = VK_ESCAPE,
K_UP = VK_UP,
K_DOWN = VK_DOWN,
Expand Down
4 changes: 4 additions & 0 deletions src/robotjs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ NAN_METHOD(keyTap)
{
key = K_RETURN;
}
else if (strcmp(k, "tab") == 0)
{
key = K_TAB;
}
else if (strcmp(k, "up") == 0)
{
key = K_UP;
Expand Down

0 comments on commit d1e7b01

Please sign in to comment.