Input: Fixed issues when using the F10 key in shortcuts

This commit is contained in:
Sour 2019-10-14 17:45:27 -04:00
parent 589855e00b
commit 25a0bb8b67

View file

@ -39,6 +39,13 @@ namespace Mesen.GUI.Forms
{ {
bool processed = false; bool processed = false;
OnProcessCmdKey?.Invoke(keyData, ref processed); OnProcessCmdKey?.Invoke(keyData, ref processed);
if(keyData == Keys.F10 || keyData == (Keys.F10 | Keys.Shift)) {
//Prevent default Windows behavior on F10 / Shift+F10 presses, which causes issues
//such as the Shift key not being processed as being released, etc.
return true;
}
return processed || base.ProcessCmdKey(ref msg, keyData); return processed || base.ProcessCmdKey(ref msg, keyData);
} }