summaryrefslogtreecommitdiffstats
path: root/video/out/vo_sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo_sdl.c')
-rw-r--r--video/out/vo_sdl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c
index 6fe62b187b..86643788b9 100644
--- a/video/out/vo_sdl.c
+++ b/video/out/vo_sdl.c
@@ -495,11 +495,13 @@ static void check_events(struct vo *vo)
case SDL_TEXTINPUT: {
int sdl_mod = SDL_GetModState();
int mpv_mod = 0;
- // we ignore KMOD_LSHIFT, KMOD_RSHIFT and KMOD_RALT because
- // these are already factored into ev.text.text
+ // we ignore KMOD_LSHIFT, KMOD_RSHIFT and KMOD_RALT (if
+ // mp_input_use_alt_gr() is true) because these are already
+ // factored into ev.text.text
if (sdl_mod & (KMOD_LCTRL | KMOD_RCTRL))
mpv_mod |= MP_KEY_MODIFIER_CTRL;
- if (sdl_mod & KMOD_LALT)
+ if ((sdl_mod & KMOD_LALT) ||
+ (sdl_mod & KMOD_RALT) && !mp_input_use_alt_gr(vo->input_ctx))
mpv_mod |= MP_KEY_MODIFIER_ALT;
if (sdl_mod & (KMOD_LGUI | KMOD_RGUI))
mpv_mod |= MP_KEY_MODIFIER_META;