InputWidget now clears on Escape

This commit is contained in:
kylethomson 2011-02-20 03:06:06 +00:00
parent 1a00047b7e
commit bb10d36b73
1 changed files with 14 additions and 6 deletions

View File

@ -32,12 +32,20 @@ namespace BizHawk.MultiClient
if (e.KeyCode == Keys.ControlKey) return;
if (e.KeyCode == Keys.ShiftKey) return;
if (e.KeyCode == Keys.Menu) return;
KeyboardBinding kb = new KeyboardBinding();
kb.key = e.KeyCode;
kb.modifiers = e.Modifiers;
Bindings.Clear();
Bindings.Add(kb);
UpdateLabel();
if (e.KeyCode != Keys.Escape)
{
KeyboardBinding kb = new KeyboardBinding();
kb.key = e.KeyCode;
kb.modifiers = e.Modifiers;
Bindings.Clear();
Bindings.Add(kb);
UpdateLabel();
}
else
{
Bindings.Clear();
UpdateLabel();
}
}
protected override void OnKeyPress(KeyPressEventArgs e)