keyboard push mvp

This commit is contained in:
bel
2023-03-01 21:00:27 -07:00
parent b65d2134f5
commit 4c233cf794
6 changed files with 110 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
//go:build integration
package output_test
import (
"mayhem-party/src/device/output"
"testing"
"time"
)
func TestKeyboardIntegration(t *testing.T) {
kb := output.NewKeyboard()
defer kb.Release()
t.Log("pressing 'a' for 5 seconds")
kb.Press(output.A)
for i := 0; i < 5; i++ {
t.Logf("\t%d...", 5-i)
time.Sleep(time.Second)
}
t.Logf("releasing")
kb.Release()
}