Use Scroll Lock key for terminal flow control

keyboard shortcutsscrollingterminal

So, my Scroll Lock key doesn't have much use, while I keep hitting Ctrl+S with no intention of stopping control flow.

I know how to disable Ctrl+S from locking scroll (stty -ixon), but can I use Scroll Lock key instead for the same use?

– UPDATE –

In my terminal Scroll Lock does not stop control flow. My question is how to assign that function to that key.

Best Answer

Use stty stop undef and stty start undef. This way, C-s and C-q are being freed for other purposes, but ScrLock still controls flow.

This might be shell and/or terminal-specific, though.

Related Question