aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2014-10-02 03:11:50 -0400
committerJosh Matthews <josh@joshmatthews.net>2014-11-13 11:24:14 -0500
commit1c64dabb150da4152957b2c6e16f30d5201328e1 (patch)
tree49d29180fe6e536ec817432acc11fb210de00199 /components/script
parentc5e1b0d32e17fad29799023c85e2e73ac89c3af7 (diff)
downloadservo-1c64dabb150da4152957b2c6e16f30d5201328e1.tar.gz
servo-1c64dabb150da4152957b2c6e16f30d5201328e1.zip
Pass all key events to the current constellation frame.
Diffstat (limited to 'components/script')
-rw-r--r--components/script/script_task.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index c6f4b636d50..31f3abb289c 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -42,7 +42,7 @@ use script_traits::{CompositorEvent, ResizeEvent, ReflowEvent, ClickEvent, Mouse
use script_traits::{MouseMoveEvent, MouseUpEvent, ConstellationControlMsg, ScriptTaskFactory};
use script_traits::{ResizeMsg, AttachLayoutMsg, LoadMsg, ViewportMsg, SendEventMsg};
use script_traits::{ResizeInactiveMsg, ExitPipelineMsg, NewLayoutInfo, OpaqueScriptLayoutChannel};
-use script_traits::{ScriptControlChan, ReflowCompleteMsg, UntrustedNodeAddress};
+use script_traits::{ScriptControlChan, ReflowCompleteMsg, UntrustedNodeAddress, KeyEvent};
use servo_msg::compositor_msg::{FinishedLoading, LayerId, Loading};
use servo_msg::compositor_msg::{ScriptListener};
use servo_msg::constellation_msg::{ConstellationChan, LoadCompleteMsg, LoadUrlMsg, NavigationDirection};
@@ -907,6 +907,10 @@ impl ScriptTask {
MouseMoveEvent(point) => {
self.handle_mouse_move_event(pipeline_id, point);
}
+
+ KeyEvent(key, state) => {
+ println!("key {} is {}", key as int, state as int);
+ }
}
}
@@ -1093,7 +1097,7 @@ impl ScriptTask {
}
None => {}
- }
+ }
}
}