How to config Ctrl+u to send signal SIGUSR1 from console

1.7k views Asked by At

I know stty support some defined key-stroke to send signals:

$ stty -a | grep intr
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ;

Is it possible to configure stty to bind key-stroke "Ctrl+u" to send signal SIGUSR1? (Or any possible way)

Thanks in advance!

Ps. I want to use "Ctrl+u" to send signal to my foreground running program.

1

There are 1 answers

0
chac On

If you are in KDE and use Konsole for your application, you can send a USR1 signal to the application.

Open Edit in the menu and choose 'Send a signal', another window lets you choose the type of signal.

You can also, in Configuration, Shortcut, assign a key to SIGUSR1, SIGUSR2, etc...