Removed code for keyup after trigger key pressed

Also cleaned up code