Magnum::Platform::EmscriptenApplication::KeyEvent class

Key event.

Base classes

class InputEvent
Base for input events.

Public types

enum class Key: Int { Unknown, LeftShift, RightShift, LeftCtrl, RightCtrl, LeftAlt, RightAlt, LeftSuper, RightSuper, Enter, Esc, Up, Down, Left, Right, Home, End, PageUp, PageDown, Backspace, Insert, Delete, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, Zero = '0', One, Two, Three, Four, Five, Six, Seven, Eight, Nine, A = 'a', B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Space, Tab, Comma, Period, Minus, Plus, Slash, Percent, Equal, Backquote, Backslash, Quote, BracketRight, BracketLeft, CapsLock, ScrollLock, NumLock, PrintScreen, Pause, Menu, NumZero, NumOne, NumTwo, NumThree, NumFour, NumFive, NumSix, NumSeven, NumEight, NumNine, NumDecimal, NumDivide, NumMultiply, NumSubtract, NumAdd, NumEnter, NumEqual }
Key.

Public functions

auto key() const -> Key
Key.
auto keyName() const -> std::string
Key name.
auto modifiers() const -> Modifiers
Modifiers.
auto event() const -> const EmscriptenKeyboardEvent&
Underlying Emscripten event.

Enum documentation

enum class Magnum::Platform::EmscriptenApplication::KeyEvent::Key: Int

Key.

Enumerators
Unknown

Unknown key

LeftShift

Left Shift

RightShift

Right Shift

LeftCtrl

Left Ctrl

RightCtrl

Right Ctrl

LeftAlt

Left Alt

RightAlt

Right Alt

LeftSuper

Left Super key (Windows/⌘)

RightSuper

Right Super key (Windows/⌘)

Enter

Enter

Esc

Escape

Up

Up arrow

Down

Down arrow

Left

Left arrow

Right

Right arrow

Home

Home

End

End

PageUp

Page up

PageDown

Page down

Backspace

Backspace

Insert

Insert

Delete

Delete

F1

F1

F2

F2

F3

F3

F4

F4

F5

F5

F6

F6

F7

F7

F8

F8

F9

F9

F10

F10

F11

F11

F12

F12

Zero

Zero

One

One

Two

Two

Three

Three

Four

Four

Five

Five

Six

Six

Seven

Seven

Eight

Eight

Nine

Nine

A

Letter A

B

Letter B

C

Letter C

D

Letter D

E

Letter E

F

Letter F

G

Letter G

H

Letter H

I

Letter I

J

Letter J

K

Letter K

L

Letter L

M

Letter M

N

Letter N

O

Letter O

P

Letter P

Q

Letter Q

R

Letter R

S

Letter S

T

Letter T

U

Letter U

V

Letter V

W

Letter W

X

Letter X

Y

Letter Y

Z

Letter Z

Space

Space

Tab

Tab

Comma

Comma

Period

Period

Minus

Minus

Plus

Plus

Slash

Slash

Percent

Percent

Equal

Equal

Backquote

Backquote

Backslash

Backslash

Quote

Quote

BracketRight

BracketRight

BracketLeft

BracketLeft

CapsLock

Caps lock

ScrollLock

Scroll lock

NumLock

Num lock

PrintScreen

Print screen

Pause

Pause

Menu

Menu

NumZero

Numpad zero

NumOne

Numpad one

NumTwo

Numpad two

NumThree

Numpad three

NumFour

Numpad four

NumFive

Numpad five

NumSix

Numpad six

NumSeven

Numpad seven

NumEight

Numpad eight

NumNine

Numpad nine

NumDecimal

Numpad decimal

NumDivide

Numpad divide

NumMultiply

Numpad multiply

NumSubtract

Numpad subtract

NumAdd

Numpad add

NumEnter

Numpad enter

NumEqual

Numpad equal

Function documentation

Key Magnum::Platform::EmscriptenApplication::KeyEvent::key() const

Key.

Note that the key is mapped from EmscriptenKeyboardEvent::code in all cases except A–Z, which are mapped from EmscriptenkeyboardEvent::key, which respects the keyboard layout.