summaryrefslogtreecommitdiff
path: root/keyboards/dailycraft/owl8
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/dailycraft/owl8')
-rw-r--r--keyboards/dailycraft/owl8/info.json32
-rw-r--r--keyboards/dailycraft/owl8/keymaps/via/keymap.c36
2 files changed, 36 insertions, 32 deletions
diff --git a/keyboards/dailycraft/owl8/info.json b/keyboards/dailycraft/owl8/info.json
index ee1d19e7d6..b1bcacb60b 100644
--- a/keyboards/dailycraft/owl8/info.json
+++ b/keyboards/dailycraft/owl8/info.json
@@ -24,25 +24,25 @@
"layouts": {
"LAYOUT": {
"layout": [
- {"x":0, "y":0, "matrix": [0, 12]},
- {"x":1, "y":0, "matrix": [0, 13]},
- {"x":2, "y":0, "matrix": [0, 14]},
- {"x":3, "y":0, "matrix": [0, 15]},
+ {"x": 0, "y": 0, "matrix": [0, 12]},
+ {"x": 1, "y": 0, "matrix": [0, 13]},
+ {"x": 2, "y": 0, "matrix": [0, 14]},
+ {"x": 3, "y": 0, "matrix": [0, 15]},
- {"x":0, "y":1.25, "matrix": [0, 8]},
- {"x":1, "y":1.25, "matrix": [0, 9]},
- {"x":2, "y":1.25, "matrix": [0, 10]},
- {"x":3, "y":1.25, "matrix": [0, 11]},
+ {"x": 0, "y": 1.25, "matrix": [0, 8]},
+ {"x": 1, "y": 1.25, "matrix": [0, 9]},
+ {"x": 2, "y": 1.25, "matrix": [0, 10]},
+ {"x": 3, "y": 1.25, "matrix": [0, 11]},
- {"x":0, "y":2.5, "matrix": [0, 0]},
- {"x":1, "y":2.5, "matrix": [0, 1]},
- {"x":2, "y":2.5, "matrix": [0, 2]},
- {"x":3, "y":2.5, "matrix": [0, 3]},
+ {"x": 0, "y": 2.5, "matrix": [0, 0]},
+ {"x": 1, "y": 2.5, "matrix": [0, 1]},
+ {"x": 2, "y": 2.5, "matrix": [0, 2]},
+ {"x": 3, "y": 2.5, "matrix": [0, 3]},
- {"x":0, "y":3.5, "matrix": [0, 4]},
- {"x":1, "y":3.5, "matrix": [0, 5]},
- {"x":2, "y":3.5, "matrix": [0, 6]},
- {"x":3, "y":3.5, "matrix": [0, 7]}
+ {"x": 0, "y": 3.5, "matrix": [0, 4]},
+ {"x": 1, "y": 3.5, "matrix": [0, 5]},
+ {"x": 2, "y": 3.5, "matrix": [0, 6]},
+ {"x": 3, "y": 3.5, "matrix": [0, 7]}
]
}
}
diff --git a/keyboards/dailycraft/owl8/keymaps/via/keymap.c b/keyboards/dailycraft/owl8/keymaps/via/keymap.c
index 6e3f6ea90b..1a3bb0f0ae 100644
--- a/keyboards/dailycraft/owl8/keymaps/via/keymap.c
+++ b/keyboards/dailycraft/owl8/keymaps/via/keymap.c
@@ -52,46 +52,50 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
keyevent_t encoder1_ccw = {
.key = (keypos_t){.row = 0, .col = 12},
- .pressed = false
+ .pressed = false,
+ .type = KEY_EVENT
};
keyevent_t encoder1_cw = {
.key = (keypos_t){.row = 0, .col = 13},
- .pressed = false
+ .pressed = false,
+ .type = KEY_EVENT
};
keyevent_t encoder2_ccw = {
.key = (keypos_t){.row = 0, .col = 14},
- .pressed = false
+ .pressed = false,
+ .type = KEY_EVENT
};
keyevent_t encoder2_cw = {
.key = (keypos_t){.row = 0, .col = 15},
- .pressed = false
+ .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() | 1);
+ 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() | 1);
+ 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() | 1);
+ 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() | 1);
+ encoder2_cw.time = timer_read();
action_exec(encoder2_cw);
}
}
@@ -100,21 +104,21 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
encoder1_cw.pressed = true;
- encoder1_cw.time = (timer_read() | 1);
+ encoder1_cw.time = timer_read();
action_exec(encoder1_cw);
} else {
encoder1_ccw.pressed = true;
- encoder1_ccw.time = (timer_read() | 1);
+ encoder1_ccw.time = timer_read();
action_exec(encoder1_ccw);
}
} else if (index == 1) {
if (clockwise) {
encoder2_cw.pressed = true;
- encoder2_cw.time = (timer_read() | 1);
+ encoder2_cw.time = timer_read();
action_exec(encoder2_cw);
} else {
encoder2_ccw.pressed = true;
- encoder2_ccw.time = (timer_read() | 1);
+ encoder2_ccw.time = timer_read();
action_exec(encoder2_ccw);
}
}