Alan Tudyk who plays K-2SO in Rogue One: A Star Wars Story, filmed his role entirely as motion capture, just like Lupita Nyong’o did in The Force Awakens did for Maz Kanata. Tudyk actually was on set with the actors for their scenes, however, as he wore ILM-designed stilts that made him almost a foot taller.
He has also described his ILM-designed body suit as a “body sock” and laughed at the other actors as they had to wear these complicated outfits and all he had was a simple one piece. As for Kaytoo’s personality, Tudyk has given a little insight into that:
"Kaytoo is a little bit like Chewbacca’s personality in a droid’s body. He doesn’t give a shit about what you think. He doesn’t fully check himself before he says things and does things. He just speaks the truth."
Sounds like we are going to have our new favorite Star Wars character for a whole new year. BB-8 who?