KeyPressed() will return true if the given key has been been pressed *since the last ‘render’* – you cannot manually clear it, it will be automatically cleared after the next render.
Some people are used to KeyPressed auto-clearing itself after it’s called but that is not the case in mx2 – no matter which way I go here I manage to piss off someone so sorry if that turns out to be you!
For GUI stuff, I really recommend using OnKeyEvent, OnMouseEvent etc as these will generally give you much more precise results.