{"id":2022,"date":"2010-07-19T00:29:50","date_gmt":"2010-07-19T05:29:50","guid":{"rendered":"http:\/\/blogs.terrorware.com\/geoff\/?p=2022"},"modified":"2010-07-22T15:01:31","modified_gmt":"2010-07-22T20:01:31","slug":"global-hotkeys-for-vlc","status":"publish","type":"post","link":"https:\/\/blogs.terrorware.com\/geoff\/2010\/07\/19\/global-hotkeys-for-vlc\/","title":{"rendered":"Global hotkeys for VLC"},"content":{"rendered":"<p>For reporting, I often need to fill in my notes with a recording I made of an interview.\u00a0 This means I need global hotkeys so I can start\/stop the player while I&#8217;m in my word processor or note-taking program (tomboy or zotero).<\/p>\n<p>VLC has native support for global hotkeys, but for whatever reason, I couldn&#8217;t get them to work to map &lt;ctrl&gt;+&lt;alt&gt;+&lt;space&gt; to play\/pause with Ubuntu 9.10.<\/p>\n<p>My workaround is based on <a title=\"Permanent link to VLC global hotkeys in Ubuntu with\u00a0Compiz\" rel=\"bookmark\" href=\"http:\/\/bryogenic.wordpress.com\/2009\/06\/10\/vlc-global-hotkeys-in-ubuntu-with-compiz\/\">VLC global hotkeys in Ubuntu with\u00a0Compiz<\/a>.  But, I use <a href=\"http:\/\/www.videolan.org\/doc\/play-howto\/en\/ch04.html#id501902\">VLC&#8217;s remote control interface<\/a> to control the player instead of the <a href=\"http:\/\/www.videolan.org\/doc\/play-howto\/en\/ch04.html#id501790\">HTTP interface<\/a> as suggested in the howto.<\/p>\n<ul>\n<li>Make sure netcat is installed.  We&#8217;ll use this to send controls to the remote control interface of VLC.\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ sudo apt-get install netcat<\/pre>\n<\/li>\n<li>Open up the CompizConfig:\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ ccsm <\/pre>\n<\/li>\n<li>Click the checkbox next to <em>Commands<\/em> and then click on <em>Commands<\/em><\/li>\n<li>In the <em>Commands<\/em> tab, type <em>echo &#8220;pause&#8221; | nc localhost 7777 -q 1<\/em> in the <em>Command line 0<\/em> field (or the first available field if you have other commands).  This command tells the play to toggle pausing the playback.<\/li>\n<li>In the <em>Commands<\/em> tab, type <em>echo &#8220;rewind&#8221; | nc localhost 7777 -q 1<\/em> in the <em>Command line 1<\/em> field (or the first available field if you have other commands).  This causes the player to rewind playback a few seconds.<\/li>\n<li>In the <em>Key Bindings<\/em> tab, click the <em>Disabled<\/em> button in the row labeled <em>Run command 0<\/em> (or whatever command you specified in the previous steps) and set the hotkey to whatever you want (I use &lt;ctrl&gt;+&lt;alt&gt;+&lt;space&gt;).<\/li>\n<li>Repeat the previous step for the rewind command (I used &lt;ctrl&gt;+&lt;super&gt;+&lt;left&gt; because &lt;ctrl&gt;+&lt;alt&gt;+&lt;left&gt; was a hotkey used by another program).<\/li>\n<li>Close CompizConfig.<\/li>\n<\/ul>\n<p>Then, if I run VLC with both the normal and remote control\u00a0 control interfaces, setting up the remote control interface on port 7777 on my local machine, my global hotkey will work:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ vlc --extraintf rc --rc-host localhost:7777<\/pre>\n<p>You might want to create an alias for running vlc with these options by editing ~\/.bash_aliases or ~\/.bashrc:<\/p>\n<pre>...\r\nalias vlctranscribe='vlc --extraintf rc --rc-host localhost:7777'\r\n...\r\n<\/pre>\n<p>I&#8217;m not quite sure how all the remote control commands work.\u00a0 For instance, I thought the <em>rewind<\/em> command would play backwards at the maximum rate, but instead it jumps playback back a few seconds.\u00a0 I thought the <em>fastforward<\/em> command would do the opposite of <em>rewind<\/em>, but instead it slows down playback incrementally.\u00a0 So, for now, I just have play\/pause and jump backwards hotkeys, but that&#8217;s enough to make transcribing interview recordings much, much easier.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For reporting, I often need to fill in my notes with a recording I made of an interview.\u00a0 This means I need global hotkeys so I can start\/stop the player while I&#8217;m in my word processor or note-taking program (tomboy or zotero). VLC has native support for global hotkeys, but for whatever reason, I couldn&#8217;t&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.terrorware.com\/geoff\/2010\/07\/19\/global-hotkeys-for-vlc\/\">Continue reading <span class=\"screen-reader-text\">Global hotkeys for VLC<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5,145],"tags":[20508,20507,285,20506,20505],"class_list":["post-2022","post","type-post","status-publish","format-standard","hentry","category-howto","category-technology","tag-global","tag-hotkey","tag-recipes","tag-transcribe","tag-vlc","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4wnIz-wC","_links":{"self":[{"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/2022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/comments?post=2022"}],"version-history":[{"count":4,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/2022\/revisions"}],"predecessor-version":[{"id":2024,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/2022\/revisions\/2024"}],"wp:attachment":[{"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/media?parent=2022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/categories?post=2022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/tags?post=2022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}