Commit 4468f686 authored by Antoine Cellerier's avatar Antoine Cellerier

Fix rc hotkey command.

(accepts full hotkey names or hotkey names without the leading key-)
parent 469613e2
...@@ -446,6 +446,14 @@ function menu(name,client,value) ...@@ -446,6 +446,14 @@ function menu(name,client,value)
end end
end end
function hotkey(name, client, value)
if not value then
client:append("Please specify a hotkey (ie key-quit or quit)")
elseif not common.hotkey(value) and not common.hotkey("key-"..value) then
client:append("Unknown hotkey '"..value.."'")
end
end
function eval(client,val) function eval(client,val)
client:append(tostring(loadstring("return "..val)())) client:append(tostring(loadstring("return "..val)()))
end end
...@@ -507,7 +515,7 @@ commands_ordered = { ...@@ -507,7 +515,7 @@ commands_ordered = {
{ "vzoom"; { func = skip(listvalue("vout","zoom")); args = "[X]"; help = "set/get video zoom"; aliases = { "zoom" } } }; { "vzoom"; { func = skip(listvalue("vout","zoom")); args = "[X]"; help = "set/get video zoom"; aliases = { "zoom" } } };
{ "snapshot"; { func = common.snapshot; help = "take video snapshot" } }; { "snapshot"; { func = common.snapshot; help = "take video snapshot" } };
{ "strack"; { func = skip(listvalue("input","spu-es")); args = "[X]"; help = "set/get subtitles track" } }; { "strack"; { func = skip(listvalue("input","spu-es")); args = "[X]"; help = "set/get subtitles track" } };
{ "hotkey"; { func = skip(common.hotkey); args = "[hotkey name]"; help = "simulate hotkey press"; adv = true; aliases = { "key" } } }; { "hotkey"; { func = hotkey; args = "[hotkey name]"; help = "simulate hotkey press"; adv = true; aliases = { "key" } } };
{ "menu"; { func = menu; args = "[on|off|up|down|left|right|select]"; help = "use menu"; adv = true } }; { "menu"; { func = menu; args = "[on|off|up|down|left|right|select]"; help = "use menu"; adv = true } };
{ "" }; { "" };
{ "set"; { func = set_env; args = "[var [value]]"; help = "set/get env var"; adv = true } }; { "set"; { func = set_env; args = "[var [value]]"; help = "set/get env var"; adv = true } };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment