pub enum Physical {
Code(Code),
Unidentified(NativeCode),
}
Expand description
Represents the location of a physical key.
This type is a superset of Code
, including an Unidentified
variant.
Variants§
Code(Code)
A known key code
Unidentified(NativeCode)
This variant is used when the key cannot be translated to a Code
The native keycode is provided (if available) so you’re able to more reliably match
key-press and key-release events by hashing the Physical
key. It is also possible to use
this for keybinds for non-standard keys, but such keybinds are tied to a given platform.
Trait Implementations§
Source§impl Ord for Physical
impl Ord for Physical
Source§impl PartialEq<NativeCode> for Physical
impl PartialEq<NativeCode> for Physical
Source§impl PartialEq<Physical> for NativeCode
impl PartialEq<Physical> for NativeCode
Source§impl PartialOrd for Physical
impl PartialOrd for Physical
impl Copy for Physical
impl Eq for Physical
impl StructuralPartialEq for Physical
Auto Trait Implementations§
impl Freeze for Physical
impl RefUnwindSafe for Physical
impl Send for Physical
impl Sync for Physical
impl Unpin for Physical
impl UnwindSafe for Physical
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
Mutably borrows from an owned value. Read more