Browse Source

[Keyboard] fix encoder void to bool (#13334)

pull/13384/head
Xelus22 2 years ago
committed by GitHub
parent
commit
de8939aa5e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions
  1. +2
    -1
      keyboards/ramonimbao/squishytkl/keymaps/default/keymap.c
  2. +2
    -1
      keyboards/ramonimbao/squishytkl/keymaps/iso/keymap.c
  3. +2
    -1
      keyboards/ramonimbao/squishytkl/keymaps/jis/keymap.c
  4. +2
    -1
      keyboards/ramonimbao/squishytkl/keymaps/via/keymap.c

+ 2
- 1
keyboards/ramonimbao/squishytkl/keymaps/default/keymap.c View File

@ -26,10 +26,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
return true;
}

+ 2
- 1
keyboards/ramonimbao/squishytkl/keymaps/iso/keymap.c View File

@ -26,10 +26,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
return true;
}

+ 2
- 1
keyboards/ramonimbao/squishytkl/keymaps/jis/keymap.c View File

@ -28,10 +28,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
return true;
}

+ 2
- 1
keyboards/ramonimbao/squishytkl/keymaps/via/keymap.c View File

@ -51,7 +51,7 @@ void matrix_scan_user(void) {
}
}
void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
encoder_cw.pressed = true;
encoder_cw.time = (timer_read() | 1);
@ -61,4 +61,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
encoder_ccw.time = (timer_read() | 1);
action_exec(encoder_ccw);
}
return true;
}

Loading…
Cancel
Save