I have a problem with one of my shell scripts. The script starts with
#!/bin/bash. It is an installation script using whiptail. I really need the 'ESC' key for at least a whiptail box using the "--textbox" box type: it prints a file with only the "OK" button.
My "ergonomic" problem is: I want to have a choice on this box but with only one button, it is impossible.
My solution is: To use the 'ESC' key as a second choice.
But it remains a "software" problem to solve: On Debian / Ubuntu distros, it works well. On CentOS / Fedora distros, 'ESC' is not handled by whiptail, it is ignored. I noticed that the 'ESC' key was a kind of 'TAB' on the command line whereas it is well handled in "vi" for example.
I tried the 'CTRL-[' keys as a replacement of 'ESC' but it works only for Debian and Ubuntu distros.
This is an easy way to reproduce the problem:
whiptail --msgbox "hello" 5 30
If 'ESC' works, you should be able to quit the box. Else, 'ESC' is just ignored and you can only type on 'Enter'.
I think that the problem could come from a bash option, but I do not know where and what to look for.