It is necessary when pressing the button. (Del) on the numeric keypad, go to the next text field. I found similar solutions, but nowhere can I find the name of this key to substitute in e.KeyData == Keys. ???

Thank you in advance!

  • There are hacking zamorochki on the clavs, but here it is enough to make SetFocus right element. - nick_n_a
  • one
    Keys.Decimal when NumLock , Keys.Del when off. When NumLock turned off, the digital unit simply duplicates the corresponding keys and cannot be distinguished, except at the driver level, and I’m not sure. - rdorn

1 answer 1

If the task is worth it - press the Tab button (and change the focus to another control)

(Examples with TextBox)

 private void textBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { if (e.KeyCode == Keys.Delete) SendKeys.Send("\t"); } 

If the task is worth - get the Tab character itself (i.e. \ t) in the same TextBox

 private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if(e.KeyChar == (char)Keys.Delete) e.KeyChar = (char)Keys.Tab; } 

PS You can use Claudia hooks, but these are already drastic measures for such a task.

  • PPS I am writing from the laptop, there is no other thing to do, in angiology I think you will climb. Keys Keys Keeps "Keys" - Opossum