take esc key as input
hi,
I have to take "esc" key as input without hitting enter key I am doing like this read -s -n1 variable Now,i have to use this value $variable to jump to particular case in "switch"(case) construct. i am unable to do it case $key in pattern) echo "escape key is pressed";; esac what should be pattern? here. thanks in advance |
You can enter a literal escape character with the sequence $'\e'.
Code:
#!/bin/bash |
All times are GMT -5. The time now is 09:15 AM. |