Show / Hide Table of Contents

Class OKey

Options for functions of class keys. Some options also are used with clipboard functions that send keys (Ctrl+V etc).

public sealed class OKey
Examples
opt.key.KeySpeed = 50;

Set options for trigger actions.

Triggers.Options.BeforeAction = o => { opt.key.KeySpeed = 50; };

Namespace: Au.Types
Assembly: Au.dll
Inheritance
object
OKey

Constructors

Name Description
OKey(OKey)

Initializes this instance with default values or values copied from another instance.

Properties

Name Description
Hook

Callback function that can modify options of "send keys or text" functions depending on active window etc. Default: null.

KeySpeed

How long to wait (milliseconds) between pressing and releasing each key. Used by keys.send and similar functions, except for "!text" arguments. Default: 2.

KeySpeedClipboard

How long to wait (milliseconds) between sending clipboard copy/paste keys. For example, when sending Ctrl+V, waits after Ctrl-down and after V-down. Default: 5.

NoBlockInput

While sending or pasting keys or text, don't block user-pressed keys. Default: false.

NoCapsOff

When starting to send keys or text, don't turn off CapsLock. Default: false.

NoModOff

When starting to send keys or text, don't release modifier keys. Default: false.

PasteLength

To send text use clipboard (like with OKeyText.Paste) if text length is >= this value. Default: 200.

PasteSleep

How long to wait (milliseconds) after pasting (before restoring clipboard data, if need). Default: 100.

PasteWorkaround

When pasting text that ends with space, tab or/and newline characters, remove them and after pasting send them as keys. Default: false.

RestoreClipboard

Whether to restore clipboard data when copying or pasting text. Default: true. By default restores only text. See also OKey.RestoreClipboardAllFormats, OKey.RestoreClipboardExceptFormats.

RestoreClipboardAllFormats

When copying or pasting text, restore clipboard data of all formats that are possible to restore. Default: false - restore only text.

RestoreClipboardExceptFormats

When copying or pasting text, and OKey.RestoreClipboardAllFormats is true, do not restore clipboard data of these formats. Default: null.

SleepFinally

How long to wait (milliseconds) before a "send keys or text" function returns. Default: 10.

TextHow

How to send text to the active window (keys, characters or clipboard). Default: OKeyText.Characters.

TextShiftEnter

When sending text, instead of Enter send Shift+Enter. Default: false.

TextSpeed

How long to wait (milliseconds) between pressing and releasing each character key. Used by keys.sendt. Also by keys.send and similar functions for "!text" arguments. Default: 0.

Methods

Name Description
PrintClipboard()

Writes to the output some info about current clipboard data.

ToString()

See Also

opt.key