diff --git a/firmware/src/main.cpp b/firmware/src/main.cpp index f199382..b621614 100755 --- a/firmware/src/main.cpp +++ b/firmware/src/main.cpp @@ -420,10 +420,12 @@ void scan_buttons() { if (buttons[j].keypad_kchar == kp_keypad.key[i].kchar) { + /* Check if FN1 key are defined to this button (Layer 0 and first position in combo array)*/ if ((buttons[j].keycode == KEY_FN1 || (buttons[j].keycode == KEY_COMBO && buttons[j].combo_keycode[0] == KEY_FN1)) && buttons[j].tap_state != 3) { fn_mode = 1; } + /* Check if FN2 key are defined to this button (Layer 0 and first position in combo array)*/ else if ((buttons[j].keycode == KEY_FN2 || (buttons[j].keycode == KEY_COMBO && buttons[j].combo_keycode[0] == KEY_FN2)) && buttons[j].tap_state != 3) { fn_mode = 2; @@ -689,7 +691,6 @@ void setup() /* Init HW */ pinMode(STATUS_LED, OUTPUT); digitalWrite(STATUS_LED, LOW); - Mouse.begin(); } void loop() @@ -697,10 +698,10 @@ void loop() /* Update current time (ms) */ current_timestamp = millis(); - /* Scan buttons 5ms */ + /* Scan buttons 1ms */ if (current_timestamp >= button_timestamp) { - button_timestamp = current_timestamp + 5; + button_timestamp = current_timestamp + 1; scan_buttons(); }