can exit while reading from keyboard

This commit is contained in:
Bel LaPointe
2023-03-02 15:21:34 -07:00
parent 5c5a371f55
commit b0767818e2
6 changed files with 22 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
package output
import (
"context"
"mayhem-party/src/device/output/key"
"os"
)
@@ -10,7 +11,7 @@ type Output interface {
Press(...key.Key)
}
func New() Output {
func New(ctx context.Context) Output {
if os.Getenv("OUTPUT_KEYBOARD") == "true" {
return NewKeyboard()
}