emulate a key press on the android tv device
(keycode common.RemoteKeyCode)
| 249 | |
| 250 | // emulate a key press on the android tv device |
| 251 | func (c *Command) SendKey(keycode common.RemoteKeyCode) error { |
| 252 | return c.write(pb.RemoteMessage{ |
| 253 | RemoteKeyInject: &pb.RemoteKeyInject{ |
| 254 | KeyCode: pb.RemoteKeyCode(keycode), |
| 255 | Direction: pb.RemoteDirection_SHORT, |
| 256 | }, |
| 257 | }) |
| 258 | } |
| 259 | |
| 260 | // open a link on the android tv device |
| 261 | // if the links matches the one defined in an app's manifest, the app will be launched |