Skip to content

Commit f147b13

Browse files
guidocellakasper93
authored andcommitted
select.lua: add online documentation menu entry
1 parent 7c1a4ac commit f147b13

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

DOCS/man/select.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ Available script bindings are:
135135
Open ``input.conf`` in the system text editor, creating it if it doesn't
136136
already exist.
137137

138+
``open-docs``
139+
Open mpv's online documentation in the browser.
140+
138141
``menu``
139142
Show a menu with miscellaneous entries.
140143

player/lua/select.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,10 @@ mp.add_key_binding(nil, "edit-input-conf", function ()
678678
edit_config_file("input.conf")
679679
end)
680680

681+
mp.add_key_binding(nil, "open-docs", function ()
682+
system_open("https://mpv.io/manual/")
683+
end)
684+
681685
mp.add_key_binding(nil, "menu", function ()
682686
local sub_track_count = 0
683687
local audio_track_count = 0
@@ -721,6 +725,7 @@ mp.add_key_binding(nil, "menu", function ()
721725
{"Edit config file", "script-binding select/edit-config-file", true},
722726
{"Edit key bindings", "script-binding select/edit-input-conf", true},
723727
{"Help", "script-binding stats/display-page-4-toggle", true},
728+
{"Online documentation", "script-binding select/open-docs", true},
724729
}
725730

726731
local labels = {}

0 commit comments

Comments
 (0)