Show / Hide Table of Contents

Enum TKFlags

Flags of hotkey triggers.

[Flags]
public enum TKFlags

Namespace: Au.Triggers
Assembly: Au.dll

Fields

Name Description
ExtendedNo

The key must not be an "extended key". See KKeyScan example code. Don't use this flag with NumpadX flags.

ExtendedYes

The key must be an "extended key". See KKeyScan example code. Don't use this flag with NumpadX flags.

KeyModUp

Run the action when the key and modifier keys are released.

LeftMod

The trigger works only with left-side modifier keys.

NoModOff

Don't release modifier keys. Without this flag, for example if trigger is ["Ctrl+K"], when the user presses Ctrl and K down, the trigger sends Ctrl key-up event, making the key logically released, although it is still physically pressed. Then modifier keys don't interfere with the action. However functions like keys.getMod and keys.waitForKey (and any such functions in any app) will not know that the key is physically pressed; there is no API to get physical key state. Other flags that prevent releasing modifier keys: KeyUp, ShareEvent. Then don't need this flag.

note

Unreleased modifier keys will interfere with mouse functions like mouse.click. Will not interfere with keyboard and clipboard functions of this library, because they release modifier keys, unless opt.key.NoModOff is true. Will not interfere with functions that send text, unless opt.key.NoModOff is true and opt.key.TextHow is OKeyText.KeysX.

Numpad

The trigger works only with the key that is on the numeric keypad. This flag can be used with Enter, Home, End, PgUp, PgDown, arrows, Ins and Del.

NumpadNot

The trigger works only with the key that is not on the numeric keypad. This flag can be used with Enter, Home, End, PgUp, PgDown, arrows, Ins and Del.

RightMod

The trigger works only with right-side modifier keys.

ShareEvent

Allow other apps to receive the key down message too. Without this flag, other apps usually receive only modifier keys. Also, OS always receives Ctrl+Alt+Delete and some other hotkeys. To receive and block key messages is used a low-level hook. Other hooks may receive blocked messages or not, depending on when they were set.

Extension Methods

ExtMisc.HasAny<TKFlags>(TKFlags, TKFlags)
ExtMisc.Has<TKFlags>(TKFlags, TKFlags)
ExtMisc.SetFlag<TKFlags>(ref TKFlags, TKFlags, bool)