LavaUI docs GitHub

enum KeyCode

Swift

enum KeyCode

Physical key codes (GLFW numbering).

Sources/LavaUI/Input.swift:7

Properties

static let a: Int32

The A key. Letter keys are their uppercase ASCII codes, so a + n is the nth letter.

Sources/LavaUI/Input.swift:27

static let apostrophe: Int32

The ' key.

Sources/LavaUI/Input.swift:11

static let b: Int32

The B key.

Sources/LavaUI/Input.swift:29

static let backspace: Int32

Backspace.

Sources/LavaUI/Input.swift:85

static let c: Int32

The C key.

Sources/LavaUI/Input.swift:31

static let comma: Int32

The , key.

Sources/LavaUI/Input.swift:13

static let d: Int32

The D key.

Sources/LavaUI/Input.swift:33

static let delete: Int32

Delete (forward delete).

Sources/LavaUI/Input.swift:87

static let down: Int32

Down arrow.

Sources/LavaUI/Input.swift:97

static let e: Int32

The E key.

Sources/LavaUI/Input.swift:35

static let end: Int32

End.

Sources/LavaUI/Input.swift:89

static let enter: Int32

Enter (Return).

Sources/LavaUI/Input.swift:81

static let equal: Int32

The = key.

Sources/LavaUI/Input.swift:25

static let escape: Int32

Escape.

Sources/LavaUI/Input.swift:79

static let f: Int32

The F key.

Sources/LavaUI/Input.swift:37

static let f1: Int32

F1. Same as function(1).

Sources/LavaUI/Input.swift:110

static let f10: Int32

F10. Same as function(10).

Sources/LavaUI/Input.swift:128

static let f11: Int32

F11. Same as function(11).

Sources/LavaUI/Input.swift:130

static let f12: Int32

F12. Same as function(12).

Sources/LavaUI/Input.swift:132

static let f2: Int32

F2. Same as function(2).

Sources/LavaUI/Input.swift:112

static let f3: Int32

F3. Same as function(3).

Sources/LavaUI/Input.swift:114

static let f4: Int32

F4. Same as function(4).

Sources/LavaUI/Input.swift:116

static let f5: Int32

F5. Same as function(5).

Sources/LavaUI/Input.swift:118

static let f6: Int32

F6. Same as function(6).

Sources/LavaUI/Input.swift:120

static let f7: Int32

F7. Same as function(7).

Sources/LavaUI/Input.swift:122

static let f8: Int32

F8. Same as function(8).

Sources/LavaUI/Input.swift:124

static let f9: Int32

F9. Same as function(9).

Sources/LavaUI/Input.swift:126

static let g: Int32

The G key.

Sources/LavaUI/Input.swift:39

static let h: Int32

The H key.

Sources/LavaUI/Input.swift:41

static let home: Int32

Home.

Sources/LavaUI/Input.swift:91

static let i: Int32

The I key.

Sources/LavaUI/Input.swift:43

static let insert: Int32

Insert.

Sources/LavaUI/Input.swift:106

static let j: Int32

The J key.

Sources/LavaUI/Input.swift:45

static let k: Int32

The K key.

Sources/LavaUI/Input.swift:47

static let key0: Int32

The 0 key on the main row. The other digits follow on: key0 + n.

Sources/LavaUI/Input.swift:21

static let key1: Int32

The 1 key on the main row.

Sources/LavaUI/Input.swift:23

static let kp0: Int32

Keypad 0. Keypad digits follow on: kp0 + n.

Sources/LavaUI/Input.swift:134

static let kpAdd: Int32

Keypad +.

Sources/LavaUI/Input.swift:138

static let kpSub: Int32

Keypad -.

Sources/LavaUI/Input.swift:136

static let l: Int32

The L key.

Sources/LavaUI/Input.swift:49

static let left: Int32

Left arrow.

Sources/LavaUI/Input.swift:95

static let leftAlt: Int32

Left Alt.

Sources/LavaUI/Input.swift:144

static let leftControl: Int32

Left Control.

Sources/LavaUI/Input.swift:142

static let leftShift: Int32

Left Shift.

Sources/LavaUI/Input.swift:140

static let leftSuper: Int32

Left Super (the Windows key).

Sources/LavaUI/Input.swift:146

static let m: Int32

The M key.

Sources/LavaUI/Input.swift:51

static let minus: Int32

The - key.

Sources/LavaUI/Input.swift:15

static let n: Int32

The N key.

Sources/LavaUI/Input.swift:53

static let o: Int32

The O key.

Sources/LavaUI/Input.swift:55

static let p: Int32

The P key.

Sources/LavaUI/Input.swift:57

static let pageDown: Int32

Page Down. See pageUp.

Sources/LavaUI/Input.swift:104

static let pageUp: Int32

GLFW PAGE_UP / PAGE_DOWN. Terminals send CSI 5~/6~ for these — without the mapping, tmux never sees Ctrl+b then PageUp as a scroll.

Sources/LavaUI/Input.swift:102

static let period: Int32

The . key.

Sources/LavaUI/Input.swift:17

static let q: Int32

The Q key.

Sources/LavaUI/Input.swift:59

static let r: Int32

The R key.

Sources/LavaUI/Input.swift:61

static let rightAlt: Int32

Right Alt.

Sources/LavaUI/Input.swift:152

static let rightControl: Int32

Right Control.

Sources/LavaUI/Input.swift:150

static let rightShift: Int32

Right Shift.

Sources/LavaUI/Input.swift:148

static let rightSuper: Int32

Right Super.

Sources/LavaUI/Input.swift:154

static let s: Int32

The S key.

Sources/LavaUI/Input.swift:63

static let slash: Int32

The / key.

Sources/LavaUI/Input.swift:19

static let space: Int32

The space bar.

Sources/LavaUI/Input.swift:9

static let t: Int32

The T key.

Sources/LavaUI/Input.swift:65

static let tab: Int32

Tab.

Sources/LavaUI/Input.swift:83

static let u: Int32

The U key.

Sources/LavaUI/Input.swift:67

static let up: Int32

Up arrow.

Sources/LavaUI/Input.swift:99

static let v: Int32

The V key.

Sources/LavaUI/Input.swift:69

static let w: Int32

The W key.

Sources/LavaUI/Input.swift:71

static let x: Int32

The X key.

Sources/LavaUI/Input.swift:73

static let y: Int32

The Y key.

Sources/LavaUI/Input.swift:75

static let z: Int32

The Z key.

Sources/LavaUI/Input.swift:77

Methods

static func function(_ n: Int32) -> Int32

F1–F12 are 290–301 in GLFW, and so here.

Sources/LavaUI/Input.swift:108

static func isHoldModifier(_ key: Int32) -> Bool

Whether key is Control, Alt or Super on either side — the modifiers a shortcut is held with. Shift is not one of them.

Sources/LavaUI/Input.swift:158