mirror of
https://github.com/servo/servo.git
synced 2025-06-10 17:43:16 +00:00
Pass all key events to the current constellation frame.
This commit is contained in:
parent
c5e1b0d32e
commit
1c64dabb15
7 changed files with 304 additions and 9 deletions
|
@ -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 => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue