I would like to perform some actions when the user presses Ctrl + K
on a textbox.
private void subject_TextBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.K)
MessageBox.Show("!");
}
Nothing happens when I run it.
When I debug I can see that e.Control
is true (this means I pressed Ctrl) but the e.KeyCode
is not equivalent to K.
Any ideas?