From b99dc17f8e9ec1ddc7b07743e175cf7d7ce86585 Mon Sep 17 00:00:00 2001 From: Ricardo Constantino Date: Sat, 8 Oct 2016 01:43:23 +0100 Subject: osc: add right-click behavior to playlist and chapter buttons --- DOCS/man/osc.rst | 4 ++++ player/lua/osc.lua | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/DOCS/man/osc.rst b/DOCS/man/osc.rst index b7723a86d3..6f8048125f 100644 --- a/DOCS/man/osc.rst +++ b/DOCS/man/osc.rst @@ -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 ============= ================================================ diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 150aa547dd..8b8ac9bd12 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -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() -- cgit v1.2.3