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

eframe: Fix inputting of the letter P on web (#2740)

* eframe: Fix inputting of the letter P on web

* Update changelog

* silence clippy
This commit is contained in:
Emil Ernerfeldt
2023-02-15 08:24:52 +01:00
committed by GitHub
parent 38849fe381
commit e2778d9d6a
2 changed files with 7 additions and 1 deletions

View File

@@ -94,7 +94,12 @@ pub fn install_document_events(runner_container: &mut AppRunnerContainer) -> Res
// egui wants to use tab to move to the next text field.
true
} else if egui_key == Some(Key::P) {
true // Prevent ctrl-P opening the print dialog. Users may want to use it for a command palette.
#[allow(clippy::needless_bool)]
if modifiers.ctrl || modifiers.command || modifiers.mac_cmd {
true // Prevent ctrl-P opening the print dialog. Users may want to use it for a command palette.
} else {
false // let normal P:s through
}
} else if egui_wants_keyboard {
matches!(
event.key().as_str(),