Sorry for the long title, but I couldn't think of another way to put it.
I have this:
private void textBoxToSubmit_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
buttonSubmit_Click((object)sender, (EventArgs)e);
}
}
... in order to make pressing enter in the text box trigger the "submit" button. However, this also prevents shortcuts from going through. (not quite sure what it has to do with that, maybe only multi-key combos?)
ShortcutsEnabled is set to true.
Thanks in advance!
Can you not use AcceptButton
in for the Forms Properties Window? This sets the default behaviour for the Enter key press, but you are still able to use other shortcuts.