fix #484
This commit is contained in:
parent
5e40adf1f7
commit
c99cc7fa2a
|
@ -512,5 +512,14 @@ namespace BizHawk.Client.EmuHawk
|
||||||
//to get triggered in the main form
|
//to get triggered in the main form
|
||||||
public bool EnableIgnoreModifiers = false;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,7 +210,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (!e.Control && !e.Alt && !e.Shift &&
|
if (!e.Control && !e.Alt && !e.Shift &&
|
||||||
(e.KeyCode == Keys.Enter || e.KeyCode == Keys.Tab))
|
(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
|
//Found
|
||||||
if (b != null)
|
if (b != null)
|
||||||
|
@ -219,6 +219,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (w != null)
|
if (w != null)
|
||||||
{
|
{
|
||||||
HotkeyTabControl.SelectTab((w.Parent as TabPage));
|
HotkeyTabControl.SelectTab((w.Parent as TabPage));
|
||||||
|
Input.Instance.BindUnpress(e.KeyCode);
|
||||||
w.Focus();
|
w.Focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue