Associate logical and physical keypresses together to support non-QWERTY keyboards.

This commit is contained in:
Josh Matthews 2016-06-30 04:27:26 -04:00
parent 87c7772527
commit 04ce86c08c
15 changed files with 137 additions and 77 deletions

View file

@ -9,7 +9,7 @@ use dom::bindings::str::DOMString;
use dom::keyboardevent::{KeyboardEvent, key_value};
use msg::constellation_msg::{ALT, CONTROL, SHIFT, SUPER};
use msg::constellation_msg::{Key, KeyModifiers};
use std::borrow::ToOwned;
use std::borrow::{ToOwned, Borrow};
use std::cmp::{max, min};
use std::default::Default;
use std::ops::Range;
@ -510,7 +510,7 @@ impl<T: ClipboardProvider> TextInput<T> {
KeyReaction::DispatchInput
},
_ if is_printable_key(key) => {
self.insert_string(key_value(key, mods));
self.insert_string::<&str>(key_value(None, key, mods).borrow());
KeyReaction::DispatchInput
}
Key::Space => {