Button acting as Key RRS feed

  • Question

  • Hi,

    I am developing a keyboard for using C#. I want to know how can I make the Backspace button invoke a Backspace, Delete button invoke a Delete, etc...

    Tuesday, June 11, 2013 3:40 PM


All replies

  • Jassim : 

    Are you leveraging windows forms or WPF ?

    if windows forms did you try key up event ?

       private void Form1_KeyUp(object sender, KeyEventArgs e)
                if (e.KeyCode.ToString().ToUpper().Equals("BACK"))
                    //back space key
                    MessageBox.Show("BACK SPACE");
                if (e.KeyCode.ToString().ToUpper().Equals("DELETE"))
                    //delete key

    Tuesday, June 11, 2013 4:22 PM
  • not like this.

    I have a btnDelete and btnBackspace and if user clicked on the button then the btnBackspace_Click or btnDelete _Click should invoke the Backspace and Delete keys.

    Tuesday, June 11, 2013 8:43 PM
  • See if the example at bottom of this page answers your question?

    Tuesday, June 11, 2013 9:04 PM
  • SendKeys.Send("{DELETE}");



    • Marked as answer by Jassim Rahma Tuesday, June 11, 2013 9:10 PM
    Tuesday, June 11, 2013 9:09 PM