コード例 #1
0
ファイル: BaseInputForm.cs プロジェクト: yoshisuga/Mesen-S
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (keyData == Keys.Escape)
            {
                CursorManager.ReleaseMouse();
            }

            return(base.ProcessCmdKey(ref msg, keyData));
        }
コード例 #2
0
ファイル: BaseInputForm.cs プロジェクト: trevormerritt/Mesen
        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);
        }
コード例 #3
0
        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);
        }