mirror of
https://github.com/osiweb/unified_retro_keyboard.git
synced 2025-02-16 20:31:09 +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;
|
last_key = ACTION_NOTHING;
|
||||||
|
|
||||||
asdf_modifiers_init();
|
|
||||||
asdf_repeat_init();
|
asdf_repeat_init();
|
||||||
asdf_keymaps_init();
|
asdf_keymaps_init(); // also initializes modifier states.
|
||||||
asdf_buffer_init();
|
asdf_buffer_init();
|
||||||
|
|
||||||
// reserve a buffer:
|
// reserve a buffer:
|
||||||
|
@ -56,8 +56,10 @@ static uint8_t keymap_index;
|
|||||||
// OUTPUTS: none
|
// OUTPUTS: none
|
||||||
//
|
//
|
||||||
// DESCRIPTION: accepts a index value. If the requested keymap index is valid,
|
// 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,
|
// then:
|
||||||
// and initialize the virtual outputs for the selected keymap.
|
// 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.
|
// 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) {
|
if (index < ASDF_NUM_KEYMAPS) {
|
||||||
keymap_index = index;
|
keymap_index = index;
|
||||||
asdf_virtual_init((asdf_virtual_initializer_t *const) keymap_initializer_list[keymap_index]);
|
asdf_virtual_init((asdf_virtual_initializer_t *const) keymap_initializer_list[keymap_index]);
|
||||||
|
asdf_modifiers_init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user