Is it possible to make emacs interpet an fn key as a modifier key? Can I bind f6, f.ex. to hyper?
I had this:
(setq ns-function-modifier 'hyper) ; set Mac's Fn key to type Hype
And tried to do this:
(setq <f6> 'hyper)
But the latter did not work.
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).
Edit: It seems like one possible solution is to bind f9
to C-x @ h
but when I try to get the documentation for the function C-x @
or C-x @ h
I don't get any result. (It only shows a documentation for the function if I actually do a command and then notes that h-x
was "translated" from C-x @ h x
. So if there's some way to bind C-x @ h
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.
http://www.gnu.org/software/emacs/manual/html_node/emacs/Modifier-Keys.html
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.)