Radegast.Rendering.SceneWindow.txtChat_KeyDown C# (CSharp) Method

txtChat_KeyDown() private method

private txtChat_KeyDown ( object sender, KeyEventArgs e ) : void
sender object
e KeyEventArgs
return void
        private void txtChat_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode != Keys.Enter) return;
            e.Handled = e.SuppressKeyPress = true;
            ChatConsole chat = (ChatConsole)Instance.TabConsole.Tabs["chat"].Control;

            if (e.Shift)
                chat.ProcessChatInput(txtChat.Text, ChatType.Whisper);
            else if (e.Control)
                chat.ProcessChatInput(txtChat.Text, ChatType.Shout);
            else
                chat.ProcessChatInput(txtChat.Text, ChatType.Normal);

            txtChat.Text = string.Empty;
        }
SceneWindow