Closed marcuxyz closed 5 years ago
are you running the unmodified example?
Can you confirm that an event handler exists?
termui.Handle("/sys/kbd/q", func(termui.Event) {
termui.StopLoop()
})
Here the examples work as expected with Ubuntu 16.04 and 14.04.
I have also encountered this problem. MacOS is what i use
In my Mac (10.13.16) I found that if you use the code in the example:
ui.Handle("c", func(ui.Event) {
ui.StopLoop()
})
It won't work, but it works if you use
ui.Handle("/sys/kbd/c", func(ui.Event) {
fmt.Println("Pressed c")
ui.StopLoop()
})
As mentioned above.
Events have been reworked so you can use the method documented in the readme now and everything should work. :+1:
When trying to use keys like Q to exit for example. The app does not respond, I have to close the terminal in hand.
Ubuntu / Linux is what I use.