Method Run
Run(KeyInfo[], KeyEventArgs, Action?, bool)
Runs action if any of the keys is pressed.
public static bool Run(KeyInfo[] keys, KeyEventArgs e, Action? action = null, bool setHandled = true)
Parameters
keys
KeyInfo[]Array of keys.
e
KeyEventArgsEvent arguments.
action
ActionAction to run.
setHandled
boolSpecifies whether to set event arguments Handled property.
Returns
- bool
true
if key is pressed;false
otherwise.
Run(KeyEventArgs, Action?, bool)
Runs action if this key is pressed.
public bool Run(KeyEventArgs e, Action? action = null, bool setHandled = true)
Parameters
e
KeyEventArgsEvent arguments.
action
ActionAction to run.
setHandled
boolSpecifies whether to set event arguments Handled property.
Returns
- bool
true
if key is pressed;false
otherwise.