mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update webdriver dependency.
This commit is contained in:
parent
8761f53391
commit
babefa4cae
5 changed files with 50 additions and 25 deletions
|
@ -168,11 +168,11 @@ fn key_from_char(key_string: &char) -> Option<(Key, bool)> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn keycodes_to_keys(key_codes: &[char]) -> Result<Vec<(Key, KeyModifiers, KeyState)>, String> {
|
||||
pub fn keycodes_to_keys(key_codes: &str) -> Result<Vec<(Key, KeyModifiers, KeyState)>, String> {
|
||||
let mut rv = vec![];
|
||||
|
||||
for char_code in key_codes.iter() {
|
||||
let (key, with_shift) = key_from_char(char_code).ok_or(format!("Unsupported character code {}", char_code))?;
|
||||
for char_code in key_codes.chars() {
|
||||
let (key, with_shift) = key_from_char(&char_code).ok_or(format!("Unsupported character code {}", char_code))?;
|
||||
let modifiers = if with_shift {
|
||||
KeyModifiers::SHIFT
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue