Tom Hanks has been moonlighting.

Publisher Alfred A. Knopf announced Tuesday that in October it will publish a collection of short stories by the busy Oscar-winning actor, 60, who appeared in the films “A Hologram for the King” and “Sully” last year.

Titled “Uncommon Type,” the book will contain 17 stories, each involving a typewriter. Hanks, who is a collector of vintage typewriters, began writing the collection two years ago, he said in a statement released by the publisher.

“I wrote in hotels during the press tours,” he said. “I wrote on vacation. I wrote on planes, at home, and in the office.” Hanks’ literary avocation doesn’t come as a complete surprise — he published a story, “Alan Bean Plus Four,” in The New Yorker magazine in 2014.

Knopf editor-in-chief Sonny Mehta read the story and says he was impressed. Mehta calls the new book “an accomplished debut.”