Holding down Control to enter multiple Control-modified keys is fairly standard. I am not sure if there is any kind of standard that controls what a terminal will send when you hold Control+A while also typing Control+N. The ones I tried are all consistent though: once I press N they all act as if I had released A (if ^A was auto-repeating, it stops; if I continue to hold ^N, then it starts to auto-repeat).
If the terminal under which you run tmux works similarly to the ones I tried, then you could use this (in your .tmux.conf
, or directly in tmux after (your prefix) then :):
bind-key -r ^N next-window
The -r
gives you 500ms (default, can be changed with the repeat-time
session option) to press the key again (really, any -r
flagged, “repeatable” key) without having to press the prefix key again: type your prefix key once, (release it, or not, depending on your terminal), then type any number of “repeatable” keys (as long as they are all within the configured timeout).
If you find yourself releasing both of Control and A, then you might also want to make plain N repeatable (via bind-key -r n next-window
) so that both the plain and Control-modified versions are repeatable.