mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-17 05:02:07 +00:00
Add persist_unicode_input_mode function
This commit is contained in:
parent
d9d42552fd
commit
4b4fb743ff
@ -29,7 +29,7 @@ uint8_t mods;
|
|||||||
|
|
||||||
void set_unicode_input_mode(uint8_t os_target) {
|
void set_unicode_input_mode(uint8_t os_target) {
|
||||||
input_mode = os_target;
|
input_mode = os_target;
|
||||||
eeprom_update_byte(EECONFIG_UNICODEMODE, os_target);
|
persist_unicode_input_mode();
|
||||||
dprintf("input_mode set to: %u\n", input_mode);
|
dprintf("input_mode set to: %u\n", input_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,12 +68,16 @@ void cycle_unicode_input_mode(void) {
|
|||||||
selected_index = (selected_index + 1) % selected_count;
|
selected_index = (selected_index + 1) % selected_count;
|
||||||
input_mode = selected[selected_index];
|
input_mode = selected[selected_index];
|
||||||
# if UNICODE_CYCLE_PERSIST
|
# if UNICODE_CYCLE_PERSIST
|
||||||
eeprom_update_byte(EECONFIG_UNICODEMODE, input_mode);
|
persist_unicode_input_mode();
|
||||||
# endif
|
# endif
|
||||||
dprintf("input_mode cycle to: %u\n", input_mode);
|
dprintf("input_mode cycle to: %u\n", input_mode);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void persist_unicode_input_mode(void) {
|
||||||
|
eeprom_update_byte(EECONFIG_UNICODEMODE, input_mode);
|
||||||
|
}
|
||||||
|
|
||||||
__attribute__((weak))
|
__attribute__((weak))
|
||||||
void unicode_input_start (void) {
|
void unicode_input_start (void) {
|
||||||
// save current mods
|
// save current mods
|
||||||
|
@ -41,6 +41,7 @@ void set_unicode_input_mode(uint8_t os_target);
|
|||||||
uint8_t get_unicode_input_mode(void);
|
uint8_t get_unicode_input_mode(void);
|
||||||
void unicode_input_mode_init(void);
|
void unicode_input_mode_init(void);
|
||||||
void cycle_unicode_input_mode(void);
|
void cycle_unicode_input_mode(void);
|
||||||
|
void persist_unicode_input_mode(void);
|
||||||
|
|
||||||
void unicode_input_start(void);
|
void unicode_input_start(void);
|
||||||
void unicode_input_finish(void);
|
void unicode_input_finish(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user