#[repr(transparent)]pub struct SDL_Keymod(pub Uint16);Expand description
Valid key modifiers (possibly OR’d together).
§Availability
This datatype is available since SDL 3.2.0.
§Known values (sdl3-sys)
| Associated constant | Global constant | Description |
|---|---|---|
NONE | SDL_KMOD_NONE | no modifier is applicable. |
LSHIFT | SDL_KMOD_LSHIFT | the left Shift key is down. |
RSHIFT | SDL_KMOD_RSHIFT | the right Shift key is down. |
LEVEL5 | SDL_KMOD_LEVEL5 | the Level 5 Shift key is down. |
LCTRL | SDL_KMOD_LCTRL | the left Ctrl (Control) key is down. |
RCTRL | SDL_KMOD_RCTRL | the right Ctrl (Control) key is down. |
LALT | SDL_KMOD_LALT | the left Alt key is down. |
RALT | SDL_KMOD_RALT | the right Alt key is down. |
LGUI | SDL_KMOD_LGUI | the left GUI key (often the Windows key) is down. |
RGUI | SDL_KMOD_RGUI | the right GUI key (often the Windows key) is down. |
NUM | SDL_KMOD_NUM | the Num Lock key (may be located on an extended keypad) is down. |
CAPS | SDL_KMOD_CAPS | the Caps Lock key is down. |
MODE | SDL_KMOD_MODE | the !AltGr key is down. |
SCROLL | SDL_KMOD_SCROLL | the Scroll Lock key is down. |
CTRL | SDL_KMOD_CTRL | Any Ctrl key is down. |
SHIFT | SDL_KMOD_SHIFT | Any Shift key is down. |
ALT | SDL_KMOD_ALT | Any Alt key is down. |
GUI | SDL_KMOD_GUI | Any GUI key is down. |
Tuple Fields§
§0: Uint16Implementations§
Source§impl SDL_Keymod
impl SDL_Keymod
Trait Implementations§
Source§impl BitAnd for SDL_Keymod
impl BitAnd for SDL_Keymod
Source§impl BitAndAssign for SDL_Keymod
impl BitAndAssign for SDL_Keymod
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOr for SDL_Keymod
impl BitOr for SDL_Keymod
Source§impl BitOrAssign for SDL_Keymod
impl BitOrAssign for SDL_Keymod
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXor for SDL_Keymod
impl BitXor for SDL_Keymod
Source§impl BitXorAssign for SDL_Keymod
impl BitXorAssign for SDL_Keymod
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl Clone for SDL_Keymod
impl Clone for SDL_Keymod
Source§fn clone(&self) -> SDL_Keymod
fn clone(&self) -> SDL_Keymod
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SDL_Keymod
Available on crate feature debug-impls only.
impl Debug for SDL_Keymod
Available on crate feature
debug-impls only.Source§impl Default for SDL_Keymod
impl Default for SDL_Keymod
Source§fn default() -> SDL_Keymod
fn default() -> SDL_Keymod
Returns the “default value” for a type. Read more
Source§impl From<SDL_Keymod> for Uint16
impl From<SDL_Keymod> for Uint16
Source§fn from(value: SDL_Keymod) -> Self
fn from(value: SDL_Keymod) -> Self
Converts to this type from the input type.
Source§impl GroupMetadata for SDL_Keymod
Available on crate feature metadata only.
impl GroupMetadata for SDL_Keymod
Available on crate feature
metadata only.Source§const GROUP_METADATA: &'static Group
const GROUP_METADATA: &'static Group
Metadata for this group
Source§impl Hash for SDL_Keymod
impl Hash for SDL_Keymod
Source§impl Not for SDL_Keymod
impl Not for SDL_Keymod
Source§impl PartialEq<SDL_Keymod> for Uint16
impl PartialEq<SDL_Keymod> for Uint16
Source§impl PartialEq<u16> for SDL_Keymod
impl PartialEq<u16> for SDL_Keymod
Source§impl PartialEq for SDL_Keymod
impl PartialEq for SDL_Keymod
impl Copy for SDL_Keymod
impl Eq for SDL_Keymod
impl StructuralPartialEq for SDL_Keymod
Auto Trait Implementations§
impl Freeze for SDL_Keymod
impl RefUnwindSafe for SDL_Keymod
impl Send for SDL_Keymod
impl Sync for SDL_Keymod
impl Unpin for SDL_Keymod
impl UnwindSafe for SDL_Keymod
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