First player: Use the S key. Second player: Use the L key. A single press will fire and if you hold it, it will fire and then fire. You can press the key multiple times to fire many projectiles. They will both rotate in opposite directions each time you press the key.
Credits to @griffpatch for the 3D Raycaster tutorial. Note: Only use the code to make the player slide on the wall and not just stop.