Hi Curupira!
To use the deck gun, sea must be quite calm (don’t recall the sea m/s, but when 10 or higher forget it)
Then you order the watch officer (by clicking on him) to man the deck gun.
Then you can teleport on the deck gun.
Clic on the up left icon to access the gun view, and with your mouse you can aim right or left, with your mouse scroll you can elevate the gun.
You fire with the space bar, but have to wait to reload the gun! (The orange bar)
When finished, you quit the gun by the Red Cross up right, teleport back on conning tower, and order the watch officer to secure the deck gun...
Hope that helps