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

@ -282,7 +282,7 @@ pub enum CompositorEvent {
/// Touchpad pressure event
TouchpadPressureEvent(Point2D<f32>, f32, TouchpadPressurePhase),
/// A key was pressed.
KeyEvent(Key, KeyState, KeyModifiers),
KeyEvent(Key, KeyState, KeyModifiers, Option<char>),
}
/// Touchpad pressure phase for TouchpadPressureEvent.
@ -586,7 +586,7 @@ pub enum ConstellationMsg {
/// Query the constellation to see if the current compositor output is stable
IsReadyToSaveImage(HashMap<PipelineId, Epoch>),
/// Inform the constellation of a key event.
KeyEvent(Key, KeyState, KeyModifiers),
KeyEvent(Option<char>, Key, KeyState, KeyModifiers),
/// Request to load a page.
LoadUrl(PipelineId, LoadData),
/// Request to navigate a frame.

View file

@ -103,7 +103,7 @@ pub enum ScriptMsg {
/// https://html.spec.whatwg.org/multipage/#document.title
SetTitle(PipelineId, Option<String>),
/// Send a key event
SendKeyEvent(Key, KeyState, KeyModifiers),
SendKeyEvent(Key, KeyState, KeyModifiers, Option<char>),
/// Get Window Informations size and position
GetClientWindow(IpcSender<(Size2D<u32>, Point2D<i32>)>),
/// Move the window to a point