Far more likely there is nothing in front of the ship and riker knows his ass is about to fire some consequence free lasers. He derives great pleasure from the reaction or lack of reaction of the crew on the bridge as he continues to chat about unrelated things
There was a TNG episode that established that controls would only respond to authorized inputs, presumably from whatever limbs, organs, or phalanges any crewmember might typically use for such purposes.
Years ago I had a cheap Blackberry lookalike phone. It had a button lock feature to prevent butt dialing, but some bright spark decided that the lock wouldn't apply to the '9' and '1' keys, presumably so that a user could dial 9-1-1 even if too panicked to unlock the keypad. Which just meant that it was really easy to butt dial 9-1-1...
Had something similar, except that the code on the phone to dial 911 with the keys locked was #08. Keys were so sensitive I couldn't keep my phone in my pocket, had to live in my bag or it'd be dialling emergency services.
Sir! firing sequence has been interrupted by a CORN (Cessium Ordinance Radiating Nucleons) .... we're going to have to increase power to push this one out!!!