title: how to get the arrow keys on the keyboard to trigger navigation (previous/next page) links within a blog
body: <p>the script i've pieced together so far looks like this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  /* KEYNAV */
  document.onkeydown = function(e) {
  if (! e) var e = window.event;
  var code = e.charCode ? e.charCode : e.keyCode;
  if (! e.shiftKey &amp;&amp; ! e.ctrlKey &amp;&amp; ! e.altKey &amp;&amp; ! e.metaKey) {
  if (code == Event.KEY_LEFT) {
  if ($('previous_page_link')) location.href = $('previous_page_link').href;
  } else if (code == Event.KEY_RIGHT) {
  if ($('next_page_link')) location.href = $('next_page_link').href;}
  }
  }); 
  &lt;/script&gt;
  </code></pre>
  
  <p>and my html looks like this:</p>
  
  <pre><code>&lt;p&gt;
  {block:PreviousPage}
  &lt;a id="previous_page_link" href="{PreviousPage}"&gt;PREVIOUS PAGE&lt;/a&gt; 
  {/block:PreviousPage}
  
  {block:NextPage}
  &lt;a id="next_page_link" href="{NextPage}"&gt;NEXT PAGE&lt;/a&gt;
  {/block:NextPage}
  &lt;/p&gt;
  </code></pre>
  
  <p>the {PreviousPage} / {NextPage} code represents dynamic page links which are different depending on which page you are on. this particular question is specific to tumblr, but generally as well:</p>
  
  <p>is there a way to get my left and right arrow keys to trigger these dynamic links?</p>
  
  <p>thank you for reading and any help with this is greatly appreciated.</p>