Refactoring: extract keymap setting.