summaryrefslogtreecommitdiff
path: root/keyboards/keebio/bdn9/keymaps/test
diff options
context:
space:
mode:
authorDanny <nooges@users.noreply.github.com>2020-06-09 22:32:46 -0400
committerGitHub <noreply@github.com>2020-06-09 22:32:46 -0400
commit184c362324171a77e108fe29058fa51c438d04b4 (patch)
tree8fcd9671b5a1e5bbfa513f0eb0599ed5ee9afab7 /keyboards/keebio/bdn9/keymaps/test
parent1d1c0503b669abcf8c059a5962e6819b1376a885 (diff)
Add BDN9 rev2 (#9017)
Diffstat (limited to 'keyboards/keebio/bdn9/keymaps/test')
-rw-r--r--keyboards/keebio/bdn9/keymaps/test/config.h5
-rw-r--r--keyboards/keebio/bdn9/keymaps/test/keymap.c49
2 files changed, 54 insertions, 0 deletions
diff --git a/keyboards/keebio/bdn9/keymaps/test/config.h b/keyboards/keebio/bdn9/keymaps/test/config.h
new file mode 100644
index 0000000000..e09fba9232
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/test/config.h
@@ -0,0 +1,5 @@
+#pragma once
+
+#ifdef RGB_MATRIX_ENABLE
+# define RGB_MATRIX_KEYPRESSES
+#endif
diff --git a/keyboards/keebio/bdn9/keymaps/test/keymap.c b/keyboards/keebio/bdn9/keymaps/test/keymap.c
new file mode 100644
index 0000000000..244b5f7cb3
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/test/keymap.c
@@ -0,0 +1,49 @@
+#include QMK_KEYBOARD_H
+
+enum encoder_names {
+ _LEFT,
+ _RIGHT,
+ _MIDDLE,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT(
+ KC_A, KC_B, KC_C,
+ KC_D, KC_E, KC_F,
+ KC_G, KC_H, RGB_MOD
+ ),
+ /*
+ | RESET | N/A | Media Stop |
+ | Held: Layer 2 | Home | RGB Mode |
+ | Media Previous | End | Media Next |
+ */
+ [1] = LAYOUT(
+ RESET , BL_STEP, KC_STOP,
+ _______, KC_HOME, RGB_MOD,
+ KC_MPRV, KC_END , KC_MNXT
+ ),
+};
+
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == _LEFT) {
+ if (clockwise) {
+ rgblight_increase_hue();
+ } else {
+ rgblight_decrease_hue();
+ }
+ }
+ else if (index == _MIDDLE) {
+ if (clockwise) {
+ rgblight_increase_sat();
+ } else {
+ rgblight_decrease_sat();
+ }
+ }
+ else if (index == _RIGHT) {
+ if (clockwise) {
+ rgblight_increase_val();
+ } else {
+ rgblight_decrease_val();
+ }
+ }
+}