darkhz / invidtui

A TUI based Invidious client
MIT License
189 stars 6 forks source link

Some keybinds don't work in mpv launched by invidtui #41

Open paulie-g opened 5 months ago

paulie-g commented 5 months ago

Config: latest Arch with invidtui from aur/invidtui-bin Steps to reproduce: play any video with 'V', try to exit the player with 'q' (default mpv keybind for 'quit'), nothing happens

NB: thanks for creating this project

darkhz commented 5 months ago

Some default keybindings are blocked in an invidtui-launched mpv instance, like the quit keybinding, since all standard keybindings are usually handled within invidtui itself. To quit MPV, currently, you would use 'Shift+Q' within invidtui.

This was done so that while MPV exits, for example, the main invidtui instance would handle it and exit too.

This could be changed, however, like maybe, modifying MPV to reflect whatever defaults are set in invidtui?

paulie-g commented 5 months ago

Some default keybindings are blocked in an invidtui-launched mpv instance, like the quit keybinding, since all standard keybindings are usually handled within invidtui itself. To quit MPV, currently, you would use 'Shift+Q' within invidtui.

Yeah, I gave the code a quick look and it's clear. For the 'play audio' use case this is indeed the desired behaviour. However, it's not ergonomic for the 'play video' use case, especially if invidtui is going to crash when mpv terminates.

darkhz commented 5 months ago

Agreed. The 'play audio' case has been tested more than the 'play video' case, so it seems. I will look into and optimize the 'play video' case as well.