While on the Home screen, tap twice on the sensor on the back of the phone to scan a code.
Setting method:
Settings > Special features > Smart sensing > Double-tap to scan
How to do it:
Point the camera at a QR code and quickly tap twice on the sensor on the back of the phone to scan the code.
Note: Only some models support this function. Please refer to your actual experience.