summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorRicardo Constantino <wiiaboo@gmail.com>2016-10-08 01:43:23 +0100
committerRicardo Constantino <wiiaboo@gmail.com>2016-10-15 12:24:01 +0100
commitb99dc17f8e9ec1ddc7b07743e175cf7d7ce86585 (patch)
treed322a2af4d0fa78e183b8e6cd1fd5e2a4d1138d2 /player
parent8bb57c038799da39e72491888d0fc19beb493d62 (diff)
downloadmpv-b99dc17f8e9ec1ddc7b07743e175cf7d7ce86585.tar.bz2
mpv-b99dc17f8e9ec1ddc7b07743e175cf7d7ce86585.tar.xz
osc: add right-click behavior to playlist and chapter buttons
Diffstat (limited to 'player')
-rw-r--r--player/lua/osc.lua8
1 files changed, 8 insertions, 0 deletions
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()