It seems like when you hold down the key livecode repeatedly sends the arrow key handlers which is why rawKeyUp messages also gets sent when the arrow key is being held down.
Actually, Lc is reading what the
keyboard is doing, which is repeatedly sending the alternating messages. If you go to the 'development' menu and choose 'message watcher', you'll see exactly what gets sent, and what you can respond to, as Lc receives it.
I'm can't think of any way to go around this other than a last resort of removing the idle animation completely and just using the 4 directions button icons only
First, I want to make clear I am not trying to give you "boiler plate code" to drop into your program to solve any issue that may come up, as I think that is a disservice to people. While I wouldn't ask you to say, read a 500 page manual to find the answer to one question, I would expect you to take more time trying to solve something than a couple hours.
Second, it
is possible to work around the problem
without resorting to dropping the
animation, but it takes time to learn. You've been using Lc 2 weeks, where, while not Lc specific, I've been writing stuff in code for a while (decades), and our friend Klaus there has been using Lc since the earth was forming (or shortly thereafter)

I can't speak for Klaus, who is something of a wunderkind, but I can say I still don't know everything, and you should give yourself some time to become proficient.
It even takes time to learn how to look up specific information, even when you know what your looking for and (generally) how to find it.
You have a number of sites links specifically for this type of thing (game routine coding), I am sure you don't expect to know everything in one day, take some time and study the material while writing your code. If something you write doesn't work flawlessly, keep on writing parts you can figure out while looking for more information on what your lacking.
One of the things coming up in this case, your going to have to find out how to handle the repeat rate overflow if someone holds down the key for a while, which will cause the button to keep right on moving across the screen as if the key never stopped getting pressed.
Then, if your really stuck, feel free to ask, there are lots here willing and happy to help un-stick you.