title: Is it possible to make emacs interpet an fn key as a modifier key?
body: <p>Is it possible to make emacs interpet an fn key as a modifier key? Can I bind f6, f.ex. to hyper?</p>
  
  <p>I had this:</p>
  
  <pre><code>(setq ns-function-modifier 'hyper) ; set Mac's Fn key to type Hype
  </code></pre>
  
  <p>And tried to do this:</p>
  
  <pre><code>(setq &lt;f6&gt; 'hyper)
  </code></pre>
  
  <p>But the latter did not work.</p>
  
  <p>I'd prefer not making the OS as a whole see f9 as some sort of modifier key (making it possible to more easily use the function keys for different purposes in other apps).</p>
  
  <p>Edit: It seems like one possible solution is to bind <code>f9</code> to <code>C-x @ h</code> but when I try to get the documentation for the function <code>C-x @</code> or <code>C-x @ h</code> I don't get any result. (It only shows a documentation for the function if I actually do a command and then notes that <code>h-x</code> was "translated" from <code>C-x @ h x</code>. So if there's some way to bind <code>C-x @ h</code>to a key via a function (I guess a macro could work, but I prefer using elisp when possible) I suppose that would solve my problem.</p>
  
  <p><a href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Modifier-Keys.html" rel="noreferrer">http://www.gnu.org/software/emacs/manual/html_node/emacs/Modifier-Keys.html</a></p>
  
  <blockquote>
    <p>Even if your keyboard lacks these additional modifier keys, you can
    enter it using C-x @: C-x @ h adds the “hyper” flag to the next
    character, C-x @ s adds the “super” flag, and C-x @ a adds the “alt”
    flag. For instance, C-x @ h C-a is a way to enter Hyper-Control-a.
    (Unfortunately, there is no way to add two modifiers by using C-x @
    twice for the same character, because the first one goes to work on
    the C-x.)</p>
  </blockquote>