Keegan-Michael Key has been cast in “Wonka,” a musical based on the early life of Willy Wonka. He will star alongside Timothee Chalamet, who has been set to portray the famed chocolatier.

Though plot details, as well as Key’s role, have been kept under wraps, “Wonka” serves as a prequel to “Charlie and the Chocolate Factory” and will explore the upbringing of the man who later created the famous temple of confectionary treats.

Roald Dahl’s popular children’s book “Charlie and the Chocolate Factory” follows a poor boy named Charlie Bucket, who wins a golden ticket to tour the world-famous and heavily guarded chocolate factory run by one Willy Wonka. Since the upcoming movie takes place before the chocolate factory opened, Charlie and his fellow golden ticket winners won’t appear in “Wonka.”

Paul King, known for “Paddington” and its sequel, is directing “Wonka.” David Heyman (“Harry Potter”) will produce the film, which is expected to begin production in September.

King wrote the screenplay with Simon Farnaby, with prior writers including Simon Rich, Simon Stephenson, Jeff Nathanson, and Steven Levenson. Luke Kelly and Alexandra Derbyshire will also serve as producers and Michael Siegel will executive produce.

Key, who made a name for himself as one half of the comedic duo Key and Peele, most recently starred in the Apple TV Plus musical TV series “Schmigadoon” and Ryan Murphy’s adaptation of “The Prom.” His credits also include “Pitch Perfect 2,” “The Lego Movie,” “Toy Story 4” and Jon Favreau’s remake of “The Lion King.”

“Wonka,” which is being distributed by Warner Bros., is scheduled to debut in theaters on March 17, 2023.