pub enum LayoutScript {
Latin,
NonLatin,
}Expand description
Which alphabet the layout a press was typed on writes, as the platform answers it: what decides whose ASCII a keymap matches.
A Latin layout’s ASCII is the label on the key — AZERTY’s & on the
key US-QWERTY prints 1, German’s - on its / — and a keymap matches
it. A non-Latin layout’s ASCII is incidental: macOS’s Russian puts ]
on the key US-QWERTY prints `, " on ⇧2 and : on ⇧5, Windows’
Russian . on /, and the user reaching for ` there means the
key, as the letters beside it mean theirs. So on a non-Latin layout
every key reads as US-QWERTY prints it, punctuation and digits
included — macOS’s own rule for a ⌘ shortcut, which it resolves
through the ASCII-capable layout whenever the current one is not.
Latin is also what a driver says when it cannot ask: each key is
then judged by itself, and only one the layout put no ASCII on falls
back (see KeyPress::from_layout).
Variants§
Implementations§
Source§impl LayoutScript
impl LayoutScript
Trait Implementations§
Source§impl Clone for LayoutScript
impl Clone for LayoutScript
Source§fn clone(&self) -> LayoutScript
fn clone(&self) -> LayoutScript
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LayoutScript
Source§impl Debug for LayoutScript
impl Debug for LayoutScript
Source§impl Default for LayoutScript
impl Default for LayoutScript
Source§fn default() -> LayoutScript
fn default() -> LayoutScript
impl Eq for LayoutScript
Source§impl Hash for LayoutScript
impl Hash for LayoutScript
Source§impl PartialEq for LayoutScript
impl PartialEq for LayoutScript
impl StructuralPartialEq for LayoutScript
Auto Trait Implementations§
impl Freeze for LayoutScript
impl RefUnwindSafe for LayoutScript
impl Send for LayoutScript
impl Sync for LayoutScript
impl Unpin for LayoutScript
impl UnsafeUnpin for LayoutScript
impl UnwindSafe for LayoutScript
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
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
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.