[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Disabling the CTRL+S -> Scroll Lock binding in terminals



OK, I'd like to summarize this stuff too:

On Mon, 26 May 1997, Alex Shnitman wrote:

> > I noticed that in my Linux (a RedHat 4.1, with possible remnants from
> RH 4.0) pressing CTRL+S is similiar to pressing the Scroll Lock button.
> This binding occurs whether in a virtual terminal or an xterm program.
> Yet, other X programs (such as nedit) may interpret CTRL+S as something else.

> > Does anybody knows of any way with which I can cancel this binding?
> 
> I don't know how to cancel it but it has been already mentioned here not a
> long ago that Ctrl-Q unlocks the keyboard after Ctrl-S locked it. Ctrl-Q
> works in an xterm as well.

My dear newbies! there is a thing called "flow control". before the days
of modems and RS232B, where RTS/CTS takes reign, there was only "software
Flow Control" which is XOff (^S) and XOn (^Q). 'nuff said, READ THE
FAQS!!!

---------------------------------------------------------------------------------------------------------
Well, as Ira mentioned the ^S/^Q stuff is the software flow control that is by default enabled for every terminal on a UNIX machine (virtual consoles, xterm windows, telnet sessions, etc.). 

I don't know what are the FAQs that Ira refers to, but after browsing through the man pages I found that the stty command (probably "setup TTY") is responsible for setting various terminal parameters. With GNU stty that comes with Linux, I think that typing:
# stty -ixon
at the shell disables the soft flow control. After that the ^S/^Q will act as regular key strokes. Check the stty (1) man page for more details. I didn't check it but it might also disable the Scroll-Lock functionality for virtual consoles. 

BTW, Ira, to what FAQs, exactly, are you referring to?

	Shlomi Fish