Extract keys to an external keymap file. Extract config too.