I'm writing a Python script based on the Python library of libcec and am parsing the keypresses received. Where most of the time I receive a "key down" and a "key up" event, the latter doesn't always happen. In that case my script doesn't realize the user has stopped pressing the button and keeps sending button events forever. I made a manual workaround by checking the time that has passed since the last keypress, but I should really just always receive the key up event.
I'm writing a Python script based on the Python library of libcec and am parsing the keypresses received. Where most of the time I receive a "key down" and a "key up" event, the latter doesn't always happen. In that case my script doesn't realize the user has stopped pressing the button and keeps sending button events forever. I made a manual workaround by checking the time that has passed since the last keypress, but I should really just always receive the key up event.