I have a script running always at the background. Inside that script I have to write the codes to detect keystrokes, and once a particular keystroke is detected, the rest of the script must be executed. How can I do this?
I have tried the showkey
command but failed to add that to my script.
you can read the keystrokes by the read command for this use the following bash script
you can experiment with the read command and some bash scripts