[−][src]Enum sdl2_sys::SDL_Scancode
\brief The SDL keyboard scancode representation.
Values of this type are used to represent keyboard keys, among other places in the \link SDL_Keysym::scancode key.keysym.scancode \endlink field of the SDL_Event structure.
The values in this enumeration are based on the USB usage page standard: http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
Variants
< Located at the lower left of the return key on ISO keyboards and at the right end of the QWERTY row on ANSI keyboards. Produces REVERSE SOLIDUS (backslash) and VERTICAL LINE in a US layout, REVERSE SOLIDUS and VERTICAL LINE in a UK Mac layout, NUMBER SIGN and TILDE in a UK Windows layout, DOLLAR SIGN and POUND SIGN in a Swiss German layout, NUMBER SIGN and APOSTROPHE in a German layout, GRAVE ACCENT and POUND SIGN in a French Mac layout, and ASTERISK and MICRO SIGN in a French Windows layout.
< ISO USB keyboards actually use this code instead of 49 for the same key, but all OSes I've seen treat the two codes identically. So, as an implementor, unless your keyboard generates both of those codes and your OS treats them differently, you should generate SDL_SCANCODE_BACKSLASH instead of this code. As a user, you should not rely on this code because SDL will never generate it with most (all?) keyboards.
< Located in the top left corner (on both ANSI and ISO keyboards). Produces GRAVE ACCENT and TILDE in a US Windows layout and in US and UK Mac layouts on ANSI keyboards, GRAVE ACCENT and NOT SIGN in a UK Windows layout, SECTION SIGN and PLUS-MINUS SIGN in US and UK Mac layouts on ISO keyboards, SECTION SIGN and DEGREE SIGN in a Swiss German layout (Mac: only on ISO keyboards), CIRCUMFLEX ACCENT and DEGREE SIGN in a German layout (Mac: only on ISO keyboards), SUPERSCRIPT TWO and TILDE in a French Windows layout, COMMERCIAL AT and NUMBER SIGN in a French Mac layout on ISO keyboards, and LESS-THAN SIGN and GREATER-THAN SIGN in a Swiss German, German, or French Mac layout on ANSI keyboards.
< insert on PC, help on some Mac keyboards (but does send code 73, not 117)
< num lock on PC, clear on Mac keyboards
< This is the additional key that ISO keyboards have over ANSI ones, located between left shift and Y. Produces GRAVE ACCENT and TILDE in a US or UK Mac layout, REVERSE SOLIDUS (backslash) and VERTICAL LINE in a US or UK Windows layout, and LESS-THAN SIGN and GREATER-THAN SIGN in a Swiss German, German, or French layout.
< windows contextual menu, compose
< The USB document says this is a status flag, not a physical key - but some Mac keyboards do have a power key.
< redo
< used on Asian keyboards, see footnotes in USB doc
< Yen
< Hangul/English toggle
< Hanja conversion
< Katakana
< Hiragana
< Zenkaku/Hankaku
< reserved
< reserved
< reserved
< reserved
< Erase-Eaze
< alt, option
< windows, command (apple), meta
< alt gr, option
< windows, command (apple), meta
< I'm not sure if this is really not covered by any of the above, but since there's a special KMOD_MODE for it I'm adding it here
< display mirroring/dual display switch, video mode switch
< not a key, just marks the number of scancodes for array bounds
Trait Implementations
impl Clone for SDL_Scancode
[src]
fn clone(&self) -> SDL_Scancode
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for SDL_Scancode
[src]
impl Debug for SDL_Scancode
[src]
impl Eq for SDL_Scancode
[src]
impl Hash for SDL_Scancode
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<SDL_Scancode> for SDL_Scancode
[src]
fn eq(&self, other: &SDL_Scancode) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for SDL_Scancode
[src]
impl StructuralPartialEq for SDL_Scancode
[src]
Auto Trait Implementations
impl RefUnwindSafe for SDL_Scancode
impl Send for SDL_Scancode
impl Sync for SDL_Scancode
impl Unpin for SDL_Scancode
impl UnwindSafe for SDL_Scancode
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,