public static function prepareKeyStrokes($charList)
    {
        $keyStrokes = [];
        foreach ((array) $charList as $char) {
            if (is_int($char)) {
                // treat int as 16-bit little-endian Unicode
                if (false === $symbol = iconv('UTF-16LE', 'UTF-8', pack('v', $char))) {
                    throw new WebDriver_UtilException("Invalid Unicode symbol: U+" . strtoupper(dechex($char)));
                }
                $keyStrokes[] = $symbol;
            } else {
                $keyStrokes[] = (string) $char;
            }
        }
        if (empty($keyStrokes)) {
            throw new WebDriver_UtilException("No keystrokes to send");
        }
        return $keyStrokes;
    }