2017-10-22 21:18:01 +01:00
|
|
|
import io
|
|
|
|
|
|
|
|
const keyboardAddress = 0x60
|
|
|
|
|
|
|
|
type
|
2017-10-31 02:27:45 +00:00
|
|
|
KeypressEvent* = tuple
|
2017-10-22 21:18:01 +01:00
|
|
|
character: char
|
|
|
|
pressed: bool
|
|
|
|
|
|
|
|
proc getScancode(): char =
|
|
|
|
while true:
|
|
|
|
let c = io.inb(keyboardAddress)
|
|
|
|
if(c > 0): return c
|
|
|
|
|
|
|
|
proc getChar*(): char =
|
|
|
|
discard # TODO: Implement lookup to a scan table to get actual character
|