if you want to send like a synthetic arrow keystroke, well, things get ugly again, it will need to send the right series of bytes based on what terminal the program thinks you are.
Using arrow key etc. would be very beneficial for my case. So I thank Adam for his solution, but I prefer angel's one.
Thanks guys :)