summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m4p/m4p.go2
-rw-r--r--main.go7
2 files changed, 5 insertions, 4 deletions
diff --git a/m4p/m4p.go b/m4p/m4p.go
index 07f78a5..d69e31b 100644
--- a/m4p/m4p.go
+++ b/m4p/m4p.go
@@ -12,6 +12,7 @@ const (
// Magic remote keycodes.
const (
KeyWheelPressed = 13
+ KeyPause = 19
KeyChannelUp = 33
KeyChannelDown = 34
KeyLeft = 37
@@ -32,6 +33,7 @@ const (
KeyGreen = 404
KeyYellow = 405
KeyBlue = 406
+ KeyPlay = 415
KeyBack = 461
)
diff --git a/main.go b/main.go
index fad8c98..9cadcfb 100644
--- a/main.go
+++ b/main.go
@@ -74,7 +74,7 @@ func run(ctx context.Context) error {
func process(ctx context.Context, dev m4p.DeviceInfo, keyboard input.Keyboard, mouse input.Mouse) error {
addr := fmt.Sprintf("%s:%d", dev.IPAddr, dev.Port)
- log.Printf("Starting processing with: %s", addr)
+ log.Printf("Starting processing with Device: %s", addr)
client, err := m4p.Dial(ctx, addr)
if err != nil {
@@ -138,9 +138,8 @@ func processKey(message m4p.Message, keyboard input.Keyboard) {
key = input.Key8
case m4p.Key9:
key = input.Key9
- case m4p.KeyRed:
- key = input.KeyStop
- case m4p.KeyGreen:
+ case m4p.KeyPlay:
+ case m4p.KeyPause:
key = input.KeyPlaypause
case m4p.KeyBack:
key = input.KeyBackspace