Skip to content

Commit 33f838d

Browse files
authored
Added right_control and left_control to key flags as well as right_shift
This is to fix the bug in #261 . Haven't tested it yet since I don't have a working environment yet, but I cannot find anything in the platform documentations that specify a left or right control mask different from the mask that is currently assigned to `MOD_CONTROL` in `keypress.h`. Oh, and this also extends the functionality to `right_shift` as well
1 parent c1f04e0 commit 33f838d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/robotjs.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -419,11 +419,11 @@ int CheckKeyFlags(char* f, MMKeyFlags* flags)
419419
{
420420
*flags = MOD_META;
421421
}
422-
else if(strcmp(f, "control") == 0)
422+
else if(strcmp(f, "control") == 0 || strcmp(f, "right_control") == 0 || strcmp(f, "left_control") == 0)
423423
{
424424
*flags = MOD_CONTROL;
425425
}
426-
else if(strcmp(f, "shift") == 0)
426+
else if(strcmp(f, "shift") == 0 || strcmp(f, "right_shift") == 0)
427427
{
428428
*flags = MOD_SHIFT;
429429
}

0 commit comments

Comments
 (0)