def keycode(self, keycode, action):
    req = remote_pb2.RequestMessage()
    req.key_event_message.keycode = keycode
    if action == 'up':
      req.key_event_message.action = keycodes_pb2.UP
    else:
      req.key_event_message.action = keycodes_pb2.DOWN
    self._send_message(req)
Sends a KeyCode event to Google TV.
dataset/ETHPy150Open stevenle/googletv-anymote/googletv/__init__.py/AnymoteProtocol.keycode