mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-26 05:06:42 +00:00
Add offset to cycle to allow stepping in reverse
This commit is contained in:
parent
bd68cfe688
commit
1a19eb78f1
@ -38,7 +38,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return false;
|
||||
|
||||
case CYCLEUC:
|
||||
if (record->event.pressed) { cycle_unicode_input_mode(); }
|
||||
if (record->event.pressed) { cycle_unicode_input_mode(+1); }
|
||||
return false;
|
||||
|
||||
case NUMPAD:
|
||||
|
@ -56,9 +56,9 @@ void unicode_input_mode_init(void) {
|
||||
dprintf("input_mode init to: %u\n", unicode_config.input_mode);
|
||||
}
|
||||
|
||||
void cycle_unicode_input_mode(void) {
|
||||
void cycle_unicode_input_mode(uint8_t offset) {
|
||||
#if UNICODE_SELECTED_MODES != -1
|
||||
selected_index = (selected_index + 1) % selected_count;
|
||||
selected_index = (selected_index + offset) % selected_count;
|
||||
unicode_config.input_mode = selected[selected_index];
|
||||
#if UNICODE_CYCLE_PERSIST
|
||||
persist_unicode_input_mode();
|
||||
|
@ -49,7 +49,7 @@ extern unicode_config_t unicode_config;
|
||||
void set_unicode_input_mode(uint8_t os_target);
|
||||
uint8_t get_unicode_input_mode(void);
|
||||
void unicode_input_mode_init(void);
|
||||
void cycle_unicode_input_mode(void);
|
||||
void cycle_unicode_input_mode(uint8_t offset);
|
||||
void persist_unicode_input_mode(void);
|
||||
|
||||
void unicode_input_start(void);
|
||||
|
Loading…
Reference in New Issue
Block a user