21 lines
352 B
Go
21 lines
352 B
Go
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() []button.Button
|
|
Close()
|
|
}
|
|
|
|
func New(ctx context.Context) Input {
|
|
src := raw.New(ctx)
|
|
return wrap.New(ctx, func() button.Parser {
|
|
return button.New(ctx, src)
|
|
})
|
|
}
|