A man accused of murdering his brother-in-law and attempting to kill three other people during a stabbing and shooting spree in the Scottish Highlands was "fully in control" of his actions, a jury has been told.