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 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 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 right: Int32
Right arrow.
Sources/LavaUI/Input.swift:93
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