Refactor keymap settings.