With something like that, 13 is the code for the enter key, kind of thing, I think...
SO, what you could try and do, is use that sort of thing but instead of using 13 for the enter key, find out what the numbers are for the arrow keys, and do it like that :)
But I could be completely wrong.