protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Escape) { CursorManager.ReleaseMouse(); } return(base.ProcessCmdKey(ref msg, keyData)); }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Escape) { CursorManager.ReleaseMouse(); } bool result = base.ProcessCmdKey(ref msg, keyData); if (keyData == Keys.F10 || keyData == (Keys.F10 | Keys.Shift)) { //Prevent default Windows behavior on F10 / Shift+F10 presses, which causes issues //such as the Shift key not being processed as being released, etc. return(true); } return(result); }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Escape) { CursorManager.ReleaseMouse(); } bool result = base.ProcessCmdKey(ref msg, keyData); if (keyData == Keys.F10 || keyData == (Keys.F10 | Keys.Shift)) { //Prevent default Windows behavior on F10 / Shift+F10 presses, which causes issues //such as the Shift key not being processed as being released, etc. return(true); } else if (keyData.HasFlag(Keys.Alt) && InteropEmu.IsKeyboardMode()) { //Prevent Alt key from activating menu when in keyboard mode return(true); } return(result); }