예제 #1
0
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (keyData == Keys.Escape)
            {
                CursorManager.ReleaseMouse();
            }

            return(base.ProcessCmdKey(ref msg, keyData));
        }
예제 #2
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);
            }

            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);
        }