Forward Alt to the device
There is no reason not to forward it.
This commit is contained in:
parent
ad78ca9cfb
commit
d95a52f277
@ -95,6 +95,8 @@ convert_keycode(SDL_Keycode from, enum android_keycode *to, uint16_t mod,
|
|||||||
MAP(SDLK_RCTRL, AKEYCODE_CTRL_RIGHT);
|
MAP(SDLK_RCTRL, AKEYCODE_CTRL_RIGHT);
|
||||||
MAP(SDLK_LSHIFT, AKEYCODE_SHIFT_LEFT);
|
MAP(SDLK_LSHIFT, AKEYCODE_SHIFT_LEFT);
|
||||||
MAP(SDLK_RSHIFT, AKEYCODE_SHIFT_RIGHT);
|
MAP(SDLK_RSHIFT, AKEYCODE_SHIFT_RIGHT);
|
||||||
|
MAP(SDLK_LALT, AKEYCODE_ALT_LEFT);
|
||||||
|
MAP(SDLK_RALT, AKEYCODE_ALT_RIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(mod & (KMOD_NUM | KMOD_SHIFT))) {
|
if (!(mod & (KMOD_NUM | KMOD_SHIFT))) {
|
||||||
|
@ -261,7 +261,6 @@ input_manager_process_key(struct input_manager *im,
|
|||||||
|
|
||||||
// Only capture Left-Ctrl, Right-Ctrl is forwarded to the device
|
// Only capture Left-Ctrl, Right-Ctrl is forwarded to the device
|
||||||
bool ctrl = event->keysym.mod & KMOD_LCTRL;
|
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);
|
bool meta = event->keysym.mod & (KMOD_LGUI | KMOD_RGUI);
|
||||||
|
|
||||||
// use Cmd on macOS, Ctrl on other platforms
|
// 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
|
bool cmd = ctrl; // && !meta, already guaranteed
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (alt) {
|
|
||||||
// no shortcuts involve Alt, and it must not be forwarded to the device
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct controller *controller = im->controller;
|
struct controller *controller = im->controller;
|
||||||
|
|
||||||
// capture all Ctrl events
|
// capture all Ctrl events
|
||||||
|
Loading…
x
Reference in New Issue
Block a user