Discussion:
Readline / CTRL-s / flow control
Richard Michael
2011-09-02 20:00:13 UTC
Permalink
Hello everyone,

Should I expect CTRL-s / CTRL-q to stop/start (XOFF/XON) in iTerm2
Build 1.0.0.20110828? I've tried setting it to xterm and linux
terminal types.

(I'm actually trying to use readline's forward-history-search.
Readline believes it to be bound to CTRL-s. Which is normally also
XOFF, of course, so I'd expect a problem. However, CTRL-s is actually
doing "nothing" apparent. So I'm stumped about what's eating my CTRL-
s.)


Regards,
Richard
Tom Feist
2011-09-02 22:17:25 UTC
Permalink
Post by Richard Michael
Hello everyone,
Should I expect CTRL-s / CTRL-q to stop/start (XOFF/XON) in iTerm2
Build 1.0.0.20110828? I've tried setting it to xterm and linux
terminal types.
(I'm actually trying to use readline's forward-history-search.
Readline believes it to be bound to CTRL-s. Which is normally also
XOFF, of course, so I'd expect a problem. However, CTRL-s is actually
doing "nothing" apparent. So I'm stumped about what's eating my CTRL-
s.)
Regards,
Richard
Hey,

It appears that iTerm is just ignoring the keystrokes when the tty is expecting
software flow control.
"stty -ixon" in your shell startup scripts (or manually, I suppose)
should work, or at least does for me.

Hope that helps,

Tom.
George Nachman
2011-09-02 23:16:49 UTC
Permalink
iTerm2 enables XON by default, which is purely a historical thing from iTerm
0.x. As you found, it's easy to change in your login script, but does anyone
out there in iTerm2land want XON? Speak up if you love it!
Post by Tom Feist
Post by Richard Michael
Hello everyone,
Should I expect CTRL-s / CTRL-q to stop/start (XOFF/XON) in iTerm2
Build 1.0.0.20110828? I've tried setting it to xterm and linux
terminal types.
(I'm actually trying to use readline's forward-history-search.
Readline believes it to be bound to CTRL-s. Which is normally also
XOFF, of course, so I'd expect a problem. However, CTRL-s is actually
doing "nothing" apparent. So I'm stumped about what's eating my CTRL-
s.)
Regards,
Richard
Hey,
It appears that iTerm is just ignoring the keystrokes when the tty is expecting
software flow control.
"stty -ixon" in your shell startup scripts (or manually, I suppose)
should work, or at least does for me.
Hope that helps,
Tom.
Richard Michael
2011-09-03 15:29:25 UTC
Permalink
For my part, I never use START/STOP on the terminal. It's usually
more of an inconvenience for me, in fact - keymashing while typing too
quickly. :-)

Do I understand correctly that because iTerm2 sets "ixon", it
dutifully consumes CTRL-s, but actually does nothing (it does not stop
the terminal). If I turn off output control (-ixon), iTerm2 ignores
CTRL-s, which then makes it through to readline.


Regards,
Richard
Post by George Nachman
iTerm2 enables XON by default, which is purely a historical thing from iTerm
0.x. As you found, it's easy to change in your login script, but does anyone
out there in iTerm2land want XON? Speak up if you love it!
Post by Tom Feist
Post by Richard Michael
Hello everyone,
Should I expect CTRL-s / CTRL-q to stop/start (XOFF/XON) in iTerm2
Build 1.0.0.20110828?  I've tried setting it to xterm and linux
terminal types.
(I'm actually trying to use readline's forward-history-search.
Readline believes it to be bound to CTRL-s.  Which is normally also
XOFF, of course, so I'd expect a problem.  However, CTRL-s is actually
doing "nothing" apparent.  So I'm stumped about what's eating my CTRL-
s.)
Regards,
Richard
Hey,
It appears that iTerm is just ignoring the keystrokes when the tty is expecting
software flow control.
"stty -ixon" in your shell startup scripts (or manually, I suppose)
should work, or at least does for me.
Hope that helps,
Tom.
George Nachman
2011-09-03 21:56:16 UTC
Permalink
Post by Richard Michael
Do I understand correctly that because iTerm2 sets "ixon", it
dutifully consumes CTRL-s, but actually does nothing (it does not stop
the terminal). If I turn off output control (-ixon), iTerm2 ignores
CTRL-s, which then makes it through to readline.
Iterm2 passes c-s through always, but the xon status affects how the OS handles it.
Post by Richard Michael
Regards,
Richard
Post by George Nachman
iTerm2 enables XON by default, which is purely a historical thing from iTerm
0.x. As you found, it's easy to change in your login script, but does anyone
out there in iTerm2land want XON? Speak up if you love it!
Post by Tom Feist
Post by Richard Michael
Hello everyone,
Should I expect CTRL-s / CTRL-q to stop/start (XOFF/XON) in iTerm2
Build 1.0.0.20110828? I've tried setting it to xterm and linux
terminal types.
(I'm actually trying to use readline's forward-history-search.
Readline believes it to be bound to CTRL-s. Which is normally also
XOFF, of course, so I'd expect a problem. However, CTRL-s is actually
doing "nothing" apparent. So I'm stumped about what's eating my CTRL-
s.)
Regards,
Richard
Hey,
It appears that iTerm is just ignoring the keystrokes when the tty is expecting
software flow control.
"stty -ixon" in your shell startup scripts (or manually, I suppose)
should work, or at least does for me.
Hope that helps,
Tom.
Richard Michael
2011-09-03 15:23:08 UTC
Permalink
Post by Tom Feist
Post by Richard Michael
Hello everyone,
Should I expect CTRL-s / CTRL-q to stop/start (XOFF/XON) in iTerm2
Build 1.0.0.20110828?  I've tried setting it to xterm and linux
terminal types.
(I'm actually trying to use readline's forward-history-search.
Readline believes it to be bound to CTRL-s.  Which is normally also
XOFF, of course, so I'd expect a problem.  However, CTRL-s is actually
doing "nothing" apparent.  So I'm stumped about what's eating my CTRL-
s.)
Regards,
Richard
Hey,
It appears that iTerm is just ignoring the keystrokes when the tty is expecting
software flow control.
"stty -ixon" in your shell startup scripts (or manually, I suppose)
should work, or at least does for me.
Hope that helps,
Tom.
Indeed it does, thanks Tom. CTRL-s now makes it to readline.

Regards,
Richard
Loading...