eiannone / keyboard

Simple library to listen for keystrokes from the keyboard
MIT License
581 stars 57 forks source link

rasberry 3b+ report error #17

Open zhuqiyun opened 4 years ago

zhuqiyun commented 4 years ago

You pressed: '7' You pressed: '5' You pressed: '3' You pressed: '1' You pressed: '1' 1You pressed: '3' You pressed: '3' You pressed: '3' You pressed: '7' You pressed: '3' panic: runtime error: slice bounds out of range [1:0]

goroutine 78 [running]: github.com/eiannone/keyboard.inputEventsProducer() C:/Users/zhu/go/pkg/mod/github.com/eiannone/keyboard@v0.0.0-20190314115158-7169d0afeb4f/keyboard.go:126 +0x340 created by github.com/eiannone/keyboard.initConsole C:/Users/zhu/go/pkg/mod/github.com/eiannone/keyboard@v0.0.0-20190314115158-7169d0afeb4f/keyboard.go:208 +0x294

eiannone commented 4 years ago

Hi @zhuqiyun , could you please try latest version? I tested today on my Raspberry Pi 3B+ and now it seems to be working.