In Karabiner I binded my F21 to a different key on my keyboard and it is not registered in Emacs.
I see the keycode f21 when I press it in Karabiner EventViewer as you can see here: [https://i.imgur.com/ELylaKn.png](https://i.imgur.com/ELylaKn.png)
I have tried f22 as well. Doesn't work.
In Emacs I cannot make it run, e.g. this doesn't work:
(global-set-key
(kbd "<f21> t")
(lambda ()
(interactive)
(find-file "~/Documents/test.txt")))
But this does work:
(global-set-key
(kbd "<f15> t")
(lambda ()
(interactive)
(find-file "~/Documents/test.txt")))
Also, the f20 triggers C-p or something but that is some Menu key issue with macOS so I will just don't use that like that.
But I would really like to use f21 - f24 or even higher as I am planning to purchasing X-keys programmable keypad and would like to use it with Emacs.
Thanks for any advice how to make the function keys about 20 work in Emacs on macOS.
UPDATE:
I made this video where on the right you can see Karabiner EventViewer showing the key code f21 when Emacs shows nothing. At the end I included the log of pressed keys (C-h l) as well:
[https://i.imgur.com/iCHyFkP.mp4](https://i.imgur.com/iCHyFkP.mp4)