How do you Code Arrow Keys for controlling a sprite?

I was wanting to know if you could code arrow keys and/or other keyboard functions into a game. I was wanting to control a sprite with this function but couldn't figure ou how or if it was even possible.

Thanks for any help

A similar community discussion:

Thanks, I will see if that works

So far no word
If anyone knows I'd love to know as well.