Show / Hide Table of Contents

Method elm.SendKeys


Overload

Makes this UI element focused (elm.Focus) and calls keys.send.

public void SendKeys(params KKeysEtc[] keysEtc)
Parameters
keysEtc  (KKeysEtc[])

Arguments of these types:

  • string - keys. Key names separated by spaces or operators, like "Enter A Ctrl+A".
    Tool: in "" string press Ctrl+Space.
  • string with prefix "!" - literal text.
    Example: var p = "pass"; keys.send("!user", "Tab", "!" + p, "Enter");
  • string with prefix "%" - HTML to paste. Full or fragment.
  • clipboardData - clipboard data to paste.
  • KKey - a single key.
    Example: keys.send("Shift+", KKey.Left, "*3"); is the same as keys.send("Shift+Left*3");
  • int - sleep milliseconds. Max 10000.
    Example: keys.send("Left", 500, "Right");
  • System.Action - callback function.
    Example: Action click = () => mouse.click(); keys.send("Shift+", click);
  • KKeyScan - a single key, specified using scan code and/or virtual-key code and extended-key flag.
    Example: keys.send(new KKeyScan(0x3B, false)); //key F1
    Example: keys.send(new KKeyScan(KKey.Enter, true)); //numpad Enter
  • char - a single character. Like text with OKeyText.KeysOrChar or operator ^.
Exceptions
Exception

Exceptions of elm.Focus and keys.send.