From ccb87ad6374c69beb7e88357003bb13cb427a6ee Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Wed, 21 Jul 2021 08:13:23 +0200 Subject: stats.lua: remove script-opts for the main keys (i/I) Unlike the page switching/scrolling keys which are bound at runtime and therefore we need to know which (configured) keys to bind, the main keys (i/I by default) are static and can be bound via input.conf. And indeed, the builtin bindings at etc/input.conf have them already. --- player/lua/stats.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'player') diff --git a/player/lua/stats.lua b/player/lua/stats.lua index a5871822b7..a764ebdbdf 100644 --- a/player/lua/stats.lua +++ b/player/lua/stats.lua @@ -13,8 +13,6 @@ local utils = require 'mp.utils' -- Options local o = { -- Default key bindings - key_oneshot = "i", - key_toggle = "I", key_page_1 = "1", key_page_2 = "2", key_page_3 = "3", @@ -1125,11 +1123,11 @@ display_timer = mp.add_periodic_timer(o.duration, display_timer:kill() -- Single invocation key binding -mp.add_key_binding(o.key_oneshot, "display-stats", function() process_key_binding(true) end, +mp.add_key_binding(nil, "display-stats", function() process_key_binding(true) end, {repeatable=true}) -- Toggling key binding -mp.add_key_binding(o.key_toggle, "display-stats-toggle", function() process_key_binding(false) end, +mp.add_key_binding(nil, "display-stats-toggle", function() process_key_binding(false) end, {repeatable=false}) -- Single invocation bindings without key, can be used in input.conf to create -- cgit v1.2.3