System.Windows.Forms.HexBox.KeyInterpreter.PreProcessWmKeyDown C# (CSharp) Method

PreProcessWmKeyDown() public method

public PreProcessWmKeyDown ( Message &m ) : bool
m Message
return bool
            public virtual bool PreProcessWmKeyDown(ref Message m)
            {
                Keys vc = (Keys)m.WParam.ToInt32();

                Keys keyData = vc | Control.ModifierKeys;

                switch(keyData)
                {
                    case Keys.Left:
                    case Keys.Up:
                    case Keys.Right:
                    case Keys.Down:
                    case Keys.PageUp:
                    case Keys.PageDown:
                    case Keys.Left | Keys.Shift:
                    case Keys.Up | Keys.Shift:
                    case Keys.Right | Keys.Shift:
                    case Keys.Down | Keys.Shift:
                    case Keys.Tab:
                    case Keys.Back:
                    case Keys.Delete:
                    case Keys.Home:
                    case Keys.End:
                    case Keys.ShiftKey | Keys.Shift:
                    case Keys.C | Keys.Control:
                    case Keys.X | Keys.Control:
                    case Keys.V | Keys.Control:
                        if(RaiseKeyDown(keyData))
                            return true;
                        break;
                }

                switch(keyData)
                {
                    case Keys.Left:						// move left
                        return PreProcessWmKeyDown_Left(ref m);
                    case Keys.Up:						// move up
                        return PreProcessWmKeyDown_Up(ref m);
                    case Keys.Right:					// move right
                        return PreProcessWmKeyDown_Right(ref m);
                    case Keys.Down:						// move down
                        return PreProcessWmKeyDown_Down(ref m);
                    case Keys.PageUp:					// move pageup
                        return PreProcessWmKeyDown_PageUp(ref m);
                    case Keys.PageDown:					// move pagedown
                        return PreProcessWmKeyDown_PageDown(ref m);
                    case Keys.Left | Keys.Shift:		// move left with selection
                        return PreProcessWmKeyDown_ShiftLeft(ref m);
                    case Keys.Up | Keys.Shift:			// move up with selection
                        return PreProcessWmKeyDown_ShiftUp(ref m);
                    case Keys.Right | Keys.Shift:		// move right with selection
                        return PreProcessWmKeyDown_ShiftRight(ref m);
                    case Keys.Down | Keys.Shift:		// move down with selection
                        return PreProcessWmKeyDown_ShiftDown(ref m);
                    case Keys.Tab:						// switch focus to string view
                        return PreProcessWmKeyDown_Tab(ref m);
                    case Keys.Back:						// back
                        return PreProcessWmKeyDown_Back(ref m);
                    case Keys.Delete:					// delete
                        return PreProcessWmKeyDown_Delete(ref m);
                    case Keys.Home:						// move to home
                        return PreProcessWmKeyDown_Home(ref m);
                    case Keys.End:						// move to end
                        return PreProcessWmKeyDown_End(ref m);
                    case Keys.ShiftKey | Keys.Shift:	// begin selection process
                        return PreProcessWmKeyDown_ShiftShiftKey(ref m);
                    case Keys.C | Keys.Control:			// copy
                        return PreProcessWmKeyDown_ControlC(ref m);
                    case Keys.X | Keys.Control:			// cut
                        return PreProcessWmKeyDown_ControlX(ref m);
                    case Keys.V | Keys.Control:			// paste
                        return PreProcessWmKeyDown_ControlV(ref m);
                    default:
                        _hexBox.ScrollByteIntoView();
                        return _hexBox.BasePreProcessMessage(ref m);
                }
            }