Instead, jump right to the Magnifier using the Camera Control: Go to Settings > Camera > Camera Control and choose Magnifier.
Debouncing button or switch inputs on microcontrollers can be a challenging problem for those first starting to program these ...