Why does F4 not work in MacOS X (Touchbar macBook, or macBook Air)? I'm using iterm2 together with tmux and I need the function keys. Ever since I got the TouchBar Macbook Pro and upgraded to HighSierra, the F4 key became disfunctional in iTerm2 and emacs.


The F4 key is used to cycle through the open tabs in tmux forwards
The F3 key (cycle backwards) and in fact all other F keys work as expected
The F4 key worked before the HighSierra / Touchbar upgrade.  I used Time Machine to migrate, so no configuration changed.
The F4 also does not work with on an external Magic Keyboard, indicating a software / mapping issue.


I suspect that some change in High Sierra makes macOS not pass the F4 key on to applications, but I'm not sure.  I have checked that no system wide keyboard shortcut is assigned to F4. What else could I check?

Update: The issue can be confirmed with the keyboard viewer, a program that allows to display all keys pressed. It clearly confirms that all keys except F4 are registered by the system while F4 is not.
I have seen elsewhere that some key combos stop working until you reinstall iTerm2. If you have homebrew and cask installed, you can use brew cask reinstall iterm2.

(I'm so unsure about the efficacy of this that I would have posted it as a comment, but I can't comment yet)