Adds KeyMap serialization