Protect UI keys with the event lock.

Also simplify the left+right/up+down elimination very slightly.