A coroner has said he will recommend random breath testing for Royal Navy personnel be introduced following the fatal shooting of an officer by a drunken naval rating on a nuclear-powered submarine.

Southampton coroner Keith Wiseman told the end of the inquest into the death of Lieutenant Commander Ian Molyneux that he would write to the Navy identifying 18 areas it should look at.

Lt Cdr Molyneux, 36, was shot dead by Able Seaman Ryan Donovan, who was at least three times the drink-drive limit and on guard duty on HMS Astute in April 2011. The hearing has previously heard he had drunk 20 pints of cider and lager, cocktails and double vodkas in the 48 hours before he was put on a guard duty with the SA80 rifle.

Police investigating the murder were so concerned about binge drinking by the crew while ashore, that the senior officer wrote to his chief constable to highlight the issue and it was passed to military authorities. The Royal Navy has since tightened its rules on alcohol consumption before duty. At the time sailors were allowed 10 units in the previous 24 hours with no alcohol in the 10 hours before duty, which has now been changed to five units.

Mr Wiseman said the seven shots in 13 seconds fired from the hip by Donovan in the control room area of the sub had "echoed around the world", but it would never been known why the attack took place. He said it was "a miracle" no-one else had died during the gun rampage during a civic visit by Southampton's mayor and also schoolchildren who had just left when Donovan started firing.

He said he would incorporate recommendations from Lt Cdr Molyneux's widow Gillian, which included the random crew breath testing, the use of a breathalyser for all those going on armed sentry duty, a look at alcohol allowances while onboard ships and, in particular, on submarines, work to tackle the culture of binge drinking in the navy and the issuing of handheld breath testing devices to all personnel.

Recording a narrative verdict, the coroner said the officer was unlawfully killed and he will now write to the Navy citing the issues under what is called a Rule 43 letter. "In my view the routine use of the appropriate machinery to at least establish the absence of alcohol in the system is necessary as I'm not convinced that the concept of heavy drinking on leave periods is likely to alter very much," he said.

Donovan, 23, was jailed for life with a minimum term of 25 years after pleading guilty at Winchester Crown Court to the murder of father-of-four Lt Cdr Molyneux. The navigator yeoman also pleaded guilty to attempting to murder Lieutenant Commander Christopher Hodge, 45, who was shot in the stomach. The court heard that his real targets, whom he also admitted to attempting to murder, were Petty Officer Christopher Brown, 36, and Chief Petty Officer David McCoy, 37.

Speaking after the hearing, Mrs Molyneux said she was "heartened" the coroner would send her recommendations to the Navy and she wanted those, and the recommendations of the two Navy inquiries, acted upon.

"I can only hope that these recommendations will be fully implemented and improvements will become evident across the service and Ian's death will not be in vain," she said. "The evidence has been immensely difficult to hear. It has identified opportunities existed, but were missed, to prevent the death of Ian. However, it has provided me with some understanding and provides a basis for which I can begin to answer the questions our four children have now and will have in the future."