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" "command"
"alt" "alt"
"ctrl" "ctrl"
"lctrl"
"rctrl"
"control" "control"
"shift" "shift"
"capslock" "capslock"

View File

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