diff --git a/crates/eframe/CHANGELOG.md b/crates/eframe/CHANGELOG.md index 624f8e9697a..164b16d706e 100644 --- a/crates/eframe/CHANGELOG.md +++ b/crates/eframe/CHANGELOG.md @@ -5,6 +5,7 @@ NOTE: [`egui-winit`](../egui-winit/CHANGELOG.md), [`egui_glium`](../egui_glium/C ## Unreleased +* Fix typing the letter 'P' on web ([#2740](https://github.com/emilk/egui/pull/2740)). ## 0.21.2 - 2023-02-12 diff --git a/crates/eframe/src/web/events.rs b/crates/eframe/src/web/events.rs index 4d49196d628..d85adaa3a5e 100644 --- a/crates/eframe/src/web/events.rs +++ b/crates/eframe/src/web/events.rs @@ -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(),