17 lines
311 B
Nim
17 lines
311 B
Nim
import io
|
|
|
|
const keyboardAddress = 0x60
|
|
|
|
type
|
|
KeypressEvent* = tuple
|
|
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
|