Add a Hotkey class for user-configurable keys. Fixes #3779.
Users can now define and use hotkeys that include modifiers (ctrl/meta/shift/alt).
This commit is contained in:
@@ -274,8 +274,10 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
|
||||
public override bool HandleKeyPress(KeyInput e)
|
||||
{
|
||||
if (e.Event != KeyInputEvent.Down) return false;
|
||||
if (KeycodeExts.DisplayString(e.Key) == Game.Settings.Keys.CycleTabsKey)
|
||||
if (e.Event != KeyInputEvent.Down)
|
||||
return false;
|
||||
|
||||
if (Hotkey.FromKeyInput(e) == Game.Settings.Keys.CycleTabsKey)
|
||||
{
|
||||
Sound.PlayNotification(null, "Sounds", "ClickSound", null);
|
||||
SelectNextTab(e.Modifiers.HasModifier(Modifiers.Shift));
|
||||
|
||||
Reference in New Issue
Block a user