1
0
Эх сурвалжийг харах

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.
Norihiro Kamae 3 жил өмнө
parent
commit
3099b59c2c

+ 9 - 0
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;
 	return OBS_KEY_NONE;
 }
 }