Not until the USA got involved, but the Winchester Mod 97 Trench gun was so feared and hated by the Germans that they considered it to be a war crime for one to be used.
The Brits used the Browning A-5 with the barrel sawn off at the end of the forearm.