Bind tmux prefix to section symbol §

Bind tmux prefix to section symbol §

I usually use the backtick key as my prefix, but this keyboard has the section/stanza symbol § where the backtick usually (at least, for me in the UK) is.

If I bind to this key, quoted or unquoted, tmux complains that it's an invalid symbol.

If I run cat and press the § key, it prints §.

I'm on Mac, using Terminal.app, and if I open the "key/modifier/action" preferences (i.e. to set § key + no modifier = send some text other than §, even C-b say) and press § while in the 'key' drop-down it selects 'arrow-left', as if that's what I'd pressed.

However if I press it in the 'send text' box, it writes § whereas 'arrow-left' is escaped for navigation, and writes nothing (and is mapped to \033[1;5D).

I think maybe its code is just close to arrow-left, hence it selects that in the finite choice drop-down. But since it cats to 'itself' I'm not sure how else to make tmux recognise it?

答案1

Ah - I didn't intend to answer my own, but I just found a good enough solution for me.

Since I never need the § key anyway, and I use backticks a fair bit - marking code here for example! - I just used 'Karabiner' (download .dmg from linked page, or brew cask install karabiner) to remap that key.

Then simply used my standard .tmux.conf with backtick prefix.

Not exactly an answer, but if like me you don't need (or care about it being in that position) § anyway, it works.

相关内容