mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-19 06:51:09 +00:00
Fixed F10 key focusing the menu on key release
This commit is contained in:
parent
c00e2a8074
commit
7b5506363e
3 changed files with 12 additions and 0 deletions
|
@ -89,6 +89,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
tabs.ImageList = scripticons; //mxd
|
||||
PreviewKeyDown += new PreviewKeyDownEventHandler(ScriptEditorPanel_PreviewKeyDown);
|
||||
KeyDown += new KeyEventHandler(ScriptEditorPanel_KeyDown);
|
||||
KeyUp += new KeyEventHandler(ScriptEditorPanel_KeyDown);
|
||||
}
|
||||
|
||||
// This initializes the control
|
||||
|
|
|
@ -1472,6 +1472,16 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
if(e.Handled)
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
|
||||
if (e.KeyCode == Keys.F10)
|
||||
{
|
||||
Actions.Action[] f10actions = General.Actions.GetActionsByKey((int)e.KeyData);
|
||||
if (f10actions.Length > 0)
|
||||
{
|
||||
e.SuppressKeyPress = true;
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//mxd. Sometimes it's handeled by RenderTargetControl, not by MainForm leading to keys being "stuck"
|
||||
|
|
|
@ -49,6 +49,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
KeyPreview = true;
|
||||
PreviewKeyDown += new PreviewKeyDownEventHandler(ScriptEditorForm_PreviewKeyDown);
|
||||
KeyDown += new KeyEventHandler(ScriptEditorForm_KeyDown);
|
||||
KeyUp += new KeyEventHandler(ScriptEditorForm_KeyDown);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue