summaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
authorJoshua Rubin <joshuarubin@users.noreply.github.com>2020-04-12 23:32:46 -0600
committerGitHub <noreply@github.com>2020-04-13 07:32:46 +0200
commit7f4ce4a8b72c0038a7ffce18db7f98b5219dfd2c (patch)
treed9ccb4f9050fad2c366a13abe85c472c1bdb2d12 /keyboards
parent6452973761597871e9a6fc97981c2f70deb069c8 (diff)
Add via support to keebio/bdn9 (#8620)
Signed-off-by: Joshua Rubin <me@jawa.dev>
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/keebio/bdn9/keymaps/via/keymap.c52
-rw-r--r--keyboards/keebio/bdn9/keymaps/via/rules.mk5
2 files changed, 57 insertions, 0 deletions
diff --git a/keyboards/keebio/bdn9/keymaps/via/keymap.c b/keyboards/keebio/bdn9/keymaps/via/keymap.c
new file mode 100644
index 0000000000..6ef7a06eaf
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/via/keymap.c
@@ -0,0 +1,52 @@
+#include QMK_KEYBOARD_H
+
+enum layer_names {
+ _ZERO,
+ _ONE,
+ _TWO,
+ _THREE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[_ZERO] = LAYOUT(
+ KC_MPLY, KC_HOME, KC_MUTE,
+ MO(1), KC_UP, RGB_MOD,
+ KC_LEFT, KC_DOWN, KC_RGHT
+),
+
+[_ONE] = LAYOUT(
+ RESET, BL_STEP, KC_STOP,
+ _______, KC_HOME, RGB_MOD,
+ KC_MPRV, KC_END , KC_MNXT
+),
+
+[_TWO] = LAYOUT(
+ _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______
+),
+
+[_THREE] = LAYOUT(
+ _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______
+)
+
+};
+
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ } else if (index == 1) {
+ if (clockwise) {
+ tap_code(KC_WH_U);
+ } else {
+ tap_code(KC_WH_D);
+ }
+ }
+}
diff --git a/keyboards/keebio/bdn9/keymaps/via/rules.mk b/keyboards/keebio/bdn9/keymaps/via/rules.mk
new file mode 100644
index 0000000000..5b604f2b06
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/via/rules.mk
@@ -0,0 +1,5 @@
+VIA_ENABLE = yes
+LINK_TIME_OPTIMIZATION_ENABLE = yes
+MOUSEKEY_ENABLE = yes
+CONSOLE_ENABLE = no
+COMMAND_ENABLE = no