I have a List<System.Windows.Forms.Keys>
.
I want to check if all Keys in the list are pressed in a keydown event.
But how?
My method is:
public bool Triggered( string indentifier, KeyEventArgs e )
{
List<Keys> keys = Shortcuts.Keys.First( x => Shortcuts[x].Indentifier == indentifier );
keys.Reverse();
foreach( Keys key in keys )
{
if ( e.KeyCode != key )
return false;
}
return true;
}
Getting the keys works but the check don't.
,ShortcutInfo> and ShortcutInfo is a class with two properties called Indentifier and Desc
– SmoothOS Jun 09 '18 at 11:10