General Computing
gnu-screen key-binding irssi keyboard-navigation
Updated Sat, 21 May 2022 03:44:01 GMT

irssi keybinding: backward_word/forward_word

I'm currently experimenting with irssi as my irc client of choice and I'm getting along pretty well.

BUT there is one thing I still need to get done. Somehow it isn't possible for me to use the usual CTRL+Left/Right to navigate between words in my input line.

For the record: I'm using irssi on a linux-box through a screen session brought to my windows machine via ssh/putty.

I already tried some key binding in irssi, maybe I did them wrong?

/bind meta-n backward_word
/bind meta-m forward_word

both work fine. But neither

/bind ^left backward_word
/bind ^right backward_word


/bind cleft-left backward_word
/bind cleft-right backward_word

work for a CTRL+Left/Right setup.

Any Ideas?


First: perhaps Shift+ and Shift+ work as substitutes.

But for the problem in hand: it's most probably some input anomaly, where some part of the chain is not really aware of what "language" others are talking. With PuTTY in the mix, this is not unexpected.

A practical way to solve it:

  1. Issue cat in a terminal without arguments and press Ctrl+.
  2. Paste the entire keycode that occurs (^[Od in my case but most probably something else for you since it doesn't work by default) into the irssi bind command:

    /bind yourkeycode backward_word

Now it should work. If not, make sure the binding isn't trumped by any else by issuing /bind and see if there are multiple entries.

I use the exact way described above in binding Ctrl+PgUp and Ctrl+PgDn to scroll an external nick list in irssi.

Comments (5)

  • +0 – I noticed that, inside screen, the sequences displayed by cat are the same for Ctrl + and . So I guess screen kills the control sequence. I'm going to use Alt + now, that still works. Thank you for the hint with cat. — Nov 28, 2012 at 12:07  
  • +0 – @vikenemesh: Ah, yes, if separate key codes are not sent, then it is not possible to fix it within irssi. Perhaps there is some PuTTY setting that could help you to make it send meta character combinations correctly, though, but that's another question. Good of you to notice it. — Nov 28, 2012 at 13:27  
  • +0 – PuTTy itself transmitts everything I need, I checked that. Screen seems to eat all Ctrl Sequences, because it can be controlled by them. — Nov 28, 2012 at 19:05  
  • +0 – @vikenemesh: Yes, screen is also a known key code eater (I missed that part of the question). Setting the correct TERM values throughout usually fixes this, somewhat. You should at least be able to make something come through, even though it might not be directly recognized by irssi. Don't give up just yet :-) — Nov 29, 2012 at 09:06  
  • +0 – I'm getting back to this if the annoyance will be unbearable, thx. — Nov 29, 2012 at 17:40