diff --git a/firmware/asdf/src/asdf.c b/firmware/asdf/src/asdf.c index 353ab36..24a619e 100644 --- a/firmware/asdf/src/asdf.c +++ b/firmware/asdf/src/asdf.c @@ -374,9 +374,8 @@ void asdf_init(void) last_key = ACTION_NOTHING; - asdf_modifiers_init(); asdf_repeat_init(); - asdf_keymaps_init(); + asdf_keymaps_init(); // also initializes modifier states. asdf_buffer_init(); // reserve a buffer: diff --git a/firmware/asdf/src/asdf_keymaps.c b/firmware/asdf/src/asdf_keymaps.c index 7f0aa0e..5611961 100644 --- a/firmware/asdf/src/asdf_keymaps.c +++ b/firmware/asdf/src/asdf_keymaps.c @@ -56,8 +56,10 @@ static uint8_t keymap_index; // OUTPUTS: none // // DESCRIPTION: accepts a index value. If the requested keymap index is valid, -// then assign the value to the global (to the module) keymap_index variable, -// and initialize the virtual outputs for the selected keymap. +// then: +// 1) assign the value to the global (to the module) keymap_index variable +// 2) initialize the virtual outputs for the selected keymap. +// 3) initialize the modifier key states. // // SIDE EFFECTS: May change the module-global keymap_index variable. // @@ -72,6 +74,7 @@ void asdf_keymaps_select_keymap(uint8_t index) if (index < ASDF_NUM_KEYMAPS) { keymap_index = index; asdf_virtual_init((asdf_virtual_initializer_t *const) keymap_initializer_list[keymap_index]); + asdf_modifiers_init(); } }