diff --git a/BizHawk.Client.EmuHawk/Input/Input.cs b/BizHawk.Client.EmuHawk/Input/Input.cs index c9e7a18d77..f58533b073 100644 --- a/BizHawk.Client.EmuHawk/Input/Input.cs +++ b/BizHawk.Client.EmuHawk/Input/Input.cs @@ -512,5 +512,14 @@ namespace BizHawk.Client.EmuHawk //to get triggered in the main form public bool EnableIgnoreModifiers = false; + //sets a key as unpressed for the binding system + public void BindUnpress(System.Windows.Forms.Keys key) + { + //only validated for Return + string keystr = key.ToString(); + UnpressState[keystr] = true; + LastState[keystr] = true; + } + } } diff --git a/BizHawk.Client.EmuHawk/config/HotkeyConfig.cs b/BizHawk.Client.EmuHawk/config/HotkeyConfig.cs index a0dd430e3a..e40e5be15b 100644 --- a/BizHawk.Client.EmuHawk/config/HotkeyConfig.cs +++ b/BizHawk.Client.EmuHawk/config/HotkeyConfig.cs @@ -210,7 +210,7 @@ namespace BizHawk.Client.EmuHawk if (!e.Control && !e.Alt && !e.Shift && (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Tab)) { - var b = Global.Config.HotkeyBindings.FirstOrDefault(x => x.DisplayName == SearchBox.Text); + var b = Global.Config.HotkeyBindings.FirstOrDefault(x => string.Compare(x.DisplayName,SearchBox.Text,true)==0); //Found if (b != null) @@ -219,6 +219,7 @@ namespace BizHawk.Client.EmuHawk if (w != null) { HotkeyTabControl.SelectTab((w.Parent as TabPage)); + Input.Instance.BindUnpress(e.KeyCode); w.Focus(); } }