Enum embedded_graphics_simulator::sdl2::Keycode

source ·
#[repr(i32)]
pub enum Keycode {
Show 235 variants Backspace = 8, Tab = 9, Return = 13, Escape = 27, Space = 32, Exclaim = 33, Quotedbl = 34, Hash = 35, Dollar = 36, Percent = 37, Ampersand = 38, Quote = 39, LeftParen = 40, RightParen = 41, Asterisk = 42, Plus = 43, Comma = 44, Minus = 45, Period = 46, Slash = 47, Num0 = 48, Num1 = 49, Num2 = 50, Num3 = 51, Num4 = 52, Num5 = 53, Num6 = 54, Num7 = 55, Num8 = 56, Num9 = 57, Colon = 58, Semicolon = 59, Less = 60, Equals = 61, Greater = 62, Question = 63, At = 64, LeftBracket = 91, Backslash = 92, RightBracket = 93, Caret = 94, Underscore = 95, Backquote = 96, A = 97, B = 98, C = 99, D = 100, E = 101, F = 102, G = 103, H = 104, I = 105, J = 106, K = 107, L = 108, M = 109, N = 110, O = 111, P = 112, Q = 113, R = 114, S = 115, T = 116, U = 117, V = 118, W = 119, X = 120, Y = 121, Z = 122, Delete = 127, CapsLock = 1_073_741_881, F1 = 1_073_741_882, F2 = 1_073_741_883, F3 = 1_073_741_884, F4 = 1_073_741_885, F5 = 1_073_741_886, F6 = 1_073_741_887, F7 = 1_073_741_888, F8 = 1_073_741_889, F9 = 1_073_741_890, F10 = 1_073_741_891, F11 = 1_073_741_892, F12 = 1_073_741_893, PrintScreen = 1_073_741_894, ScrollLock = 1_073_741_895, Pause = 1_073_741_896, Insert = 1_073_741_897, Home = 1_073_741_898, PageUp = 1_073_741_899, End = 1_073_741_901, PageDown = 1_073_741_902, Right = 1_073_741_903, Left = 1_073_741_904, Down = 1_073_741_905, Up = 1_073_741_906, NumLockClear = 1_073_741_907, KpDivide = 1_073_741_908, KpMultiply = 1_073_741_909, KpMinus = 1_073_741_910, KpPlus = 1_073_741_911, KpEnter = 1_073_741_912, Kp1 = 1_073_741_913, Kp2 = 1_073_741_914, Kp3 = 1_073_741_915, Kp4 = 1_073_741_916, Kp5 = 1_073_741_917, Kp6 = 1_073_741_918, Kp7 = 1_073_741_919, Kp8 = 1_073_741_920, Kp9 = 1_073_741_921, Kp0 = 1_073_741_922, KpPeriod = 1_073_741_923, Application = 1_073_741_925, Power = 1_073_741_926, KpEquals = 1_073_741_927, F13 = 1_073_741_928, F14 = 1_073_741_929, F15 = 1_073_741_930, F16 = 1_073_741_931, F17 = 1_073_741_932, F18 = 1_073_741_933, F19 = 1_073_741_934, F20 = 1_073_741_935, F21 = 1_073_741_936, F22 = 1_073_741_937, F23 = 1_073_741_938, F24 = 1_073_741_939, Execute = 1_073_741_940, Help = 1_073_741_941, Menu = 1_073_741_942, Select = 1_073_741_943, Stop = 1_073_741_944, Again = 1_073_741_945, Undo = 1_073_741_946, Cut = 1_073_741_947, Copy = 1_073_741_948, Paste = 1_073_741_949, Find = 1_073_741_950, Mute = 1_073_741_951, VolumeUp = 1_073_741_952, VolumeDown = 1_073_741_953, KpComma = 1_073_741_957, KpEqualsAS400 = 1_073_741_958, AltErase = 1_073_741_977, Sysreq = 1_073_741_978, Cancel = 1_073_741_979, Clear = 1_073_741_980, Prior = 1_073_741_981, Return2 = 1_073_741_982, Separator = 1_073_741_983, Out = 1_073_741_984, Oper = 1_073_741_985, ClearAgain = 1_073_741_986, CrSel = 1_073_741_987, ExSel = 1_073_741_988, Kp00 = 1_073_742_000, Kp000 = 1_073_742_001, ThousandsSeparator = 1_073_742_002, DecimalSeparator = 1_073_742_003, CurrencyUnit = 1_073_742_004, CurrencySubUnit = 1_073_742_005, KpLeftParen = 1_073_742_006, KpRightParen = 1_073_742_007, KpLeftBrace = 1_073_742_008, KpRightBrace = 1_073_742_009, KpTab = 1_073_742_010, KpBackspace = 1_073_742_011, KpA = 1_073_742_012, KpB = 1_073_742_013, KpC = 1_073_742_014, KpD = 1_073_742_015, KpE = 1_073_742_016, KpF = 1_073_742_017, KpXor = 1_073_742_018, KpPower = 1_073_742_019, KpPercent = 1_073_742_020, KpLess = 1_073_742_021, KpGreater = 1_073_742_022, KpAmpersand = 1_073_742_023, KpDblAmpersand = 1_073_742_024, KpVerticalBar = 1_073_742_025, KpDblVerticalBar = 1_073_742_026, KpColon = 1_073_742_027, KpHash = 1_073_742_028, KpSpace = 1_073_742_029, KpAt = 1_073_742_030, KpExclam = 1_073_742_031, KpMemStore = 1_073_742_032, KpMemRecall = 1_073_742_033, KpMemClear = 1_073_742_034, KpMemAdd = 1_073_742_035, KpMemSubtract = 1_073_742_036, KpMemMultiply = 1_073_742_037, KpMemDivide = 1_073_742_038, KpPlusMinus = 1_073_742_039, KpClear = 1_073_742_040, KpClearEntry = 1_073_742_041, KpBinary = 1_073_742_042, KpOctal = 1_073_742_043, KpDecimal = 1_073_742_044, KpHexadecimal = 1_073_742_045, LCtrl = 1_073_742_048, LShift = 1_073_742_049, LAlt = 1_073_742_050, LGui = 1_073_742_051, RCtrl = 1_073_742_052, RShift = 1_073_742_053, RAlt = 1_073_742_054, RGui = 1_073_742_055, Mode = 1_073_742_081, AudioNext = 1_073_742_082, AudioPrev = 1_073_742_083, AudioStop = 1_073_742_084, AudioPlay = 1_073_742_085, AudioMute = 1_073_742_086, MediaSelect = 1_073_742_087, Www = 1_073_742_088, Mail = 1_073_742_089, Calculator = 1_073_742_090, Computer = 1_073_742_091, AcSearch = 1_073_742_092, AcHome = 1_073_742_093, AcBack = 1_073_742_094, AcForward = 1_073_742_095, AcStop = 1_073_742_096, AcRefresh = 1_073_742_097, AcBookmarks = 1_073_742_098, BrightnessDown = 1_073_742_099, BrightnessUp = 1_073_742_100, DisplaySwitch = 1_073_742_101, KbdIllumToggle = 1_073_742_102, KbdIllumDown = 1_073_742_103, KbdIllumUp = 1_073_742_104, Eject = 1_073_742_105, Sleep = 1_073_742_106,
}

Variants§

§

Backspace = 8

§

Tab = 9

§

Return = 13

§

Escape = 27

§

Space = 32

§

Exclaim = 33

§

Quotedbl = 34

§

Hash = 35

§

Dollar = 36

§

Percent = 37

§

Ampersand = 38

§

Quote = 39

§

LeftParen = 40

§

RightParen = 41

§

Asterisk = 42

§

Plus = 43

§

Comma = 44

§

Minus = 45

§

Period = 46

§

Slash = 47

§

Num0 = 48

§

Num1 = 49

§

Num2 = 50

§

Num3 = 51

§

Num4 = 52

§

Num5 = 53

§

Num6 = 54

§

Num7 = 55

§

Num8 = 56

§

Num9 = 57

§

Colon = 58

§

Semicolon = 59

§

Less = 60

§

Equals = 61

§

Greater = 62

§

Question = 63

§

At = 64

§

LeftBracket = 91

§

Backslash = 92

§

RightBracket = 93

§

Caret = 94

§

Underscore = 95

§

Backquote = 96

§

A = 97

§

B = 98

§

C = 99

§

D = 100

§

E = 101

§

F = 102

§

G = 103

§

H = 104

§

I = 105

§

J = 106

§

K = 107

§

L = 108

§

M = 109

§

N = 110

§

O = 111

§

P = 112

§

Q = 113

§

R = 114

§

S = 115

§

T = 116

§

U = 117

§

V = 118

§

W = 119

§

X = 120

§

Y = 121

§

Z = 122

§

Delete = 127

§

CapsLock = 1_073_741_881

§

F1 = 1_073_741_882

§

F2 = 1_073_741_883

§

F3 = 1_073_741_884

§

F4 = 1_073_741_885

§

F5 = 1_073_741_886

§

F6 = 1_073_741_887

§

F7 = 1_073_741_888

§

F8 = 1_073_741_889

§

F9 = 1_073_741_890

§

F10 = 1_073_741_891

§

F11 = 1_073_741_892

§

F12 = 1_073_741_893

§

PrintScreen = 1_073_741_894

§

ScrollLock = 1_073_741_895

§

Pause = 1_073_741_896

§

Insert = 1_073_741_897

§

Home = 1_073_741_898

§

PageUp = 1_073_741_899

§

End = 1_073_741_901

§

PageDown = 1_073_741_902

§

Right = 1_073_741_903

§

Left = 1_073_741_904

§

Down = 1_073_741_905

§

Up = 1_073_741_906

§

NumLockClear = 1_073_741_907

§

KpDivide = 1_073_741_908

§

KpMultiply = 1_073_741_909

§

KpMinus = 1_073_741_910

§

KpPlus = 1_073_741_911

§

KpEnter = 1_073_741_912

§

Kp1 = 1_073_741_913

§

Kp2 = 1_073_741_914

§

Kp3 = 1_073_741_915

§

Kp4 = 1_073_741_916

§

Kp5 = 1_073_741_917

§

Kp6 = 1_073_741_918

§

Kp7 = 1_073_741_919

§

Kp8 = 1_073_741_920

§

Kp9 = 1_073_741_921

§

Kp0 = 1_073_741_922

§

KpPeriod = 1_073_741_923

§

Application = 1_073_741_925

§

Power = 1_073_741_926

§

KpEquals = 1_073_741_927

§

F13 = 1_073_741_928

§

F14 = 1_073_741_929

§

F15 = 1_073_741_930

§

F16 = 1_073_741_931

§

F17 = 1_073_741_932

§

F18 = 1_073_741_933

§

F19 = 1_073_741_934

§

F20 = 1_073_741_935

§

F21 = 1_073_741_936

§

F22 = 1_073_741_937

§

F23 = 1_073_741_938

§

F24 = 1_073_741_939

§

Execute = 1_073_741_940

§

Help = 1_073_741_941

§

Menu = 1_073_741_942

§

Select = 1_073_741_943

§

Stop = 1_073_741_944

§

Again = 1_073_741_945

§

Undo = 1_073_741_946

§

Cut = 1_073_741_947

§

Copy = 1_073_741_948

§

Paste = 1_073_741_949

§

Find = 1_073_741_950

§

Mute = 1_073_741_951

§

VolumeUp = 1_073_741_952

§

VolumeDown = 1_073_741_953

§

KpComma = 1_073_741_957

§

KpEqualsAS400 = 1_073_741_958

§

AltErase = 1_073_741_977

§

Sysreq = 1_073_741_978

§

Cancel = 1_073_741_979

§

Clear = 1_073_741_980

§

Prior = 1_073_741_981

§

Return2 = 1_073_741_982

§

Separator = 1_073_741_983

§

Out = 1_073_741_984

§

Oper = 1_073_741_985

§

ClearAgain = 1_073_741_986

§

CrSel = 1_073_741_987

§

ExSel = 1_073_741_988

§

Kp00 = 1_073_742_000

§

Kp000 = 1_073_742_001

§

ThousandsSeparator = 1_073_742_002

§

DecimalSeparator = 1_073_742_003

§

CurrencyUnit = 1_073_742_004

§

CurrencySubUnit = 1_073_742_005

§

KpLeftParen = 1_073_742_006

§

KpRightParen = 1_073_742_007

§

KpLeftBrace = 1_073_742_008

§

KpRightBrace = 1_073_742_009

§

KpTab = 1_073_742_010

§

KpBackspace = 1_073_742_011

§

KpA = 1_073_742_012

§

KpB = 1_073_742_013

§

KpC = 1_073_742_014

§

KpD = 1_073_742_015

§

KpE = 1_073_742_016

§

KpF = 1_073_742_017

§

KpXor = 1_073_742_018

§

KpPower = 1_073_742_019

§

KpPercent = 1_073_742_020

§

KpLess = 1_073_742_021

§

KpGreater = 1_073_742_022

§

KpAmpersand = 1_073_742_023

§

KpDblAmpersand = 1_073_742_024

§

KpVerticalBar = 1_073_742_025

§

KpDblVerticalBar = 1_073_742_026

§

KpColon = 1_073_742_027

§

KpHash = 1_073_742_028

§

KpSpace = 1_073_742_029

§

KpAt = 1_073_742_030

§

KpExclam = 1_073_742_031

§

KpMemStore = 1_073_742_032

§

KpMemRecall = 1_073_742_033

§

KpMemClear = 1_073_742_034

§

KpMemAdd = 1_073_742_035

§

KpMemSubtract = 1_073_742_036

§

KpMemMultiply = 1_073_742_037

§

KpMemDivide = 1_073_742_038

§

KpPlusMinus = 1_073_742_039

§

KpClear = 1_073_742_040

§

KpClearEntry = 1_073_742_041

§

KpBinary = 1_073_742_042

§

KpOctal = 1_073_742_043

§

KpDecimal = 1_073_742_044

§

KpHexadecimal = 1_073_742_045

§

LCtrl = 1_073_742_048

§

LShift = 1_073_742_049

§

LAlt = 1_073_742_050

§

LGui = 1_073_742_051

§

RCtrl = 1_073_742_052

§

RShift = 1_073_742_053

§

RAlt = 1_073_742_054

§

RGui = 1_073_742_055

§

Mode = 1_073_742_081

§

AudioNext = 1_073_742_082

§

AudioPrev = 1_073_742_083

§

AudioStop = 1_073_742_084

§

AudioPlay = 1_073_742_085

§

AudioMute = 1_073_742_086

§

MediaSelect = 1_073_742_087

§

Www = 1_073_742_088

§

Mail = 1_073_742_089

§

Calculator = 1_073_742_090

§

Computer = 1_073_742_091

§

AcSearch = 1_073_742_092

§

AcHome = 1_073_742_093

§

AcBack = 1_073_742_094

§

AcForward = 1_073_742_095

§

AcStop = 1_073_742_096

§

AcRefresh = 1_073_742_097

§

AcBookmarks = 1_073_742_098

§

BrightnessDown = 1_073_742_099

§

BrightnessUp = 1_073_742_100

§

DisplaySwitch = 1_073_742_101

§

KbdIllumToggle = 1_073_742_102

§

KbdIllumDown = 1_073_742_103

§

KbdIllumUp = 1_073_742_104

§

Eject = 1_073_742_105

§

Sleep = 1_073_742_106

Implementations§

source§

impl Keycode

source§

impl Keycode

source

pub fn from_scancode(scancode: Scancode) -> Option<Keycode>

Gets the virtual key from a scancode. Returns None if there is no corresponding virtual key.

source

pub fn from_name(name: &str) -> Option<Keycode>

source

pub fn name(self) -> String

Trait Implementations§

source§

impl Clone for Keycode

source§

fn clone(&self) -> Keycode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Keycode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for Keycode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Hash for Keycode

source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Keycode

source§

fn eq(&self, other: &Keycode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Keycode

source§

impl Eq for Keycode

source§

impl StructuralPartialEq for Keycode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Az for T

source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.