diff --git a/app/src/event_converter.c b/app/src/event_converter.c index 1054dcf9ec..784806a4f1 100644 --- a/app/src/event_converter.c +++ b/app/src/event_converter.c @@ -92,6 +92,8 @@ convert_keycode(SDL_Keycode from, enum android_keycode *to, uint16_t mod, MAP(SDLK_LEFT, AKEYCODE_DPAD_LEFT); MAP(SDLK_DOWN, AKEYCODE_DPAD_DOWN); MAP(SDLK_UP, AKEYCODE_DPAD_UP); + MAP(SDLK_LCTRL, AKEYCODE_CTRL_LEFT); + MAP(SDLK_RCTRL, AKEYCODE_CTRL_RIGHT); } if (!(mod & (KMOD_NUM | KMOD_SHIFT))) { diff --git a/app/src/input_manager.c b/app/src/input_manager.c index a8c5aa4529..d1c12a11b9 100644 --- a/app/src/input_manager.c +++ b/app/src/input_manager.c @@ -263,9 +263,8 @@ input_manager_process_key(struct input_manager *im, bool alt = event->keysym.mod & (KMOD_LALT | KMOD_RALT); bool meta = event->keysym.mod & (KMOD_LGUI | KMOD_RGUI); - if (alt || ctrl) { - // No shortcuts involve Alt or Ctrl, and they are not forwarded to the - // device + if (alt) { + // No shortcuts involve Alt, and it is not forwarded to the device return; } @@ -273,6 +272,11 @@ input_manager_process_key(struct input_manager *im, // Capture all Meta events if (meta) { + if (ctrl) { + // No shortcuts involve Ctrl+Meta + return; + } + SDL_Keycode keycode = event->keysym.sym; bool down = event->type == SDL_KEYDOWN; int action = down ? ACTION_DOWN : ACTION_UP;