added key handlers for tab key.