

def keycode(self, keycode, action):
    'Sends a KeyCode event to Google TV.\n\n    Args:\n      keycode: A Code from keycodes_pb2.\n      action: Either "down" (pressed) or "up" (released).\n    '
    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)

dataset/ETHPy150Open stevenle/googletv-anymote/googletv/__init__.py AnymoteProtocol.keycode/original