mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Associate logical and physical keypresses together to support non-QWERTY keyboards.
This commit is contained in:
parent
87c7772527
commit
04ce86c08c
15 changed files with 137 additions and 77 deletions
|
@ -76,7 +76,7 @@ pub enum WindowEvent {
|
|||
/// Sent when the user quits the application
|
||||
Quit,
|
||||
/// Sent when a key input state changes
|
||||
KeyEvent(Key, KeyState, KeyModifiers),
|
||||
KeyEvent(Option<char>, Key, KeyState, KeyModifiers),
|
||||
/// Sent when Ctr+R/Apple+R is called to reload the current page.
|
||||
Reload,
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ pub trait WindowMethods {
|
|||
fn set_cursor(&self, cursor: Cursor);
|
||||
|
||||
/// Process a key event.
|
||||
fn handle_key(&self, key: Key, mods: KeyModifiers);
|
||||
fn handle_key(&self, ch: Option<char>, key: Key, mods: KeyModifiers);
|
||||
|
||||
/// Does this window support a clipboard
|
||||
fn supports_clipboard(&self) -> bool;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue