Handbook
Glossary
record-keyboard ( keyboard-state value -- )
Vocabulary
game
.
input
.
iokit
Inputs
keyboard-state
an
object
value
an
object
Outputs
None
Definition
USING:
alien.c-types
iokit.hid
kernel
sequences
;
IN:
game.input.iokit
:
record-keyboard
( keyboard-state value -- )
dup
IOHIDValueGetElement
dup
keyboard-key?
[
[
IOHIDValueGetIntegerValue
c-bool>
]
[
IOHIDElementGetUsage
]
bi*
rot
?set-nth
]
[
3drop
]
if
;