Where can I find a complete list of the keyboard combinations which send signals in Linux?
Eg:
- Ctrl+C - SIGINT
- Ctrl+\ - SIGQUIT
The Linux N_TTY line discipline only sends three different signals: SIGINT, SIGQUIT, and SIGTSTP. By default the following control characters produce the signals:
man stty | grep -C1 signal
is one source for these three being the only signals generated by the terminal.
SIGINT
, SIGQUIT
and SIGTSTP
are the only "usual" signals sent by the line discipline. On BSD you also have things like SIGINFO
, but that's not standard.
Commented
May 2, 2017 at 10:12
You can use stty
to check or change the characters that generate signals.
$ stty -a | grep -Ewoe '(intr|quit|susp) = [^;]+'
intr = ^C
quit = ^\
susp = ^Z
intr
(interrupt) generates SIGINT
, quit
generates SIGQUIT
, susp
(suspend) generates SIGTSTP
. stty -a
will also show things like start = ^Q; stop = ^S;
and erase = ^?
(backspace), which don't send signals but affect the terminal layer otherwise.
Plain stty
will show the non-default settings and e.g. stty intr ^Q
would change the interrupt character to ^Q
instead of ^C
.
I think ^L
(form feed, new page) is not a terminal feature, but a character often used by applications to ask for a redraw the view, rechecking the window size at the same time.
^L
has a different meaning for different applications. In most curses
-based applications (such as vim
, less
, mutt
, mc
, etc.) it forces a complete redraw (thus re-checking the window size), but in shells (bash
etc.) it just clears the screen. There is no SIGWINCH
involved.
Commented
May 2, 2017 at 10:17
man 1 stty
.