Results 1 to 3 of 3
I am trying to write a script that uses whiptail as a menu dialog. The script runs at user login. I would like to prevent the user from pressing the ...
- 11-09-2007 #1Just Joined!
- Join Date
- Sep 2007
- Posts
- 15
an easy way to disable escape key in bash?
I am trying to write a script that uses whiptail as a menu dialog. The script runs at user login. I would like to prevent the user from pressing the esc key and breaking out of the script. Is there an easy way to do this?
I have tried putting the exit command at the end of my script but that seems to do nothing.
Thanks in advance.
- 11-09-2007 #2Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
You can use the trap command to disable CTR-C:
RegardsCode:trap "Ctrl-C is not allowed.." SIGINT
- 11-09-2007 #3Just Joined!
- Join Date
- Sep 2007
- Posts
- 15
actually whiptail already prevents the CTRL-C from breakin to the shell.
specifically i need to trap the esc key. is this possible?
thanks for your time.


Reply With Quote