Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

matt90

macrumors member
Original poster
I'm a novice UNIX programmer (shell scripter?) and I recently wanted to make a program that uses the arrow keys. I know that the arrow keys generate "\033[A," "\033[B," etc., but when I try

read -n 1 input
if [ "$input" = "\033[A" ]
.....

the test always comes out negative. Is it a problem with read or test or what? What do I do?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.