pub enum TakenKey {
Swallowed,
Committed,
Substituted(String),
}Expand description
What the platform’s input method made of a key press, when it did not
hand the key back as it was, as key_taken_by_input_method answers.
Variants§
Swallowed
It had the key and did nothing with it: the press-and-hold accent popup taking a repeat of the held letter, or the key that picks an accent. The key still counts, for shortcuts and navigation; its text is not typed.
Committed
It answered the key with a commit of its own and handed nothing back: 2-Set Korean answering Space with nothing composed by marking a space and committing it. The press is the input method’s, as the key that ends a composition is, which winit does not report: it reaches no widget, and its text is not typed a second time.
Substituted(String)
It typed the key, with nothing composed, as this text rather than the key’s own characters: Kotoeri’s full-width space (U+3000) for Space, Pinyin’s “;” for “;”. The key goes on with this text in place of the characters winit reports for it.
Trait Implementations§
impl Eq for TakenKey
impl StructuralPartialEq for TakenKey
Auto Trait Implementations§
impl Freeze for TakenKey
impl RefUnwindSafe for TakenKey
impl Send for TakenKey
impl Sync for TakenKey
impl Unpin for TakenKey
impl UnsafeUnpin for TakenKey
impl UnwindSafe for TakenKey
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.