listens to keypresses and updates styles