As per @Mr_Pink comment, I just needed to remove the channel receive. The following works:
package main
import (
"fmt"
"os"
"time"
hook "github.com/robotn/gohook"
)
func main() {
fmt.Println("Press q to quit.")
hook.Register(hook.KeyDown, []string{"q"}, func(e hook.Event) {
os.Exit(3)
})
s := hook.Start()
hook.Process(s)
// TODO: While listening for key events with gohook above, I also want to continuously print to the console.
// How do I get this loop to run, while the above event listener is also active?
for {
fmt.Print(".")
time.Sleep(200 * time.Millisecond)
}
}