shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] capturar tecla esc


From: Flavio Junior
Subject: Re: [shell-script] capturar tecla esc
Date: Fri, 16 Oct 2009 22:28:46 -0300

com tput nao sei.. nem fui buscar...

wakku@waKKu:~$ read -n1
<APERTEI ESC AQUI>
wakku@waKKu:~$ cat -vet <<<$REPLY
^[$
wakku@waKKu:~$ if [ "$(cat -vet <<<${REPLY})" == "^[$" ]; then echo ESC;
else echo NAO E ESC; fi
ESC
wakku@waKKu:~$

--

Flávio do Carmo Júnior aka waKKu

2009/10/11 Ivan lopes <address@hidden>

>
>
> e o Esc ???? como faco??? Usando o tput
>
> if [ "$key" = $(tput cr) ]
> then key="Enter"
> elif [ "$key" = $(tput kcuu1) ]
> then key="Up"
> elif [ "$key" = $(tput kcud1) ]
> then key="Down"
> elif [ "$key" = $(tput kcub1) ]
> then key="Left"
> elif [ "$key" = $(tput kcuf1) ]
> then key="Right"
> fi
>
> [As partes desta mensagem que não continham texto foram removidas]
>
>  
>


[As partes desta mensagem que não continham texto foram removidas]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]