我必须遵循代码capture keys pressed:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
const int WM_KEYDOWN = 0x100;
const int WM_SYSKEYDOWN = 0x104;
if ((msg.Msg == WM_KEYDOWN) || (msg.Msg == WM_SYSKEYDOWN))
{
int x;
switch (keyData)
{
case (Keys)131149: //case Keys.Control | Keys.M:
x = 1;
break;
case Keys.Alt | Keys.Z:
x = 2;
break;
case Keys.Shift | Keys.A:
x = 3;
break;
case (Keys)196685: //Keys.Control | Keys.Shift | Keys.M:
x = 1;
break;
}
}
return base.ProcessCmdKey(ref msg, keyData);
}
可以看到组合键Ctrl+ Shift+ M==196685.
有没有办法让我计算代码中的其他组合?
例如:Alt+ F== ? ETC...