Creating states with keymap