I'm programming for a CE device with reduced key board, no mouse, and no touch screen. As such, I have to tab from button to button to get the focus on the button i want. Then to invoke the button with focus i have to hit two keys on the key board to send a space in order to "click" the button. I want to just hit one key, the enter key, instead.
So, how do i trap the enter and turn it into a space?
I tried putting the following code in my form class, but it failed to compile saying "no sutable method found to override. Note I have "using System.Windows.Forms at the top and the object browser shows teh ProcessDialogKeys is in there.
Any Ideas?
Here is the code that doesn't work:
protected override bool ProcessDialogKey(Keys keyData)
{
switch (keyData)
{
case Keys.Enter:
case Keys.Space:
return base.ProcessDialogKey(Keys.Space);
}
return base.ProcessDialogKey(keyData);
}