#[repr(C)]pub struct Keystroke {
pub virtual_key: VK,
pub unicode: u16,
pub flags: KeystrokeFlags,
pub user_index: u8,
pub hid_code: u8,
}Expand description
[microsoft.com] XINPUT_KEYSTROKE
Describes a gamepad-provided keystroke.
Fields§
§virtual_key: VKVirtual key code of the key/button/stick movement.
unicode: u16Documented as being unused?
flags: KeystrokeFlags§user_index: u8Index of the signed-in gamer associated with the device. Can be a value in the range 0–3.
hid_code: u8HID code corresponding to the input. If there is no corresponding HID code, this value is zero.
Implementations§
Trait Implementations§
Source§impl AsMut<Keystroke> for XINPUT_KEYSTROKE
Available on crate feature winapi-0-3 only.
impl AsMut<Keystroke> for XINPUT_KEYSTROKE
Available on crate feature
winapi-0-3 only.Source§impl AsMut<XINPUT_KEYSTROKE> for Keystroke
Available on crate feature winapi-0-3 only.
impl AsMut<XINPUT_KEYSTROKE> for Keystroke
Available on crate feature
winapi-0-3 only.Source§fn as_mut(&mut self) -> &mut XINPUT_KEYSTROKE
fn as_mut(&mut self) -> &mut XINPUT_KEYSTROKE
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<Keystroke> for XINPUT_KEYSTROKE
Available on crate feature winapi-0-3 only.
impl AsRef<Keystroke> for XINPUT_KEYSTROKE
Available on crate feature
winapi-0-3 only.Source§impl AsRef<XINPUT_KEYSTROKE> for Keystroke
Available on crate feature winapi-0-3 only.
impl AsRef<XINPUT_KEYSTROKE> for Keystroke
Available on crate feature
winapi-0-3 only.Source§fn as_ref(&self) -> &XINPUT_KEYSTROKE
fn as_ref(&self) -> &XINPUT_KEYSTROKE
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl From<Keystroke> for XINPUT_KEYSTROKE
Available on crate feature winapi-0-3 only.
impl From<Keystroke> for XINPUT_KEYSTROKE
Available on crate feature
winapi-0-3 only.Source§impl From<XINPUT_KEYSTROKE> for Keystroke
Available on crate feature winapi-0-3 only.
impl From<XINPUT_KEYSTROKE> for Keystroke
Available on crate feature
winapi-0-3 only.Source§fn from(value: XINPUT_KEYSTROKE) -> Self
fn from(value: XINPUT_KEYSTROKE) -> Self
Converts to this type from the input type.
impl Copy for Keystroke
impl Pod for Keystroke
Auto Trait Implementations§
impl Freeze for Keystroke
impl RefUnwindSafe for Keystroke
impl Send for Keystroke
impl Sync for Keystroke
impl Unpin for Keystroke
impl UnwindSafe for Keystroke
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.