OpenIDE.UI.RunCommandForm.textBoxSearch_KeyDown C# (CSharp) Method

textBoxSearch_KeyDown() private method

private textBoxSearch_KeyDown ( object sender, KeyEventArgs e ) : void
sender object
e KeyEventArgs
return void
        private void textBoxSearch_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
                Close();
            if (!selectFirstitem())
                return;

            if ((e.Control && e.KeyCode == Keys.N) || e.KeyCode == Keys.Enter)
                autoComplete();
            else if (e.Control && e.KeyCode == Keys.Space)
            {
                if (_directoryMode)
                    return;
                e.Handled = true;
                e.SuppressKeyPress = true;
                listWorkingDirectory(e);
            }
            else if (e.KeyCode == Keys.Down)
            {
                if (informationList.SelectedItems[0].Index < informationList.Items.Count - 1)
                    informationList.Items[informationList.SelectedItems[0].Index + 1].Selected = true;
            }
            else if (e.KeyCode == Keys.Up)
            {
                if (informationList.SelectedItems[0].Index != 0)
                    informationList.Items[informationList.SelectedItems[0].Index - 1].Selected = true;
            }
        }