enum SF::Keyboard::Key

Overview

Key codes

Defined in:

window/obj.cr
window/window.cr

Enum Members

Unknown = -1

Unhandled key

A = 0

The A key

B = 1

The B key

C = 2

The C key

D = 3

The D key

E = 4

The E key

F = 5

The F key

G = 6

The G key

H = 7

The H key

I = 8

The I key

J = 9

The J key

K = 10

The K key

L = 11

The L key

M = 12

The M key

N = 13

The N key

O = 14

The O key

P = 15

The P key

Q = 16

The Q key

R = 17

The R key

S = 18

The S key

T = 19

The T key

U = 20

The U key

V = 21

The V key

W = 22

The W key

X = 23

The X key

Y = 24

The Y key

Z = 25

The Z key

Num0 = 26

The 0 key

Num1 = 27

The 1 key

Num2 = 28

The 2 key

Num3 = 29

The 3 key

Num4 = 30

The 4 key

Num5 = 31

The 5 key

Num6 = 32

The 6 key

Num7 = 33

The 7 key

Num8 = 34

The 8 key

Num9 = 35

The 9 key

Escape = 36

The Escape key

LControl = 37

The left Control key

LShift = 38

The left Shift key

LAlt = 39

The left Alt key

LSystem = 40

The left OS specific key: window (Windows and Linux), apple (MacOS X), ...

RControl = 41

The right Control key

RShift = 42

The right Shift key

RAlt = 43

The right Alt key

RSystem = 44

The right OS specific key: window (Windows and Linux), apple (MacOS X), ...

Menu = 45

The Menu key

LBracket = 46

The [ key

RBracket = 47

The ] key

Semicolon = 48

The ; key

Comma = 49

The , key

Period = 50

The . key

Quote = 51

The ' key

Slash = 52

The / key

Backslash = 53

The \ key

Tilde = 54

The ~ key

Equal = 55

The = key

Hyphen = 56

The - key (hyphen)

Space = 57

The Space key

Enter = 58

The Enter/Return keys

Backspace = 59

The Backspace key

Tab = 60

The Tabulation key

PageUp = 61

The Page up key

PageDown = 62

The Page down key

End = 63

The End key

Home = 64

The Home key

Insert = 65

The Insert key

Delete = 66

The Delete key

Add = 67

The + key

Subtract = 68

The - key (minus, usually from numpad)

Multiply = 69

The * key

Divide = 70

The / key

Left = 71

Left arrow

Right = 72

Right arrow

Up = 73

Up arrow

Down = 74

Down arrow

Numpad0 = 75

The numpad 0 key

Numpad1 = 76

The numpad 1 key

Numpad2 = 77

The numpad 2 key

Numpad3 = 78

The numpad 3 key

Numpad4 = 79

The numpad 4 key

Numpad5 = 80

The numpad 5 key

Numpad6 = 81

The numpad 6 key

Numpad7 = 82

The numpad 7 key

Numpad8 = 83

The numpad 8 key

Numpad9 = 84

The numpad 9 key

F1 = 85

The F1 key

F2 = 86

The F2 key

F3 = 87

The F3 key

F4 = 88

The F4 key

F5 = 89

The F5 key

F6 = 90

The F6 key

F7 = 91

The F7 key

F8 = 92

The F8 key

F9 = 93

The F9 key

F10 = 94

The F10 key

F11 = 95

The F11 key

F12 = 96

The F12 key

F13 = 97

The F13 key

F14 = 98

The F14 key

F15 = 99

The F15 key

Pause = 100

The Pause key

KeyCount = 101

Keep last -- the total number of keyboard keys

Dash = 56

DEPRECATED Use Hyphen instead

BackSpace = 59

DEPRECATED Use Backspace instead

BackSlash = 53

DEPRECATED Use Backslash instead

SemiColon = 48

DEPRECATED Use Semicolon instead

Return = 58

DEPRECATED Use Enter instead

Class Method Summary

Instance Method Summary

Class Method Detail

def self.parse?(string) : self | Nil #

Same as Enum#parse? but with a workaround to skip duplicate names


[View source]

Instance Method Detail

def a? #

[View source]
def add? #

[View source]
def b? #

[View source]
def back_slash? #

[View source]
def back_space? #

[View source]
def backslash? #

[View source]
def backspace? #

[View source]
def c? #

[View source]
def comma? #

[View source]
def d? #

[View source]
def dash? #

[View source]
def delete? #

[View source]
def divide? #

[View source]
def down? #

[View source]
def e? #

[View source]
def end? #

[View source]
def enter? #

[View source]
def equal? #

[View source]
def escape? #

[View source]
def f10? #

[View source]
def f11? #

[View source]
def f12? #

[View source]
def f13? #

[View source]
def f14? #

[View source]
def f15? #

[View source]
def f1? #

[View source]
def f2? #

[View source]
def f3? #

[View source]
def f4? #

[View source]
def f5? #

[View source]
def f6? #

[View source]
def f7? #

[View source]
def f8? #

[View source]
def f9? #

[View source]
def f? #

[View source]
def g? #

[View source]
def h? #

[View source]
def home? #

[View source]
def hyphen? #

[View source]
def i? #

[View source]
def insert? #

[View source]
def j? #

[View source]
def k? #

[View source]
def key_count? #

[View source]
def l? #

[View source]
def l_alt? #

[View source]
def l_bracket? #

[View source]
def l_control? #

[View source]
def l_shift? #

[View source]
def l_system? #

[View source]
def left? #

[View source]
def m? #

[View source]
def menu? #

[View source]
def multiply? #

[View source]
def n? #

[View source]
def num0? #

[View source]
def num1? #

[View source]
def num2? #

[View source]
def num3? #

[View source]
def num4? #

[View source]
def num5? #

[View source]
def num6? #

[View source]
def num7? #

[View source]
def num8? #

[View source]
def num9? #

[View source]
def numpad0? #

[View source]
def numpad1? #

[View source]
def numpad2? #

[View source]
def numpad3? #

[View source]
def numpad4? #

[View source]
def numpad5? #

[View source]
def numpad6? #

[View source]
def numpad7? #

[View source]
def numpad8? #

[View source]
def numpad9? #

[View source]
def o? #

[View source]
def p? #

[View source]
def page_down? #

[View source]
def page_up? #

[View source]
def pause? #

[View source]
def period? #

[View source]
def q? #

[View source]
def quote? #

[View source]
def r? #

[View source]
def r_alt? #

[View source]
def r_bracket? #

[View source]
def r_control? #

[View source]
def r_shift? #

[View source]
def r_system? #

[View source]
def return? #

[View source]
def right? #

[View source]
def s? #

[View source]
def semi_colon? #

[View source]
def semicolon? #

[View source]
def slash? #

[View source]
def space? #

[View source]
def subtract? #

[View source]
def t? #

[View source]
def tab? #

[View source]
def tilde? #

[View source]
def u? #

[View source]
def unknown? #

[View source]
def up? #

[View source]
def v? #

[View source]
def w? #

[View source]
def x? #

[View source]
def y? #

[View source]
def z? #

[View source]