-
-
Notifications
You must be signed in to change notification settings - Fork 126
Keyboard Listener #2841
Description
What do you need help with?
Hi everyone,
I'm not sure if the tag is correct, maybe I'm doing something wrong, so I won't file a bug report for now.
Basically, despite having paired all three protocols, the keyboard listener event never fires when I go to a text area. I'm using the latest version of TvOS and the latest version of pyatv.
I basically tried extending the pyatv listener class in an external script to try and integrate it, but it's not working. Below is what I tried.
class KeyboardListener(pyatv.interface.KeyboardListener):
def init(self, parent_apple_tv, identifier):
self.parent_apple_tv = parent_apple_tv
self.identifier = identifier
LOGGER.debug(f"{self.identifier} - Keyboard listener initialized")
def focusstate_update(self, old_state, new_state):
LOGGER.debug(f"{self.identifier} - keyboard: old_state={old_state}, new_state={new_state}")
message = {"old_status": old_state.value, "new_status": new_state.value}
data = {"cmd": "keyboard_status", "message": message}
asyncio.create_task(self.parent_apple_tv.publish_message(data))
It prints the Initialization log, but not the entire focus section.
Thanks.