PowerGod
Forum Addict!
- Joined
- Jun 20, 2011
- Messages
- 4,462
I just want to know, if I press for example CTRL+Z (or any other combination), what SIGNAL is sent, either the code or the name.
I searched for days about this argument and I still can't find a solution... I just found explanations about what a combination does, but I want to know the SIGNAL, because I need to trap it.
I collected all these info:
So, do you know how can I find this information ?
I mean, I want to obtain it from the system itself, because I'll need to find the associations on different distributions.
(In the title there's Linux, but I'm actually using Cygwin, if it makes some difference...)
EDIT:
Adding an example (for CTRL+Z) of what I'm doing:
using stty -a i see this relevant information
so I know that the CTRL+z combination triggers a "swtch"
then searching this "swtch" in man stty I find
and then I'm lost...
I searched for days about this argument and I still can't find a solution... I just found explanations about what a combination does, but I want to know the SIGNAL, because I need to trap it.
I collected all these info:
- kill -l, shows all the SIGNAL codes
- trap "" <number>, will disable a SIGNAL
- man bash, lists some SIGNALS here and there but them are scattered and is not explained what combination sends them
- stty -a, shows many hotkeys assigned, but doesn't show the SIGNAL associated to them
- terminfo, shows many hotkeys assigned, but doesn't show the SIGNAL associated to them
So, do you know how can I find this information ?
I mean, I want to obtain it from the system itself, because I'll need to find the associations on different distributions.
(In the title there's Linux, but I'm actually using Cygwin, if it makes some difference...)
EDIT:
Adding an example (for CTRL+Z) of what I'm doing:
using stty -a i see this relevant information
Code:
swtch = ^Z
then searching this "swtch" in man stty I find
Code:
* swtch CHAR
CHAR will switch to a different shell layer
and then I'm lost...
Last edited: