diff options
| -rw-r--r-- | m4p/m4p.go | 2 | ||||
| -rw-r--r-- | main.go | 7 | 
2 files changed, 5 insertions, 4 deletions
| @@ -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  ) @@ -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 | 
