I believe you need the A and B keys to get it so you have to backtrack with the B key.
Alternatively, you can just skip the assault rifle, when you get to the next area there is an elevator that goes up two floors, do that and youll get a MG42 a machinegun. Also final boss gives you a Sub machinegun weapon.
there are currently 4 weapons in the game to my knowledge minus the Melee mechanic (Pistol, assault rifle,smg,machinegun).