2

Playing around with uemacs I noticed that some of the default alternative key bindings are set to the Fn key in combination with a different key (for example, an alternative for 'help' is set to FNh, i.e. press Fn+h). From what I know, using the Fn key as a meta key is not possible (since doing the command xev and pressing Fn does not generate any keycode). Is there a work around for using Fn in uemacs?

jimmij
  • 46,064
  • 19
  • 123
  • 136
chimil
  • 51
  • 1
  • 6

1 Answers1

2

OP is likely referring to

Referring to the source (on github, since it is easily linked and not much changed from the import):

  • emacs.rc has bindings like this:

    bind-to-key help FN;

    which use FN as an internal name, e.g.,

  • bind.c in functions cmdstr and stock translates that from/to the mask value SPEC (special key).

  • uemacs only knows about terminals (no X), so xev is irrelevant

  • uemacs detects special keys when you type them into a terminal because they are escape sequences. In particular, those which begin with CSI, e.g., escape[ tell it to mark those with SPEC.
  • It does this in input.c function getcmd by ORing the SPEC flag with the final character of the escape sequence which it read. For instance, a cursor up-arrow would be escape[A.
  • in ebind.h, that corresponds to the backline function.

So there is no literal "FN" used for a key-binding, nor is the special key FN used (which you may find on various small keyboards, e.g., laptops). It is used only to make the bindings more readable.

Further reading:

Thomas Dickey
  • 75,040
  • 9
  • 171
  • 268