No, that is not how it went down. Don John of Austria and Giovanni Andrea had a top secret weapon that the Turks did not know about. Boarding nets. Don John pointed his galley directly at Ali Pasha’s ship. When the two ships merged the arquebuses normally would only get one shot off before the battle went to swords. But with the thick boarding nets draped over the Catholic ships, the arquebuses fired and reloaded over and over again killing most of the muslims who vainly slashed at the heavy nets. Ali Pasha’s head was severed from his body and when the muslims saw that the battle was over. This is just my paraphrasing, there were many more details all carefully chronicled in “The Galleys of Lepanto” by Jack Beeching. Another awesome technology were the three large ships at anchor full of cannon that blasted away at the corsairs sinking many of them.
Don John of Austria. This guy was an under appreciated rock star of a leader and soldier. While most of Europe yawned in their easy chairs he saved it...at least temporarily.
The two aren’t mutually exclusive, but while arquebuses may have played a part, the hand to hand fighting lasted for hours and was the decisive factor. From Wiki...
“Around noon, first contact was made between the squadrons of Barbarigo’s and Sirocco, close to the northern shore of the Gulf. Barbarigo had attempted to stay so close to the shore as to prevent Sirocco from surrounding him, but Sirocco, knowing the depth of the waters, managed to still insert galleys between Barbarigo’s line and the coast. In the ensuing mêlée, the ships came so close to each other as to form an almost continuous platform of hand-to-hand fighting in which both leaders were killed. The Christian galley slaves freed from the Turkish ships were supplied with arms and joined in the fighting, turning the battle in favour of the Christian side.
Meanwhile, the centers clashed with such force that Ali Pasha’s galley drove into the Real as far as the fourth rowing bench, and hand-to-hand fighting commenced around the two flagships, between the Spanish tercio infantry and the Turkish janissaries. When the Real was nearly taken, Colonna came alongside with the bow of his galley and mounted a counter-attack. With the help of Colonna, the Turks were pushed off the Real and the Turkish flagship was boarded and swept. The entire crew of Ali Pasha’s flagship was killed, including Ali Pasha himself. The banner of the Holy League was hoisted on the captured ship, breaking the morale of the Turkish galleys nearby. After two hours of fighting, the Turks were beaten left and center, although fighting continued for another two hours.[37] A flag taken at Lepanto by the Knights of Saint Stephen, said to be the standard of the Turkish commander, is still on display, in the Church of the seat of the Order in Pisa.”