The cook of the Bavarian duke Karl Theodor is said to have invented LeberkÃ se in 1776 . LeberkÃ se is said to have been invented in 1776 by the cook of Charles Theodore , Elector of Bavaria , although this story has been heavily contested .