0

I have tried the following:

(keyboard-translate ?\C-I (kbd "<f8>"))
(keyboard-translate ?\C-I [(f8)])

The representation of F8 key is wrong.

Drew
  • 75,699
  • 9
  • 109
  • 225
godblessfq
  • 1,177
  • 8
  • 21

1 Answers1

1

keyboard-translate takes character arguments, and (kbd "<f8>") does not evaluate to a character.

Try this:

(define-key key-translation-map (kbd "C-i") (kbd "<f8>"))

but take note! C-i is the same thing as TAB, so this also makes the TAB key act as F8.

In GUI frames you can use bindings for <tab> which is independent of TAB; but for cross-terminal compatibility anything binding the TAB key will normally use TAB and leave it to the default translation of <tab> => TAB to make GUI and text terminals behave the same way. So if you don't want your TAB key to act as F8 you probably need to introduce a bunch of new bindings for <tab> (and then only use GUI frames).

phils
  • 48,657
  • 3
  • 76
  • 115