pub struct KeyReportGate { /* private fields */ }Expand description
Reports each key to the platform’s assistive technology before the application acts on it, and says which keys the application must not see. See the module documentation.
Implementations§
Source§impl KeyReportGate
impl KeyReportGate
Sourcepub fn for_platform() -> Self
pub fn for_platform() -> Self
The gate for this platform. It starts nothing until an assistive technology is attached; on Windows and macOS it never reports.
Sourcepub fn warm_up(&mut self)
pub fn warm_up(&mut self)
Start the platform’s reporter now, so that it is connected before the first key. Call it once an assistive technology is attached; it does nothing after the first call.
Sourcepub fn filter(
&mut self,
key: &KeyInput<'_>,
keyboard: KeyboardState,
target: KeyTarget,
) -> KeyDisposition
pub fn filter( &mut self, key: &KeyInput<'_>, keyboard: KeyboardState, target: KeyTarget, ) -> KeyDisposition
Report key if an assistive technology is attached where it lands
(target), and say whether the application gets it.
A press is dropped when a listener took it. A release goes where the presses of its hold went, whatever anyone says about the release, and whether or not a reader is still attached: it is delivered when any press of the hold was (the first press, or a repeat), so the application sees a key come up exactly when it saw it go down. A new press, as opposed to a repeat, starts a new hold. A synthetic event is neither reported nor dropped.
Trait Implementations§
Source§impl Debug for KeyReportGate
impl Debug for KeyReportGate
Auto Trait Implementations§
impl !RefUnwindSafe for KeyReportGate
impl !Send for KeyReportGate
impl !Sync for KeyReportGate
impl !UnwindSafe for KeyReportGate
impl Freeze for KeyReportGate
impl Unpin for KeyReportGate
impl UnsafeUnpin for KeyReportGate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.