diff options
Diffstat (limited to 'mpv/scripts/file-browser/modules/defs/keybind.lua')
| -rw-r--r-- | mpv/scripts/file-browser/modules/defs/keybind.lua | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/mpv/scripts/file-browser/modules/defs/keybind.lua b/mpv/scripts/file-browser/modules/defs/keybind.lua new file mode 100644 index 0000000..a903d46 --- /dev/null +++ b/mpv/scripts/file-browser/modules/defs/keybind.lua @@ -0,0 +1,39 @@ +---@meta _ + +---@class KeybindFlags +---@field repeatable boolean? +---@field scalable boolean? +---@field complex boolean? + + +---@class KeybindCommandTable + + +---@class Keybind +---@field key string +---@field command KeybindCommand +---@field api_version string? +--- +---@field name string? +---@field condition string? +---@field flags KeybindFlags? +---@field filter ('file'|'dir')? +---@field parser string? +---@field multiselect boolean? +---@field multi-type ('repeat'|'concat')? +---@field delay number? +---@field concat-string string? +---@field passthrough boolean? +--- +---@field prev_key Keybind? The keybind that was previously set to the same key. +---@field codes Set<string>? Any substituation codes used by the command table. +---@field condition_codes Set<string>? Any substitution codes used by the condition string. +---@field addon boolean? Whether the keybind was created by an addon. + + +---@alias KeybindFunctionCallback async fun(keybind: Keybind, state: State, co: thread) + +---@alias KeybindCommand KeybindFunctionCallback|KeybindCommandTable[] +---@alias KeybindTuple [string,string,KeybindCommand,KeybindFlags?] +---@alias KeybindTupleStrict [string,string,KeybindFunctionCallback,KeybindFlags?] +---@alias KeybindList (Keybind|KeybindTuple)[] |
