Forward Alt to the device

There is no reason not to forward it.
This commit is contained in:
Romain Vimont 2020-05-29 00:47:01 +02:00
parent ad78ca9cfb
commit d95a52f277
2 changed files with 2 additions and 6 deletions

View file

@ -95,6 +95,8 @@ convert_keycode(SDL_Keycode from, enum android_keycode *to, uint16_t mod,
MAP(SDLK_RCTRL, AKEYCODE_CTRL_RIGHT);
MAP(SDLK_LSHIFT, AKEYCODE_SHIFT_LEFT);
MAP(SDLK_RSHIFT, AKEYCODE_SHIFT_RIGHT);
MAP(SDLK_LALT, AKEYCODE_ALT_LEFT);
MAP(SDLK_RALT, AKEYCODE_ALT_RIGHT);
}
if (!(mod & (KMOD_NUM | KMOD_SHIFT))) {

View file

@ -261,7 +261,6 @@ input_manager_process_key(struct input_manager *im,
// Only capture Left-Ctrl, Right-Ctrl is forwarded to the device
bool ctrl = event->keysym.mod & KMOD_LCTRL;
bool alt = event->keysym.mod & (KMOD_LALT | KMOD_RALT);
bool meta = event->keysym.mod & (KMOD_LGUI | KMOD_RGUI);
// use Cmd on macOS, Ctrl on other platforms
@ -276,11 +275,6 @@ input_manager_process_key(struct input_manager *im,
bool cmd = ctrl; // && !meta, already guaranteed
#endif
if (alt) {
// no shortcuts involve Alt, and it must not be forwarded to the device
return;
}
struct controller *controller = im->controller;
// capture all Ctrl events