On Orbital, implement KeyEventExtModifiersSupplement

This also fixes `logical_key` and `text` not reported in `KeyEvent`.
This commit is contained in:
Jeremy Soller 2024-02-08 01:55:11 -07:00 committed by GitHub
parent 20687fef1c
commit fedb86ea5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 81 additions and 31 deletions

View file

@ -4,7 +4,12 @@ use std::fmt::{self, Display, Formatter};
use std::str;
use std::sync::Arc;
use crate::dpi::{PhysicalPosition, PhysicalSize};
use smol_str::SmolStr;
use crate::{
dpi::{PhysicalPosition, PhysicalSize},
keyboard::Key,
};
pub(crate) use self::event_loop::{
EventLoop, EventLoopProxy, EventLoopWindowTarget, OwnedDisplayHandle,
@ -263,5 +268,8 @@ impl VideoModeHandle {
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct KeyEventExtra {}
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub struct KeyEventExtra {
pub key_without_modifiers: Key,
pub text_with_all_modifiers: Option<SmolStr>,
}