]> git.sesse.net Git - vlc/commitdiff
Add "key" (or "hotkey") command in RC to simulate a hotkey press. Original idea by...
authorAntoine Cellerier <dionoea@videolan.org>
Fri, 9 Feb 2007 23:51:34 +0000 (23:51 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Fri, 9 Feb 2007 23:51:34 +0000 (23:51 +0000)
modules/control/rc.c

index 456d49c0778f36bf9752711ff1a2ecff6c030786..4f1d26c1c2c1f1249fd361b4fb8c0f9323f47da0 100644 (file)
@@ -752,6 +752,11 @@ static void Run( intf_thread_t *p_intf )
         {
             checkUpdates( p_intf, psz_arg );
         }
+        else if( !strcmp( psz_cmd, "key" ) || !strcmp( psz_cmd, "hotkey" ) )
+        {
+            var_SetInteger( p_intf->p_libvlc, "key-pressed",
+                            config_GetInt( p_intf, psz_arg ) );
+        }
         else switch( psz_cmd[0] )
         {
         case 'f':
@@ -878,6 +883,7 @@ static void Help( intf_thread_t *p_intf, vlc_bool_t b_longhelp)
     msg_rc(_("| vcrop [X]  . . . . . . . . .  set/get video crop"));
     msg_rc(_("| vzoom [X]  . . . . . . . . .  set/get video zoom"));
     msg_rc(_("| strack [X] . . . . . . . set/get subtitles track"));
+    msg_rc(_("| key [hotkey name]  . . . . simulate hotkey press"));
     msg_rc(_("| menu [on|off|up|down|left|right|select] use menu"));
     msg_rc(  "| ");