add left and right Ctrl support

This commit is contained in:
vcaesar 2018-12-16 13:36:53 -04:00
parent f269b7fd27
commit 77a7382e3b
2 changed files with 6 additions and 1 deletions

View File

@ -47,6 +47,8 @@
"command"
"alt"
"ctrl"
"lctrl"
"rctrl"
"control"
"shift"
"capslock"

View File

@ -65,6 +65,8 @@ struct KeyNames{
{ "command", K_META },
{ "alt", K_ALT },
{ "ctrl", K_CONTROL },
{ "lctrl", K_LCONTROL },
{ "rctrl", K_RCONTROL },
{ "control", K_CONTROL },
{ "shift", K_SHIFT },
{ "capslock", K_CAPSLOCK },
@ -164,7 +166,8 @@ int CheckKeyFlags(char* f, MMKeyFlags* flags){
else if( strcmp(f, "command") == 0 || strcmp(f, "cmd") == 0 ) {
*flags = MOD_META;
}
else if( strcmp(f, "control") == 0 || strcmp(f, "ctrl") == 0 ) {
else if( strcmp(f, "control") == 0 || strcmp(f, "ctrl") == 0 ||
strcmp(f, "rctrl") == 0 || strcmp(f, "lctrl") == 0 ) {
*flags = MOD_CONTROL;
}
else if( strcmp(f, "shift") == 0 ) {