summaryrefslogtreecommitdiff
path: root/keyboards/keebio/bdn9
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-05-21 23:17:32 -0700
committerGitHub <noreply@github.com>2021-05-21 23:17:32 -0700
commita0fed0ea176d1c986e40fc4981b900509c90d66e (patch)
treeee12f5943046015ea0dce8e2a30a68bc8eb99dbe /keyboards/keebio/bdn9
parent76c23b15abc824f867b48d8d5100dced2417d336 (diff)
Convert Encoder callbacks to be boolean functions (#12805)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Diffstat (limited to 'keyboards/keebio/bdn9')
-rw-r--r--keyboards/keebio/bdn9/keymaps/bcat/keymap.c5
-rw-r--r--keyboards/keebio/bdn9/keymaps/brandonschlack/keymap.c3
-rw-r--r--keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c3
-rw-r--r--keyboards/keebio/bdn9/keymaps/default/keymap.c3
-rw-r--r--keyboards/keebio/bdn9/keymaps/eosti/keymap.c3
-rw-r--r--keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c3
-rw-r--r--keyboards/keebio/bdn9/keymaps/hbbisenieks/keymap.c3
-rw-r--r--keyboards/keebio/bdn9/keymaps/mousepad/keymap.c15
-rw-r--r--keyboards/keebio/bdn9/keymaps/rishka/keymap.c3
-rw-r--r--keyboards/keebio/bdn9/keymaps/test/keymap.c3
-rw-r--r--keyboards/keebio/bdn9/keymaps/via/keymap.c3
-rw-r--r--keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c3
-rw-r--r--keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c3
13 files changed, 33 insertions, 20 deletions
diff --git a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c
index 41246ba7d9..06ba9a5595 100644
--- a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c
@@ -21,13 +21,13 @@ 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) {
switch (index) {
/* Top-left encoder (volume) */
case 0:
tap_code(clockwise ? KC_VOLU : KC_VOLD);
break;
-
+
/* Top-right encoder (backlight brightness) */
case 1:
if (clockwise) {
@@ -41,4 +41,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/brandonschlack/keymap.c b/keyboards/keebio/bdn9/keymaps/brandonschlack/keymap.c
index 443e8d0ae9..c581070895 100644
--- a/keyboards/keebio/bdn9/keymaps/brandonschlack/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/brandonschlack/keymap.c
@@ -253,7 +253,7 @@ const uint16_t PROGMEM encoders[][2][2] = {
[LR_EDIT] = {{ KC_COMM, KC_DOT }, { KC_MINS, KC_EQL }},
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
uint8_t layer = get_highest_layer(layer_state);
switch (layer) {
@@ -285,6 +285,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(pgm_read_word(&encoders[layer][index][clockwise]));
break;
}
+ return true;
}
/**
diff --git a/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c b/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c
index 9747dbf223..bce81500d5 100644
--- a/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c
@@ -39,7 +39,7 @@ 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 (index == 0) {
if (clockwise) {
tap_code(KC_MS_WH_UP);
@@ -54,4 +54,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/default/keymap.c b/keyboards/keebio/bdn9/keymaps/default/keymap.c
index a88617caaa..e33e94b536 100644
--- a/keyboards/keebio/bdn9/keymaps/default/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/default/keymap.c
@@ -45,7 +45,7 @@ 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 (index == _LEFT) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -67,4 +67,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/eosti/keymap.c b/keyboards/keebio/bdn9/keymaps/eosti/keymap.c
index 06537cbadf..b37e2a1cdb 100644
--- a/keyboards/keebio/bdn9/keymaps/eosti/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/eosti/keymap.c
@@ -123,7 +123,7 @@ 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 (index == 0) {
if (clockwise) {
tap_code(KC_VOLD);
@@ -131,6 +131,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
// Tapdance! Hold to use as a modifier to the _MOD layout, tap to change it between _BASE and _MACRO
diff --git a/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c b/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c
index 445e6e896a..4d323a3126 100644
--- a/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c
@@ -45,7 +45,7 @@ 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 (index == _LEFT) {
if (clockwise) {
tap_code(KC_VOLD);
@@ -67,4 +67,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGDN);
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/hbbisenieks/keymap.c b/keyboards/keebio/bdn9/keymaps/hbbisenieks/keymap.c
index 1eaee012af..50d44bea14 100644
--- a/keyboards/keebio/bdn9/keymaps/hbbisenieks/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/hbbisenieks/keymap.c
@@ -67,7 +67,7 @@ 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 (index == 0) {
if (clockwise) {
tap_code(KC_RGHT);
@@ -82,4 +82,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
SEND_STRING(SS_LCTRL("3")); // audacity zoom out
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c b/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c
index 79ae56fd2e..760bb3d5e5 100644
--- a/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c
@@ -26,18 +26,18 @@ enum custom_keycodes { // Make sure have the awesome keycode ready
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
- KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3,
- KC_WH_U, ALT_TAB, KC_WH_L,
- KC_WH_D, TT(1), KC_WH_R
+ KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3,
+ KC_WH_U, ALT_TAB, KC_WH_L,
+ KC_WH_D, TT(1), KC_WH_R
),
[1] = LAYOUT(
- RESET, KC_ACL0, KC_ACL1,
- KC_VOLU, KC_ACL2, KC_BRIU,
- KC_VOLD, TO(1), KC_BRID
+ RESET, KC_ACL0, KC_ACL1,
+ KC_VOLU, KC_ACL2, KC_BRIU,
+ KC_VOLD, TO(1), KC_BRID
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_MS_LEFT);
@@ -52,6 +52,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MS_D);
}
}
+ return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { // This will do most of the grunt work with the keycodes.
diff --git a/keyboards/keebio/bdn9/keymaps/rishka/keymap.c b/keyboards/keebio/bdn9/keymaps/rishka/keymap.c
index dec371d173..9777debc3e 100644
--- a/keyboards/keebio/bdn9/keymaps/rishka/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/rishka/keymap.c
@@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_MPRV, KC_END , KC_MNXT
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLD);
@@ -63,4 +63,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/test/keymap.c b/keyboards/keebio/bdn9/keymaps/test/keymap.c
index c42100ddf8..ecf7338a57 100644
--- a/keyboards/keebio/bdn9/keymaps/test/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/test/keymap.c
@@ -14,7 +14,7 @@ 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 (index == _LEFT) {
if (clockwise) {
rgblight_increase_hue();
@@ -36,4 +36,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
rgblight_decrease_val();
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/via/keymap.c b/keyboards/keebio/bdn9/keymaps/via/keymap.c
index b86f88a232..7c380a4fdd 100644
--- a/keyboards/keebio/bdn9/keymaps/via/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/via/keymap.c
@@ -41,7 +41,7 @@ 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 (index == _LEFT) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -63,4 +63,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c b/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c
index ca8679d574..f473c9a1f9 100644
--- a/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c
@@ -35,7 +35,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
// Tab right
@@ -54,4 +54,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(LGUI(KC_LBRC));
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c b/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c
index 7687ea2bfb..d1792d2b29 100644
--- a/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c
@@ -106,7 +106,7 @@ void keyboard_post_init_user(void) {
// return true;
// }
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if(base_mode == true) {
if (index == 0) {
if (clockwise) {
@@ -169,4 +169,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}