aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/keyboardevent.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/keyboardevent.rs')
-rw-r--r--components/script/dom/keyboardevent.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/components/script/dom/keyboardevent.rs b/components/script/dom/keyboardevent.rs
index 707c6b64afe..2d2a2391372 100644
--- a/components/script/dom/keyboardevent.rs
+++ b/components/script/dom/keyboardevent.rs
@@ -15,6 +15,7 @@ use dom::event::Event;
use dom::uievent::UIEvent;
use dom::window::Window;
use dom_struct::dom_struct;
+use msg::constellation_msg;
use msg::constellation_msg::{Key, KeyModifiers};
use std::borrow::Cow;
use std::cell::Cell;
@@ -143,16 +144,16 @@ impl KeyboardEvent {
pub fn get_key_modifiers(&self) -> KeyModifiers {
let mut result = KeyModifiers::empty();
if self.shift.get() {
- result = result | KeyModifiers::SHIFT;
+ result = result | constellation_msg::SHIFT;
}
if self.ctrl.get() {
- result = result | KeyModifiers::CONTROL;
+ result = result | constellation_msg::CONTROL;
}
if self.alt.get() {
- result = result | KeyModifiers::ALT;
+ result = result | constellation_msg::ALT;
}
if self.meta.get() {
- result = result | KeyModifiers::SUPER;
+ result = result | constellation_msg::SUPER;
}
result
}
@@ -164,7 +165,7 @@ pub fn key_value(ch: Option<char>, key: Key, mods: KeyModifiers) -> Cow<'static,
return Cow::from(format!("{}", ch));
}
- let shift = mods.contains(KeyModifiers::SHIFT);
+ let shift = mods.contains(constellation_msg::SHIFT);
Cow::from(match key {
Key::Space => " ",
Key::Apostrophe if shift => "\"",