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
keysKeyInfo[]Array of keys.
eKeyEventArgsEvent arguments.
actionActionAction to run.
setHandledboolSpecifies whether to set event arguments Handled property.
Returns
- bool
trueif key is pressed;falseotherwise.
Run(KeyEventArgs, Action?, bool)
Runs action if this key is pressed.
public bool Run(KeyEventArgs e, Action? action = null, bool setHandled = true)
Parameters
eKeyEventArgsEvent arguments.
actionActionAction to run.
setHandledboolSpecifies whether to set event arguments Handled property.
Returns
- bool
trueif key is pressed;falseotherwise.