Skip to content

Commit

Permalink
osc.lua: allow wheel bindings for custom buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
guidocella authored and kasper93 committed Feb 24, 2025
1 parent f561efe commit d8a79a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DOCS/man/osc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,12 @@ and ``topbar`` layouts.
custom_button_2_content=🔀
custom_button_2_mbtn_left_command=playlist-shuffle

custom_button_3_content=⏱
custom_button_3_mbtn_left_command=add speed 1
custom_button_3_mbtn_right_command=set speed 1
custom_button_3_wheel_up_command=add speed 0.25
custom_button_3_wheel_down_command=add speed -0.25

Script Commands
~~~~~~~~~~~~~~~

Expand Down
2 changes: 2 additions & 0 deletions player/lua/osc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ for i = 1, 99 do
user_opts["custom_button_" .. i .. "_mbtn_left_command"] = ""
user_opts["custom_button_" .. i .. "_mbtn_mid_command"] = ""
user_opts["custom_button_" .. i .. "_mbtn_right_command"] = ""
user_opts["custom_button_" .. i .. "_wheel_down_command"] = ""
user_opts["custom_button_" .. i .. "_wheel_up_command"] = ""
end

local icon_font = "mpv-osd-symbols"
Expand Down

0 comments on commit d8a79a1

Please sign in to comment.