added key events and highlighting