From 1ac29f3c5d80d5dabc080f95b01b91a976207242 Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Tue, 5 Jul 2011 01:48:48 +0000 Subject: [PATCH] Input Widget - prevent mapping to Alt+F4 and allow parent dialog to be closed by it --- BizHawk.MultiClient/config/InputWidget.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/BizHawk.MultiClient/config/InputWidget.cs b/BizHawk.MultiClient/config/InputWidget.cs index 9065d86134..2ba4c13b0c 100644 --- a/BizHawk.MultiClient/config/InputWidget.cs +++ b/BizHawk.MultiClient/config/InputWidget.cs @@ -53,8 +53,13 @@ namespace BizHawk.MultiClient Bindings.Clear(); UpdateLabel(); } + + if (e.KeyCode == Keys.F4) + e.Handled = false; + if (AutoTab) this.Parent.SelectNextControl(this, true, true, true, true); + } protected override void OnKeyUp(KeyEventArgs e) @@ -168,6 +173,9 @@ namespace BizHawk.MultiClient string str = ""; str += key.ToString(); + if (str.Length == 2 && str == "F4") //Don't allow mapping of alt+f4 + if ((modifiers & Keys.Alt) != 0) + return ""; if (str.Length == 10 && str == "ControlKey") str = "Ctrl"; if (str.Length == 4 && str == "Menu")