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:
parent
38849fe381
commit
e2778d9d6a
2 changed files with 7 additions and 1 deletions
|
@ -5,6 +5,7 @@ NOTE: [`egui-winit`](../egui-winit/CHANGELOG.md), [`egui_glium`](../egui_glium/C
|
||||||
|
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
* Fix typing the letter 'P' on web ([#2740](https://github.com/emilk/egui/pull/2740)).
|
||||||
|
|
||||||
|
|
||||||
## 0.21.2 - 2023-02-12
|
## 0.21.2 - 2023-02-12
|
||||||
|
|
|
@ -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.
|
// egui wants to use tab to move to the next text field.
|
||||||
true
|
true
|
||||||
} else if egui_key == Some(Key::P) {
|
} 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 {
|
} else if egui_wants_keyboard {
|
||||||
matches!(
|
matches!(
|
||||||
event.key().as_str(),
|
event.key().as_str(),
|
||||||
|
|
Loading…
Reference in a new issue