I don't think there is a "special value", just some odd characters.
[root@mofo X11]# cat -v -
(I typed the up arrow key, then the return key, then Ctl-d.)
So, up arrow is Ctl-[, followed by [, followed by A.
You may need to turn off command line editing with --noediting
when starting the shell, or you may never see the keys used for editing...
Have your script start with