I am trying to understand the way for generating the hex code sequence for keyboard key combinations. So I can use those to send specific keys to a vim session running inside tmux which is inside iTerm2 through the "Send Hex Code" functionality of iTerm2. However, this is becoming extremely confusing.
I have started with this article: iTerm2 keymaps for tmux
So, as a constant and as a starting point I know that CTRL-b
can be represented as a hex code of 0x02
.
I have tested that, and it works, when I map this to any random key in iTerm2, I can see that it is sent to tmux as CTRL-b
But how do I know the hex code of other key combinations, for example what is the hex code for SHIFT-F10? or CTRL-F5? or CTRL-m-Space?
I have asked another question related to this question here: Key escape sequences not working for tmux