diff --git a/src/device/input/button/parser.go b/src/device/input/button/parser.go index ee5397b..69076ee 100644 --- a/src/device/input/button/parser.go +++ b/src/device/input/button/parser.go @@ -11,5 +11,5 @@ type Parser interface { } func New(ctx context.Context, src raw.Raw) Parser { - panic(nil) + return NewPlaintext(src) } diff --git a/src/device/input/input.go b/src/device/input/input.go index b77ebff..f1dfd15 100644 --- a/src/device/input/input.go +++ b/src/device/input/input.go @@ -2,16 +2,18 @@ package input import ( "context" + "mayhem-party/src/device/input/button" "mayhem-party/src/device/input/raw" "mayhem-party/src/device/input/wrap" ) type Input interface { - Read() []wrap.Button + Read() []button.Button Close() } func New(ctx context.Context) Input { src := raw.New(ctx) - return wrap.New(ctx, src) + parser := button.New(ctx, src) + return wrap.New(ctx, parser) }