Skip to content

Commit

Permalink
Add persist_unicode_input_mode function
Browse files Browse the repository at this point in the history
  • Loading branch information
vomindoraan committed Oct 31, 2018
1 parent 78083de commit 6a6b36c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions quantum/process_keycode/process_unicode_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ uint8_t get_unicode_input_mode(void) {

void set_unicode_input_mode(uint8_t mode) {
input_mode = mode;
eeprom_update_byte(EECONFIG_UNICODEMODE, input_mode);
persist_unicode_input_mode();
dprintf("input_mode set to: %u\n", input_mode);
}

Expand All @@ -68,12 +68,16 @@ void cycle_unicode_input_mode(void) {
selected_index = (selected_index + 1) % selected_count;
input_mode = selected[selected_index];
# if UNICODE_CYCLE_PERSIST
eeprom_update_byte(EECONFIG_UNICODEMODE, input_mode);
persist_unicode_input_mode();
# endif
dprintf("input_mode cycle to: %u\n", input_mode);
#endif
}

void persist_unicode_input_mode(void) {
eeprom_update_byte(EECONFIG_UNICODEMODE, input_mode);
}

__attribute__((weak))
void unicode_input_start(void) {
saved_mods = get_mods(); // Save current mods
Expand Down
1 change: 1 addition & 0 deletions quantum/process_keycode/process_unicode_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ void unicode_input_mode_init(void);
uint8_t get_unicode_input_mode(void);
void set_unicode_input_mode(uint8_t mode);
void cycle_unicode_input_mode(void);
void persist_unicode_input_mode(void);

void unicode_input_start(void);
void unicode_input_finish(void);
Expand Down

0 comments on commit 6a6b36c

Please sign in to comment.