1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

Add Event::Key::repeat that is set to true if the event is a repeat (#2435)

* Add `Event::Key::repeat` that is set to `true` if the event is a repeat

* Update changelog

* Improve docstring
This commit is contained in:
Emil Ernerfeldt
2022-12-12 15:37:42 +01:00
committed by GitHub
parent cb77458f70
commit 7a658e3ddb
7 changed files with 29 additions and 10 deletions

View File

@@ -69,6 +69,7 @@ pub fn install_document_events(runner_container: &mut AppRunnerContainer) -> Res
runner_lock.input.raw.events.push(egui::Event::Key {
key,
pressed: true,
repeat: false, // egui will fill this in for us!
modifiers,
});
}
@@ -125,6 +126,7 @@ pub fn install_document_events(runner_container: &mut AppRunnerContainer) -> Res
runner_lock.input.raw.events.push(egui::Event::Key {
key,
pressed: false,
repeat: false,
modifiers,
});
}