Skip to content

Commit

Permalink
Fix up via keymap builds. (qmk#20383)
Browse files Browse the repository at this point in the history
* Fix up via keymap builds.

- Usages of old IS_PRESSED.

* Fix up bad code.

* Fix up bad code.
  • Loading branch information
tzarc authored Apr 9, 2023
1 parent 441988e commit 5d6d959
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 73 deletions.
36 changes: 18 additions & 18 deletions keyboards/custommk/evo70/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[0] = LAYOUT(
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_F1, KC_F2, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_F3, KC_F4, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_F1, KC_F2, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_F3, KC_F4, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_F5, KC_F6, KC_LCTL, KC_LWIN, KC_LALT, KC_SPACE, KC_NO, KC_VOLD, KC_RALT, KC_RCTL, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT),

[1] = LAYOUT(
QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_F7, KC_F8, KC_TRNS, BL_TOGG, BL_STEP, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_F9, KC_F10, KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_F7, KC_F8, KC_TRNS, BL_TOGG, BL_STEP, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_F9, KC_F10, KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),

[2] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),

[3] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),

};
Expand Down Expand Up @@ -86,13 +86,13 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}

void matrix_scan_user(void) {
if (IS_PRESSED(encoder_ccw)) {
if (encoder_ccw.pressed) {
encoder_ccw.pressed = false;
encoder_ccw.time = timer_read();
action_exec(encoder_ccw);
}

if (IS_PRESSED(encoder_cw)) {
if (encoder_cw.pressed) {
encoder_cw.pressed = false;
encoder_cw.time = timer_read();
action_exec(encoder_cw);
Expand Down
46 changes: 23 additions & 23 deletions keyboards/custommk/genesis/rev2/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H

//#define GENESIS_LAYER_COLORS
Expand All @@ -26,34 +26,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[0] = LAYOUT_via_6x4(
KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU,
MO(1), KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_PGUP,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, KC_PGDN,
MO(1), KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_PGUP,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, KC_PGDN,
KC_P0, KC_SPC, KC_PDOT, KC_PENT),

[1] = LAYOUT_via_6x4(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS),

[2] = LAYOUT_via_6x4(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),

[3] = LAYOUT_via_6x4(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),

};
Expand Down Expand Up @@ -113,35 +113,35 @@ keyevent_t encoder_right_ccw = {

keyevent_t encoder_right_cw = {
.key = (keypos_t){.row = 5, .col = 3},
.pressed = false
.pressed = false,
.type = KEY_EVENT
};

void matrix_scan_user(void) {
if (IS_PRESSED(encoder_left_ccw)) {
if (encoder_left_ccw.pressed) {
encoder_left_ccw.pressed = false;
encoder_left_ccw.time = timer_read();
action_exec(encoder_left_ccw);
}

if (IS_PRESSED(encoder_left_cw)) {
if (encoder_left_cw.pressed) {
encoder_left_cw.pressed = false;
encoder_left_cw.time = timer_read();
action_exec(encoder_left_cw);
}

if (IS_PRESSED(encoder_right_ccw)) {
if (encoder_right_ccw.pressed) {
encoder_right_ccw.pressed = false;
encoder_right_ccw.time = timer_read();
action_exec(encoder_right_ccw);
}

if (IS_PRESSED(encoder_right_cw)) {
if (encoder_right_cw.pressed) {
encoder_right_cw.pressed = false;
encoder_right_cw.time = timer_read();
action_exec(encoder_right_cw);
}

}


Expand Down
8 changes: 4 additions & 4 deletions keyboards/dailycraft/owl8/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,25 @@ keyevent_t encoder2_cw = {
};

void matrix_scan_user(void) {
if (IS_PRESSED(encoder1_ccw)) {
if (encoder1_ccw.pressed) {
encoder1_ccw.pressed = false;
encoder1_ccw.time = timer_read();
action_exec(encoder1_ccw);
}

if (IS_PRESSED(encoder1_cw)) {
if (encoder1_cw.pressed) {
encoder1_cw.pressed = false;
encoder1_cw.time = timer_read();
action_exec(encoder1_cw);
}

if (IS_PRESSED(encoder2_ccw)) {
if (encoder2_ccw.pressed) {
encoder2_ccw.pressed = false;
encoder2_ccw.time = timer_read();
action_exec(encoder2_ccw);
}

if (IS_PRESSED(encoder2_cw)) {
if (encoder2_cw.pressed) {
encoder2_cw.pressed = false;
encoder2_cw.time = timer_read();
action_exec(encoder2_cw);
Expand Down
8 changes: 4 additions & 4 deletions keyboards/dailycraft/stickey4/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,25 @@ keyevent_t encoder2_cw = {
};

void matrix_scan_user(void) {
if (IS_PRESSED(encoder1_ccw)) {
if (encoder1_ccw.pressed) {
encoder1_ccw.pressed = false;
encoder1_ccw.time = timer_read();
action_exec(encoder1_ccw);
}

if (IS_PRESSED(encoder1_cw)) {
if (encoder1_cw.pressed) {
encoder1_cw.pressed = false;
encoder1_cw.time = timer_read();
action_exec(encoder1_cw);
}

if (IS_PRESSED(encoder2_ccw)) {
if (encoder2_ccw.pressed) {
encoder2_ccw.pressed = false;
encoder2_ccw.time = timer_read();
action_exec(encoder2_ccw);
}

if (IS_PRESSED(encoder2_cw)) {
if (encoder2_cw.pressed) {
encoder2_cw.pressed = false;
encoder2_cw.time = timer_read();
action_exec(encoder2_cw);
Expand Down
16 changes: 8 additions & 8 deletions keyboards/dailycraft/wings42/rev2/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,49 +130,49 @@ keyevent_t encoder4_cw = {


void matrix_scan_user(void) {
if (IS_PRESSED(encoder1_ccw)) {
if (encoder1_ccw.pressed) {
encoder1_ccw.pressed = false;
encoder1_ccw.time = timer_read();
action_exec(encoder1_ccw);
}

if (IS_PRESSED(encoder1_cw)) {
if (encoder1_cw.pressed) {
encoder1_cw.pressed = false;
encoder1_cw.time = timer_read();
action_exec(encoder1_cw);
}

if (IS_PRESSED(encoder2_ccw)) {
if (encoder2_ccw.pressed) {
encoder2_ccw.pressed = false;
encoder2_ccw.time = timer_read();
action_exec(encoder2_ccw);
}

if (IS_PRESSED(encoder2_cw)) {
if (encoder2_cw.pressed) {
encoder2_cw.pressed = false;
encoder2_cw.time = timer_read();
action_exec(encoder2_cw);
}

if (IS_PRESSED(encoder3_ccw)) {
if (encoder3_ccw.pressed) {
encoder3_ccw.pressed = false;
encoder3_ccw.time = timer_read();
action_exec(encoder3_ccw);
}

if (IS_PRESSED(encoder3_cw)) {
if (encoder3_cw.pressed) {
encoder3_cw.pressed = false;
encoder3_cw.time = timer_read();
action_exec(encoder3_cw);
}

if (IS_PRESSED(encoder4_ccw)) {
if (encoder4_ccw.pressed) {
encoder4_ccw.pressed = false;
encoder4_ccw.time = timer_read();
action_exec(encoder4_ccw);
}

if (IS_PRESSED(encoder4_cw)) {
if (encoder4_cw.pressed) {
encoder4_cw.pressed = false;
encoder4_cw.time = timer_read();
action_exec(encoder4_cw);
Expand Down
6 changes: 3 additions & 3 deletions keyboards/monarch/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_ON,
_______, _______, _______, BL_TOGG, _______, BL_DOWN, BL_OFF, BL_UP,
_______, _______, _______, BL_TOGG, _______, BL_DOWN, BL_OFF, BL_UP,
_______, _______
),
[2] = LAYOUT_all(
Expand Down Expand Up @@ -65,13 +65,13 @@ keyevent_t encoder_cw = {
};

void matrix_scan_user(void) {
if (IS_PRESSED(encoder_ccw)) {
if (encoder_ccw.pressed) {
encoder_ccw.pressed = false;
encoder_ccw.time = timer_read();
action_exec(encoder_ccw);
}

if (IS_PRESSED(encoder_cw)) {
if (encoder_cw.pressed) {
encoder_cw.pressed = false;
encoder_cw.time = timer_read();
action_exec(encoder_cw);
Expand Down
2 changes: 1 addition & 1 deletion keyboards/rate/pistachio_mp/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void encoder_action_register(uint8_t index, bool clockwise) {
keyevent_t encoder_event = (keyevent_t) {
.key = clockwise ? ENC_CW : ENC_CCW,
.pressed = true,
.time = timer_read()
.time = timer_read(),
.type = KEY_EVENT
};
encoder_state = (clockwise ^ 1) | (clockwise << 1);
Expand Down
4 changes: 2 additions & 2 deletions keyboards/rmi_kb/chevron/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ keyevent_t encoder_cw = {
};

void matrix_scan_user(void) {
if (IS_PRESSED(encoder_ccw)) {
if (encoder_ccw.pressed) {
encoder_ccw.pressed = false;
encoder_ccw.time = timer_read();
action_exec(encoder_ccw);
}

if (IS_PRESSED(encoder_cw)) {
if (encoder_cw.pressed) {
encoder_cw.pressed = false;
encoder_cw.time = timer_read();
action_exec(encoder_cw);
Expand Down
4 changes: 2 additions & 2 deletions keyboards/rmi_kb/herringbone/pro/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ keyevent_t encoder_cw = {
};

void matrix_scan_user(void) {
if (IS_PRESSED(encoder_ccw)) {
if (encoder_ccw.pressed) {
encoder_ccw.pressed = false;
encoder_ccw.time = timer_read();
action_exec(encoder_ccw);
}

if (IS_PRESSED(encoder_cw)) {
if (encoder_cw.pressed) {
encoder_cw.pressed = false;
encoder_cw.time = timer_read();
action_exec(encoder_cw);
Expand Down
4 changes: 2 additions & 2 deletions keyboards/rmi_kb/squishytkl/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ keyevent_t encoder_cw = {
};

void matrix_scan_user(void) {
if (IS_PRESSED(encoder_ccw)) {
if (encoder_ccw.pressed) {
encoder_ccw.pressed = false;
encoder_ccw.time = timer_read();
action_exec(encoder_ccw);
}

if (IS_PRESSED(encoder_cw)) {
if (encoder_cw.pressed) {
encoder_cw.pressed = false;
encoder_cw.time = timer_read();
action_exec(encoder_cw);
Expand Down
4 changes: 2 additions & 2 deletions keyboards/rmi_kb/wete/v2/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ keyevent_t encoder_cw = {
};

void matrix_scan_user(void) {
if (IS_PRESSED(encoder_ccw)) {
if (encoder_ccw.pressed) {
encoder_ccw.pressed = false;
encoder_ccw.time = timer_read();
action_exec(encoder_ccw);
}

if (IS_PRESSED(encoder_cw)) {
if (encoder_cw.pressed) {
encoder_cw.pressed = false;
encoder_cw.time = timer_read();
action_exec(encoder_cw);
Expand Down
4 changes: 2 additions & 2 deletions keyboards/yandrstudio/nz67v2/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ keyevent_t encoder1_ccw = {.key = (keypos_t){.row = 4, .col = 4}, .pressed = fal
keyevent_t encoder1_cw = {.key = (keypos_t){.row = 4, .col = 6}, .pressed = false, .type = KEY_EVENT};

void matrix_scan_user(void) {
if (IS_PRESSED(encoder1_ccw)) {
if (encoder1_ccw.pressed) {
encoder1_ccw.pressed = false;
encoder1_ccw.time = timer_read();
action_exec(encoder1_ccw);
}

if (IS_PRESSED(encoder1_cw)) {
if (encoder1_cw.pressed) {
encoder1_cw.pressed = false;
encoder1_cw.time = timer_read();
action_exec(encoder1_cw);
Expand Down
Loading

0 comments on commit 5d6d959

Please sign in to comment.