Show / Hide Table of Contents

Property HotkeyTriggers.this(+ 1 overload)


Overload

Adds a hotkey trigger.

public Action<HotkeyTriggerArgs> this[string hotkey, TKFlags flags = 0, string f_ = null, int l_ = 0] { set; }
Parameters
hotkey  (string)

A hotkey, like with keys.send. Can contain 0 to 4 modifier keys (Ctrl, Shift, Alt, Win) and 1 non-modifier key. Examples: "F11", "Ctrl+K", "Ctrl+Shift+Alt+Win+A". To ignore modifiers: "?+K". Then the trigger works with any combination of modifiers. To ignore a modifier: "Ctrl?+K". Then the trigger works with or without the modifier. More examples: "Ctrl?+Shift?+K", "Ctrl+Shift?+K".

flags  (TKFlags)
f_  (string)

Caller info parameter

l_  (int)

Caller info parameter

Exceptions
ArgumentException

Invalid hotkey string or flags.

InvalidOperationException

Cannot add triggers after ActionTriggers.Run was called, until it returns.

Property Value
Action<HotkeyTriggerArgs>

Examples

See ActionTriggers.


Overload(top)

Adds a hotkey trigger.

public Action<HotkeyTriggerArgs> this[KKey key, string modKeys, TKFlags flags = 0, string f_ = null, int l_ = 0] { set; }
Parameters
key  (KKey)
modKeys  (string)

Modifier keys, like with keys.send. Examples: "Ctrl", "Ctrl+Shift+Alt+Win". To ignore modifiers: "?". Then the trigger works with any combination of modifiers. To ignore a modifier: "Ctrl?". Then the trigger works with or without the modifier. More examples: "Ctrl?+Shift?", "Ctrl+Shift?".

flags  (TKFlags)
f_  (string)

Caller info parameter

l_  (int)

Caller info parameter

Exceptions
ArgumentException

Invalid modKeys string or flags.

InvalidOperationException

Cannot add triggers after ActionTriggers.Run was called, until it returns.

Property Value
Action<HotkeyTriggerArgs>