set initial value for pressed key before enter to loop