mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Replace default mpv "quit" keybindings with "stop"
https://github.com/mpv-player/mpv/blob/master/etc/input.conf
This commit is contained in:
parent
39af3d327f
commit
ae533fce71
1 changed files with 8 additions and 0 deletions
|
@ -333,6 +333,14 @@ class MpvManager(MPV, SoundOrVideoPlayer):
|
||||||
self._on_done: Optional[OnDoneCallback] = None
|
self._on_done: Optional[OnDoneCallback] = None
|
||||||
self.default_argv += ["--config-dir=" + base_path]
|
self.default_argv += ["--config-dir=" + base_path]
|
||||||
super().__init__(window_id=None, debug=False)
|
super().__init__(window_id=None, debug=False)
|
||||||
|
self.init()
|
||||||
|
|
||||||
|
def init(self) -> None:
|
||||||
|
self.command("keybind", "q", "stop")
|
||||||
|
self.command("keybind", "Q", "stop")
|
||||||
|
self.command("keybind", "CLOSE_WIN", "stop")
|
||||||
|
self.command("keybind", "ctrl+w", "stop")
|
||||||
|
self.command("keybind", "ctrl+c", "stop")
|
||||||
|
|
||||||
def play(self, tag: AVTag, on_done: OnDoneCallback) -> None:
|
def play(self, tag: AVTag, on_done: OnDoneCallback) -> None:
|
||||||
assert isinstance(tag, SoundOrVideoTag)
|
assert isinstance(tag, SoundOrVideoTag)
|
||||||
|
|
Loading…
Reference in a new issue