Performance tune for red button function

Cache the lookups on the keypress callback for the red button stuff.
Seems to be noticably faster (was being slow on some boxes).