...and replace it with only slightly less crazy code. No need to create an destroy hash tables for each key press.