Sends keystroke sequence. Active modifiers are not cancelled after call, which lets to use them
with mouse events.

@param array|int|string $charList
@return $this
@throws WebDriver_Exception
559795
public function keys($charList)
    {
        $this->getDriver()->curl(
            $this->getDriver()->factoryCommand(
                'keys',
                WebDriver_Command::METHOD_POST,
                ['value' => WebDriver_Util::prepareKeyStrokes($charList)]
            )
        );
        return $this;
    }
856527
protected function parseConditionList($conditionList)
    {
        $charset = $this->getCharset();

        $conditions = [];
        foreach (Condition::splitNestedConditions($conditionList) as $normalizedConditionList) {
            $normalizedConditions = [];
            $currentCondition = "";

            if (preg_match('/[^\x00-\x7f]/', $normalizedConditionList)) {
                $isAscii = false;
                $strLen  = mb_strlen($normalizedConditionList, $charset);
                $getAnd  = function($i) use ($normalizedConditionList){return strtolower(substr($normalizedConditionList, $i, 5));};
            } else {
                $isAscii = true;
                $strLen = strlen($normalizedConditionList);
                $getAnd  = function($i) use ($charset, $normalizedConditionList){return mb_strtolower(mb_substr($normalizedConditionList, $i, 5, $charset), $charset);};
            }

            for ($i = 0, $j = $strLen; $i < $j; $i++) {
                if ($isAscii === true) {
                    //$char = substr($normalizedConditionList, $i, 1);
                    $char = $normalizedConditionList[$i];
                } else {
                    $char = mb_substr($normalizedConditionList, $i, 1, $charset);
                }

                if ($char === " " && $getAnd($i) === " and ") {
                    $normalizedConditions[] = new MediaCondition(trim($currentCondition, " \r\n\t\f"));
                    $currentCondition = "";
                    $i += (5 - 1);
                } else {
                    $currentCondition .= $char;
                }
            }
            $currentCondition = trim($currentCondition, " \r\n\t\f");
            if ($currentCondition !== "") {
                $normalizedConditions[] = new MediaCondition(trim($currentCondition, " \r\n\t\f"));
            }

            foreach ($normalizedConditions as $normalizedCondition) {
                $conditions[] = $normalizedCondition;
            }
        }

        return $conditions;
    }
1128462
public function setFromArray($propertyList)
    {
        $validPropertyList = array_intersect_key($propertyList, $this->propertyList);

        $this->propertyList = array_merge($validPropertyList, $this->propertyList);

        return $this;
    }
593092
public function keyUp(WebDriverElement $element = null, $key = null)
    {
        $this->action->addAction(
            new WebDriverKeyUpAction($this->keyboard, $this->mouse, $element, $key)
        );

        return $this;
    }
42831
public function setSettings($settingList = []) {
        if (!$settingList) {
            return;
        }

        if (isset($settingList['persistent'])) {
            $this->setPersistent($settingList['persistent']);
        }

        if (isset($settingList['charset'])) {
            $this->setCharset($settingList['charset']);
        }
    }
593698
public static function trimAsNULL($value, $charlist = NULL, $utf8 = TRUE)
	{
		return static::trim($value, $charlist, $utf8, TRUE);
	}
1286991
public function setType(string $contentType, ?string $charset = null): Response
	{
		$this->contentType = $contentType;

		if($charset !== null)
		{
			$this->charset = $charset;
		}

		return $this;
	}
167412
public function updateList(DataList &$list)
    {
        /** @var DataObject $singleton */
        $singleton = Injector::inst()->get($list->dataClass());
        $locale = $list->dataQuery()->getQueryParam('Fluent.Locale') ?: FluentState::singleton()->getLocale();
        if (!$singleton->hasExtension(FluentExtension::class)
            || !$singleton->hasField('SourceLocale')
            || !$locale
        ) {
            return;
        }

        $locale = FluentState::singleton()->getLocale();

        $query = $list->dataQuery();
        $query->having(['"SourceLocale" = ?' => $locale]);

        $list = $list->setDataQuery($query);
    }
1163088
public static function trim($string, $charlist = '\s\xA0')
    {
        $string = str_replace('&nbsp;', ' ', $string);

        return trim(preg_replace('@^[' . $charlist . ']+(.*)[' . $charlist . ']+$@u', '\\1', $string));
    }
1042806
public function setRemoteHostWhitelist($whitelist = null)
    {
        $this->remoteHostWhitelist = $whitelist;
        $this->log(
            "Setting remote host whitelist to: "
            . (is_null($whitelist) ? "null" : print_r($whitelist, 1))
        );
        return $this;
    }
1331617
protected function getSelectorStrings($selectorList)
    {
        $charset = $this->getCharset();

        $groupsOpened = 0;
        $ignoreGroupOpenCloseChar = false;
        $enclosedChar = null;

        $selectors = [];
        $subSelectorList = "";
        $currentSelectors = [""];
        $currentSelectorKeys = [0];
        $lastChar = null;

        if (preg_match('/[^\x00-\x7f]/', $selectorList)) {
            $isAscii = false;
            $strLen  = mb_strlen($selectorList, $charset);
        } else {
            $isAscii = true;
            $strLen = strlen($selectorList);
        }

        for ($i = 0, $j = $strLen; $i < $j; $i++) {
            if ($isAscii === true) {
                $char = $selectorList[$i];
            } else {
                $char = mb_substr($selectorList, $i, 1, $charset);
            }

            if ($char === "(") {
                if ($groupsOpened > 0) {
                    $subSelectorList .= $char;
                } else {
                    if ($ignoreGroupOpenCloseChar === false) {
                        foreach ($currentSelectorKeys as $index) {
                            $currentSelectors[$index] .= $char;
                        }
                    }
                }
                $groupsOpened++;
            } else if ($char === ")") {
                $groupsOpened--;
                if ($groupsOpened > 0) {
                    $subSelectorList .= $char;
                } else {
                    if ($subSelectorList != "") {
                        $subSelectors = $this->getSelectorStrings($subSelectorList);
                        $newSelectors = [];
                        foreach ($subSelectors as $subSelector) {
                            foreach ($currentSelectors as $currentSelector) {
                                $concat = $lastChar === "(" ? "" : " ";
                                $newSelectors[] = $currentSelector . $concat . $subSelector;
                            }
                        }
                        $currentSelectors = $newSelectors;
                        $currentSelectorKeys = array_keys($currentSelectors);
                    }

                    if ($ignoreGroupOpenCloseChar === false) {
                        foreach ($currentSelectorKeys as $index) {
                            $currentSelectors[$index] .= $char;
                        }
                    } else {
                        $ignoreGroupOpenCloseChar = false;
                    }
                    $subSelectorList = "";
                }
            } else if ($char === ",") {
                if ($groupsOpened > 0) {
                    $subSelectorList .= $char;
                } else {
                    foreach ($currentSelectors as $currentSelector) {
                        $selectors[] = trim($currentSelector, " \r\n\t\f");
                    }
                    $currentSelectors = [""];
                    $currentSelectorKeys = [0];
                }
            } else if ($char === ":") {
                if ($groupsOpened > 0) {
                    $subSelectorList .= $char;
                } else {
                    if ($isAscii === true) {
                        $nextChars = substr($selectorList, $i);
                    } else {
                        $nextChars = mb_substr($selectorList, $i, null, $charset);
                    }
                    $nextChars = strtolower(preg_replace('/^(\:[-a-z]+)[^-a-z]*.*/', '\\1', $nextChars));

                    if ($nextChars === ":matches") {
                        $i += (9 - 2);
                        $ignoreGroupOpenCloseChar = true;
                    } elseif ($nextChars === ":has") {
                        $i += (5 - 2);
                        $ignoreGroupOpenCloseChar = true;
                    } else {
                        foreach ($currentSelectorKeys as $index) {
                            $currentSelectors[$index] .= $char;
                        }
                    }
                }
            } else {
                if ($groupsOpened > 0) {
                    $subSelectorList .= $char;
                } else {
                    foreach ($currentSelectorKeys as $index) {
                        $currentSelectors[$index] .= $char;
                    }
                }
            }

            // Save last char (to avoid costly mb_substr() call)
            $lastChar = $char;
        }
        foreach ($currentSelectors as $currentSelector) {
            $selectors[] = trim($currentSelector, " \r\n\t\f");
        }

        return $selectors;
    }
446225
public FluentWebElement sendKeys(final CharSequence... keysToSend) {

        executeAndWrapReThrowIfNeeded(new SendKeys(keysToSend), Context.singular(context, "sendKeys", null, charSeqArrayAsHumanString(keysToSend)), true);
        return new FluentWebElement(delegate, currentElement, context, monitor, booleanInsteadOfNotFoundException);
    }
786144
public function sendChatActionReply(): SendChatAction
	{
		$m = $this->bot->sendChatAction();
		$this->setReplyMarkup($m, false);
		return $m;
	}
152182
public function write($str)
    {
        if (!is_resource($this->pipes['in'])) {
            throw new Exception_SystemProcessIO("stdin is closed or haven't been opened. Cannot write to process");
        }
        $this->debug('writing '.$str.'+newline into stdin');
        fwrite($this->pipes['in'], $str."\n");
        $this->debugStatus();

        return $this;
    }
913261
public function append($list = null)
    {
        if (is_string($list)) {
            $this->_list[] = $list;
        }

        if (is_array($list)) {
            $this->_list = array_merge($this->_list, $list);
        }

        return $this;
    }
513665
public static function trim(string $s, string $charList = self::TRIM_CHARACTERS): string
    {
        $charList = \preg_quote($charList, '#');

        return static::replace($s, '#^[' . $charList . ']+|[' . $charList . ']+\z#u', '');
    }
1179144
public function keyRevocationList($krl = NULL)
	{
		if($krl == NULL)
			$this->keyRevocationList = array();
		else
			$this->keyRevocationList = $krl;
		
		return $this;
	}