update . I modified the code below to find out more information about keystroke.
update # 2 : I found the root cause of the problem: we have an HTML control (Gecko rendering engine) in our form. When this Gecko rendering engine switches to some kind of Flash control, suddenly ~ 2% of our keystrokes do not pass, even after we removed the Gecko HTML control. Wahoo, I blame it on Flash! Now the question is, how can I fix this?
update # 3 : No, this is not Flash. This is the Gecko rendering engine. Navigation even in Google leads to the fact that some keys do not get directly into our application. Hrmmm.
We have a strange case in our WinForms application where the user presses a key combination ( Alt+ in this case S), and WinForms tells us that the following key combination has been pressed (value 262162):
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if(keyData == (Keys.S | Keys.Alt))
{
Console.WriteLine("You pressed Alt+S");
}
else if(keyData == (Keys.Menu | Keys.Alt))
{
Console.WriteLine("What the hell?");
}
}
90% of the time You pressed Alt+Swill be shown. But in rare cases, we press Alt+ Sand he said: What the hell?.
Any idea what is wrong?
source
share