[vlc-devel] commit: Fix rc hotkey command. (Antoine Cellerier )
git version control
git at videolan.org
Sun Dec 27 23:19:46 CET 2009
vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Sun Dec 27 22:04:10 2009 +0100| [4468f68613128ecf695a25b9821426de74d6caa7] | committer: Antoine Cellerier
Fix rc hotkey command.
(accepts full hotkey names or hotkey names without the leading key-)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4468f68613128ecf695a25b9821426de74d6caa7
---
share/lua/intf/rc.lua | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/share/lua/intf/rc.lua b/share/lua/intf/rc.lua
index ff75eb4..21a1040 100644
--- a/share/lua/intf/rc.lua
+++ b/share/lua/intf/rc.lua
@@ -446,6 +446,14 @@ function menu(name,client,value)
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)
client:append(tostring(loadstring("return "..val)()))
end
@@ -507,7 +515,7 @@ commands_ordered = {
{ "vzoom"; { func = skip(listvalue("vout","zoom")); args = "[X]"; help = "set/get video zoom"; aliases = { "zoom" } } };
{ "snapshot"; { func = common.snapshot; help = "take video snapshot" } };
{ "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 } };
{ "" };
{ "set"; { func = set_env; args = "[var [value]]"; help = "set/get env var"; adv = true } };
More information about the vlc-devel
mailing list