pub enum OptionAsAlt {
None,
Left,
Right,
Both,
}Expand description
Which Option keys act as Alt on macOS — what a frame
declares with crate::Ui::option_as_alt. On a Mac, Option composes:
⌥m types “µ”, and ⌥u, ⌥e, ⌥i, ⌥n and ⌥` are dead keys that start
an accent and wait for the next key, so the press never arrives as a
key at all and a keymap that binds <A-u> never hears it. An Option
key named here is Alt instead: it composes nothing, types nothing, and
every key under it arrives as a chord of the key the layout prints
unmodified — what a terminal’s “Option as Meta” and an editor’s Alt
bindings want. None, the default, is the Mac’s own behaviour; one
side leaves the other composing, so a user keeps ü on the right
Option while the left one is Alt. Other platforms have no such
composition on Alt and read nothing here.
Variants§
Implementations§
Source§impl OptionAsAlt
impl OptionAsAlt
Sourcepub const ALL: [OptionAsAlt; 4]
pub const ALL: [OptionAsAlt; 4]
Every value, in the order of the C door’s numbers.
pub fn from_name(s: &str) -> Option<OptionAsAlt>
Sourcepub fn index(self) -> u32
pub fn index(self) -> u32
The C door’s number (KUI_OPTION_AS_ALT_*) and the binary IR’s: 0
none, 1 left, 2 right, 3 both.
Sourcepub fn from_index(index: u32) -> Option<OptionAsAlt>
pub fn from_index(index: u32) -> Option<OptionAsAlt>
The value at index; None past the four, so a door can refuse
what it does not know rather than guess.
Sourcepub fn covers(self, location: KeyLocation) -> bool
pub fn covers(self, location: KeyLocation) -> bool
Whether an Option key at location is Alt under this setting.
Trait Implementations§
Source§impl Clone for OptionAsAlt
impl Clone for OptionAsAlt
Source§fn clone(&self) -> OptionAsAlt
fn clone(&self) -> OptionAsAlt
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 OptionAsAlt
Source§impl Debug for OptionAsAlt
impl Debug for OptionAsAlt
Source§impl Default for OptionAsAlt
impl Default for OptionAsAlt
Source§fn default() -> OptionAsAlt
fn default() -> OptionAsAlt
impl Eq for OptionAsAlt
Source§impl Hash for OptionAsAlt
impl Hash for OptionAsAlt
Source§impl PartialEq for OptionAsAlt
impl PartialEq for OptionAsAlt
impl StructuralPartialEq for OptionAsAlt
Auto Trait Implementations§
impl Freeze for OptionAsAlt
impl RefUnwindSafe for OptionAsAlt
impl Send for OptionAsAlt
impl Sync for OptionAsAlt
impl Unpin for OptionAsAlt
impl UnsafeUnpin for OptionAsAlt
impl UnwindSafe for OptionAsAlt
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.