made key handlers more generic. yay dark macro magic