1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-09 08:27:18 +00:00

osc: add right-click behavior to playlist and chapter buttons

This commit is contained in:
Ricardo Constantino 2016-10-08 01:43:23 +01:00
parent 8bb57c0387
commit b99dc17f8e
No known key found for this signature in database
GPG Key ID: EFD16019AE4FF531
2 changed files with 12 additions and 0 deletions

View File

@ -31,12 +31,14 @@ The Interface
pl prev
============= ================================================
left-click play previous file in playlist
right-click show playlist
shift+L-click show playlist
============= ================================================
pl next
============= ================================================
left-click play next file in playlist
right-click show playlist
shift+L-click show playlist
============= ================================================
@ -59,12 +61,14 @@ play
skip back
============= ================================================
left-click go to beginning of chapter / previous chapter
right-click show chapters
shift+L-click show chapters
============= ================================================
skip frwd
============= ================================================
left-click go to next chapter
right-click show chapters
shift+L-click show chapters
============= ================================================

View File

@ -1398,6 +1398,8 @@ function osc_init()
function () mp.commandv("playlist-prev", "weak") end
ne.eventresponder["shift+mouse_btn0_up"] =
function () show_message(mp.get_property_osd("playlist"), 3) end
ne.eventresponder["mouse_btn2_up"] =
function () show_message(mp.get_property_osd("playlist"), 3) end
--next
ne = new_element("pl_next", "button")
@ -1408,6 +1410,8 @@ function osc_init()
function () mp.commandv("playlist-next", "weak") end
ne.eventresponder["shift+mouse_btn0_up"] =
function () show_message(mp.get_property_osd("playlist"), 3) end
ne.eventresponder["mouse_btn2_up"] =
function () show_message(mp.get_property_osd("playlist"), 3) end
-- big buttons
@ -1458,6 +1462,8 @@ function osc_init()
function () mp.commandv("osd-msg", "add", "chapter", -1) end
ne.eventresponder["shift+mouse_btn0_up"] =
function () show_message(mp.get_property_osd("chapter-list"), 3) end
ne.eventresponder["mouse_btn2_up"] =
function () show_message(mp.get_property_osd("chapter-list"), 3) end
--ch_next
ne = new_element("ch_next", "button")
@ -1468,6 +1474,8 @@ function osc_init()
function () mp.commandv("osd-msg", "add", "chapter", 1) end
ne.eventresponder["shift+mouse_btn0_up"] =
function () show_message(mp.get_property_osd("chapter-list"), 3) end
ne.eventresponder["mouse_btn2_up"] =
function () show_message(mp.get_property_osd("chapter-list"), 3) end
--
update_tracklist()