Closed natural-harmonia-gropius closed 2 years ago
example.lua
local utils = require("mp.utils") local key = "c" local on = { click = "show-text click", penta_click = "show-text penta-click", quatra_click = "show-text quatra-click", double_click = "show-text double-click", triple_click = "show-text triple-click", press = "show-text pressed", release = "show-text released", } function bind() local json, err = utils.format_json(on) mp.commandv('script-message-to', 'inputevent', 'bind', key, json) end function unbind() mp.commandv('script-message-to', 'inputevent', 'unbind', key) end mp.add_forced_key_binding("z", "test-z", bind) mp.add_forced_key_binding("x", "test-x", unbind)
fixed by https://github.com/Natural-Harmonia-Gropius/InputEvent/commit/18173db2296ba436fc62bee4d9130a1d6d00796f
example.lua