diff options
author | wm4 <wm4@nowhere> | 2017-11-03 14:41:18 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-11-03 14:41:18 +0100 |
commit | 36630585f60813c5272de255c08e09d0436c2243 (patch) | |
tree | 786ac61e7bde9aabf58ce2c51b241d1dec799b58 | |
parent | 57248915fa636778c007561bb73cff23c4038ab9 (diff) | |
download | mpv-36630585f60813c5272de255c08e09d0436c2243.tar.bz2 mpv-36630585f60813c5272de255c08e09d0436c2243.tar.xz |
osc: make cycling visibility an input.conf key binding
As builtin script, it should not register global key bindings, and add
them to input.conf instead. This is similar to what stats.lua does.
-rw-r--r-- | etc/input.conf | 1 | ||||
-rw-r--r-- | player/lua/osc.lua | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/etc/input.conf b/etc/input.conf index 0b718032a4..130648cd50 100644 --- a/etc/input.conf +++ b/etc/input.conf @@ -142,6 +142,7 @@ #l ab-loop # Set/clear A-B loop points #L cycle-values loop-file "inf" "no" # toggle infinite looping #ctrl+c quit 4 +#DEL script-binding osc/visibility # cycle OSC display # Apple Remote section #AR_PLAY cycle pause diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 8591536937..6bd596ce25 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -2387,6 +2387,6 @@ end visibility_mode(user_opts.visibility, true) mp.register_script_message("osc-visibility", visibility_mode) -mp.add_key_binding("del", function() visibility_mode("cycle") end) +mp.add_key_binding(nil, "visibility", function() visibility_mode("cycle") end) set_virt_mouse_area(0, 0, 0, 0, "input") |