Skip to content

cec.EVENT_KEYPRESS not working after updating to 0.2.7 #33

Open
@superuser789

Description

@superuser789

Hi,
In previous cec 0.2.6, the following code was working fine. But it is not working now after updating to 0.2.7.

import cec
import time


cec.init()

print("Ready")

def onkey(event, key , state):
  if state > 0:
    print("Got key", key, "state", state)

cec.add_callback(onkey, cec.EVENT_KEYPRESS)

while True:
 time.sleep(9e8)

What changes should I do to make it work again ?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions