added key handler for tab key.