When the player works in fullscreen mode keyboard events are not raised. Is there any method to catch such events without creation parental OS window?
I need cross platform desicion if it possible. Is OS registered global hotkeys only way for solve the problem?
Code: Select all
func (p *VlcPlayer) Run() {
go Input()
for {
select {
case command := <-p.Cmd:
https://github.com/eiannone/keyboard - for catching input events
Code: Select all
func Input() {
err := keyboard.Open()
if err != nil {
panic(err)
}
defer keyboard.Close()
fmt.Println("Press ESC to quit")