Code cleanup

This commit is contained in:
Christoffer Martinsson 2023-06-02 20:11:36 +02:00
parent 50793777d5
commit b88efa604c

View File

@ -219,19 +219,21 @@ void process_data()
int fn_mode = 0;
for (int i = 0; i < LIST_MAX; i++)
{
if (kp_keypad.key[i].kstate == PRESSED || kp_keypad.key[i].kstate == HOLD)
if (kp_keypad.key[i].kstate != PRESSED && kp_keypad.key[i].kstate != HOLD)
{
for (int j = 0; j < NBR_OF_BUTTONS; j++)
continue;
}
for (int j = 0; j < NBR_OF_BUTTONS; j++)
{
if (buttons[j].keypad_kchar == kp_keypad.key[i].kchar && buttons[j].keycode == KEY_FN1)
{
if (buttons[j].keypad_kchar == kp_keypad.key[i].kchar && buttons[j].keycode == KEY_FN1)
/* Check if FN1 key are defined to this button (Layer 0 and first position in combo array)*/
if (buttons[j].keycode == KEY_FN1)
{
/* Check if FN1 key are defined to this button (Layer 0 and first position in combo array)*/
if (buttons[j].keycode == KEY_FN1)
{
fn_mode++;
}
break;
fn_mode++;
}
break;
}
}
}