fix: restore subtitle playback keybindings

This commit is contained in:
2026-05-03 23:52:07 -07:00
parent 745996c72d
commit 8342fa0c0e
14 changed files with 183 additions and 22 deletions
+17 -3
View File
@@ -96,16 +96,30 @@ function M.create(ctx)
return nil
end
local shifted_letter = key.code:match("^Key([A-Z])$")
local has_shift = false
for _, modifier in ipairs(key.modifiers) do
if modifier == "shift" then
has_shift = true
break
end
end
local key_name = key_code_to_mpv_name(key.code)
if shifted_letter and has_shift then
key_name = shifted_letter
end
if not key_name then
return nil
end
local parts = {}
for _, modifier in ipairs(key.modifiers) do
local mapped = MODIFIER_MAP[modifier]
if mapped then
parts[#parts + 1] = mapped
if not (modifier == "shift" and shifted_letter) then
local mapped = MODIFIER_MAP[modifier]
if mapped then
parts[#parts + 1] = mapped
end
end
end
parts[#parts + 1] = key_name