Skip to content

(custom) keypress detection errors #93

Description

@rien333

Custom keypress detection, and possibly also the detection of (some) default keypresses, seems to be broken. Given the following example code from the README:

...
@player.on_key_press('q')
def my_q_binding():
    print('THERE IS NO ESCAPE')
...

I get this error when pressing q:

TypeError: _handle_key_binding_message() takes from 3 to 4 positional arguments but 5 were given
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/mpv.py", line 474, in _event_loop
    message_handlers[target](*args)
TypeError: _handle_key_binding_message() takes from 3 to 4 positional arguments but 5 were given

System info

$ uname -mor
5.3.13-arch1-1 x86_64 GNU/Linux
$ mpv --version
mpv 0.30.0-210-g7c6570402b Copyright © 2000-2019 mpv/MPlayer/mplayer2 projects
 built on Tue Nov 26 11:50:51 CET 2019
ffmpeg library versions:
   libavutil       56.35.101
   libavcodec      58.62.100
   libavformat     58.35.100
   libswscale      5.6.100
   libavfilter     7.66.100
   libswresample   3.6.100
ffmpeg version: N-95734-gbfa8272f40

I tested this with python-mpv from git master.

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