Learn R Programming

selenium (version 0.1.4)

key_chord: Combine special keys

Description

When a chord of keys is passed into WebElement$send_keys(), all keys will be pressed in order, and then released at the end. This is simply done by combining the keys into a single string, and appending the NULL key (keys$null) to the end. This is useful for keybindings like Ctrl-V, where you want the Ctrl key to be released after the action.

Usage

key_chord(...)

Value

A string.

Arguments

...

The keys to be combined (strings).

Examples

Run this code
# `Ctrl-V` will be pressed, then `Ctrl-Alt-V`
paste0(
  keys$control, "v",
  keys$alt, "v"
)

# `Ctrl-V` will be pressed, then `Alt-V`
paste0(
  key_chord(keys$control, "v"),
  key_chord(keys$alt, "v")
)

Run the code above in your browser using DataLab