package main

import (
	"log"
	"mayhem-party/src/device/input"
)

func main() {
	k := input.NewBuffered(input.NewKeyboard())
	defer func() {
		recover()
		k.Close()
	}()

	log.Printf("try the keyboard")
	n := 5
	for n > 0 {
		result := k.Read()
		n -= len(result)
		for j := range result {
			log.Printf("[%d][%d] %c|%v", n, j, result[j].Char, result[j].Down)
		}
	}
}
