Some very poor code for button->key assignments