Interestingly, Captain O'Kane seems not to have been a sea captain, but a soldier:
O’Neill (1922) says: “We learn from Alexander Campbell’s song ‘The Wounded Hussar’ (printed with the music in Smith’s Irish Minstrel (Edinburgh, 1825) that O’Kain was Captain Henry O’Kain who died of his wounds ‘on the banks of the dark rolling Danube.’” O’Sullivan’s attribution is based on a comment by Hardimann (who said O’Carolan wrote it) and because of stylistic similarities with other O’Carolan works. O’Neill (1913) quotes Patrick O’Leary, an Australian correspondent, who wrote that the Captain of the title was “the hero of a hundred fights, from Landon to Oudenarde, who, when old and war-worn, tottered back from the Low Countries to his birthplace to die, and found himself not only a stranger, but an outlawed, disinherited, homeless wanderer in the ancient territory that his fathers ruled as Lords of Limavady.”
Bertram, you missed out the most interesting part - the guys nickname was apparently "slasher" O'Kane!
My first thought when the Danube was mentioned was that this must be artistic licence, but no, during the wars of the Spanish Succession, British forces marched 250 miles across Europe from the Low Counties to the Danube in Austria to win a pivital victory at the battle of Blenheim. Oudenarde (1708) was another battle in the same wars. There's no mention of our captain in this history of the O'Kane's, but I note that many individuals in the family served for France around this time - not only England's traditional "old enemy" - but ultimately the losing side in this war. One can imagine that a soldier returning from defeat serving the French, might not be welcome. Particularly so in Ulster (historical home of the O'Kane's) where political necessity if nothing else would likely require a pro-British stance.
And indeed some Kane's served in the British army at this time:
"Richard Kane (1667-1736) from County Down had a versatile military career. He reached the rank of brigadier-general in the British army. He fought in France and took part in the defeat of Louis XIV's army at the battle of Blenheim. He transferred to the French army and was a lieutenant-colonel at the victory of the French at the battle of Malplaquet in 1709. Two years later he was in Canada with the Regiment of Irish Foot. He was the military governor of Gibraltar in 1720, during the dispute with Spain. With this background of international service, he wrote widely on miltary strategy."
Without doubt a time when histories were complex, loyalties flexible, and truth hidden by time...