From 3099b59c2c454ad807d0c623561b5de88a913fab Mon Sep 17 00:00:00 2001 From: Norihiro Kamae Date: Thu, 19 May 2022 00:22:12 +0900 Subject: [PATCH] libobs: Fix hotkey with right-side modifiers However the hotkeys can be configured with right-side modifiers in UI, the right modifiers did not work when hitting the hot keys. This is because `query_hotkeys` in `obs-hotkey.c` was querying states of only left modifiers. --- libobs/obs-nix-x11.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libobs/obs-nix-x11.c b/libobs/obs-nix-x11.c index cd9e62317..54eea1628 100644 --- a/libobs/obs-nix-x11.c +++ b/libobs/obs-nix-x11.c @@ -694,6 +694,15 @@ static obs_key_t key_from_base_keysym(obs_hotkeys_platform_t *context, } } + switch (code) { + case XK_Shift_R: + return OBS_KEY_SHIFT; + case XK_Control_R: + return OBS_KEY_CONTROL; + case XK_Alt_R: + return OBS_KEY_ALT; + } + return OBS_KEY_NONE; }