ComponentFactory.Krypton.Ribbon.VisualPopupAppMenu.OnKeyDown C# (CSharp) Method

OnKeyDown() protected method

Raises the KeyDown event.
protected OnKeyDown ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs A KeyEventArgs that contains the event data.
return void
        protected override void OnKeyDown(KeyEventArgs e)
        {
            // Cannot process a message for a disposed control
            if (!IsDisposed)
            {
                // If the user pressed the escape key
                if (e.KeyData == Keys.Escape)
                {
                    // Using the escape key should give a close reason of keyboard
                    _provider.ProviderCloseReason = ToolStripDropDownCloseReason.Keyboard;
                }
            }

            // Let base class fire events
            base.OnKeyDown(e);
        }