Change key press control on calculator to switch statement