From e6a979bfd3260331a008af85c8749dc503a97970 Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 22 Apr 2014 19:47:02 +0000 Subject: [PATCH] escape can now be bound through the special bindings dropdown menu --- BizHawk.Client.EmuHawk/config/InputWidget.cs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/BizHawk.Client.EmuHawk/config/InputWidget.cs b/BizHawk.Client.EmuHawk/config/InputWidget.cs index e54d4ebeb5..e42d2eb260 100644 --- a/BizHawk.Client.EmuHawk/config/InputWidget.cs +++ b/BizHawk.Client.EmuHawk/config/InputWidget.cs @@ -23,6 +23,7 @@ namespace BizHawk.Client.EmuHawk /// These bindings get ignored by the widget and can only be entered by SetBinding() via the contextmenu from the InputCompositeWidget /// public static readonly string[] SpecialBindings = new[] { + "Escape", "WMouse L","WMouse M","WMouse R", "WMouse 1", "WMouse 2" }; @@ -142,24 +143,29 @@ namespace BizHawk.Client.EmuHawk if (bindingStr != null) { - //ignore special bindings - if (SpecialBindings.Contains(bindingStr)) - { - return; - } - + + //has special meaning for the binding UI system (clear it). + //you can set it through the special bindings dropdown menu if (bindingStr == "Escape") { EraseMappings(); Increment(); return; } - + + //seriously, we refuse to allow you to bind this to anything else. if (bindingStr == "Alt+F4") { return; } + //ignore special bindings + if (SpecialBindings.Contains(bindingStr)) + { + return; + } + + if (!IsDuplicate(bindingStr)) { _bindings[_pos] = bindingStr;