diff options
Diffstat (limited to 'mpvcore/input/input.c')
-rw-r--r-- | mpvcore/input/input.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mpvcore/input/input.c b/mpvcore/input/input.c index c1711a94d8..8b31352f72 100644 --- a/mpvcore/input/input.c +++ b/mpvcore/input/input.c @@ -550,6 +550,7 @@ struct input_ctx { pthread_mutex_t mutex; struct mp_log *log; + bool using_alt_gr; bool using_ar; bool using_cocoa_media_keys; @@ -635,6 +636,7 @@ const m_option_t mp_input_opts[] = { OPT_FLAG("joystick", input.use_joystick, CONF_GLOBAL), OPT_FLAG("lirc", input.use_lirc, CONF_GLOBAL), OPT_FLAG("lircc", input.use_lircc, CONF_GLOBAL), + OPT_FLAG("right-alt-gr", input.use_alt_gr, CONF_GLOBAL), #if HAVE_COCOA OPT_FLAG("ar", input.use_ar, CONF_GLOBAL), OPT_FLAG("media-keys", input.use_media_keys, CONF_GLOBAL), @@ -2387,6 +2389,10 @@ struct input_ctx *mp_input_init(struct mpv_global *global) } #endif + if (input_conf->use_alt_gr) { + ictx->using_alt_gr = true; + } + #if HAVE_COCOA if (input_conf->use_ar) { cocoa_init_apple_remote(); @@ -2528,3 +2534,8 @@ unsigned int mp_input_get_mouse_event_counter(struct input_ctx *ictx) input_unlock(ictx); return ret; } + +bool mp_input_use_alt_gr(struct input_ctx *ictx) +{ + return ictx->using_alt_gr; +} |