mirror of
https://github.com/osiweb/unified_retro_keyboard.git
synced 2024-11-26 02:49:16 +00:00
Reset modifier states when keymap is reset
- asdf.c: remove asdf_modifiers_init() from asdf_init(). - asdf_keymaps.c: add a call do asdf_modifiers_init() to asdf_keymaps_select_keymap()
This commit is contained in:
parent
3cd9547d59
commit
e37da4e969
@ -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:
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user