Closed kpj closed 6 years ago
Sorry, I have no idea. Maybe focus order, in that on mac your window is not in focus?
I investigated this using a custom keyPressEvent
method in the QMainWindow
and it does receive the key-events.
I also added custom @player.on_key_press
bindings to my MPV class, but they were never triggered.
Is there a way of simulating keypresses using python-mpv? That way I could catch key-events in PyQT's keyPressEvent
method and propagate them manually.
This is of course a very dirty solution, but the best I could think of so far.
Is there a way of simulating keypresses using python-mpv?
For example: mpvobject.command('keypress', 'ctrl+a')
Hello,
Time for another macOS related issue ( :-[ ). As explained in #61, an extra QT-Window needs to be created for python-mpv to work on macOS.
If I now take the PyQT embedding example from the README and add
input_default_bindings=True, input_vo_keyboard=True
to the MPV instantiation, I would expect mpv-commands such asspace
(for pausing) oro
(for time-display) to work. On linux, it does indeed work. On macOS however, nothing happens.Do you have a suggestion why this might be happening? (PyQT not forwarding keypress-events, ...)