summaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
authorAdam Lickel <adam@lickel.com>2022-02-21 09:35:23 -0800
committerGitHub <noreply@github.com>2022-02-21 09:35:23 -0800
commita5901a6c0d4f5495279467650797a4fa0ac40368 (patch)
treeee08bf0b68686e2d70ecf79cda3c4d5c54500393 /keyboards
parent25ba9b41c119fde21b5c996a90a0b28b3e32d271 (diff)
[Keymap] BDN9 keymap (#15924)
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/keebio/bdn9/keymaps/lickel/keymap.c157
-rw-r--r--keyboards/keebio/bdn9/keymaps/lickel/readme.md17
-rw-r--r--keyboards/keebio/bdn9/keymaps/lickel/rules.mk5
3 files changed, 179 insertions, 0 deletions
diff --git a/keyboards/keebio/bdn9/keymaps/lickel/keymap.c b/keyboards/keebio/bdn9/keymaps/lickel/keymap.c
new file mode 100644
index 0000000000..7067b12d87
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/lickel/keymap.c
@@ -0,0 +1,157 @@
+/* Copyright 2022 @ Adam Lickel
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
+
+enum encoder_names {
+ _LEFT,
+ _RIGHT,
+ _MIDDLE,
+};
+
+enum bdn9_layers {
+ _MEDIA = 0,
+ _XCODE,
+ _CUST1,
+ _CUST2,
+};
+
+#define KC_XCRUN LGUI(KC_R)
+#define KC_XCPAUSE LCTL(LGUI(KC_Y))
+#define KC_XCSTOP LGUI(KC_DOT)
+
+// clang-format off
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_MEDIA] = LAYOUT(
+ TO(_XCODE), RGB_SPD, RGB_SPI,
+ RGB_MOD, KC_MPLY, KC_MSTP,
+ RGB_RMOD, KC_MNXT, KC_MPRV
+ ),
+ [_XCODE] = LAYOUT(
+ TG(_XCODE), KC_NO, KC_NO,
+ KC_XCRUN, KC_XCPAUSE, KC_XCSTOP,
+ KC_F6, KC_F7, KC_F8
+ ),
+ [_CUST1] = LAYOUT(
+ TG(_CUST1), _______, _______,
+ _______, _______, _______,
+ _______, _______, _______
+ ),
+ [_CUST2] = LAYOUT(
+ TG(_CUST2), _______, _______,
+ _______, _______, _______,
+ _______, _______, _______
+ ),
+};
+
+// clang-format on
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
+ uint8_t layer = get_highest_layer(state);
+
+ switch (layer) {
+ case _MEDIA: // Reset
+ rgblight_reload_from_eeprom();
+ break;
+
+ case _XCODE:
+ rgblight_sethsv_noeeprom(HSV_BLUE);
+# if defined(RGB_MATRIX_ENABLE) && defined(ENABLE_RGB_MATRIX_BREATHING)
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_BREATHING);
+# elif defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_EFFECT_BREATHING)
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 1);
+# endif
+ break;
+
+ case _CUST1:
+ rgblight_sethsv_noeeprom(HSV_GREEN);
+# if defined(RGB_MATRIX_ENABLE) && defined(ENABLE_RGB_MATRIX_BREATHING)
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_BREATHING);
+# elif defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_EFFECT_BREATHING)
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 1);
+# endif
+ break;
+
+ case _CUST2:
+ rgblight_sethsv_noeeprom(HSV_PURPLE);
+# if defined(RGB_MATRIX_ENABLE) && defined(ENABLE_RGB_MATRIX_BREATHING)
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_BREATHING);
+# elif defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_EFFECT_BREATHING)
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 1);
+# endif
+ break;
+
+ default:
+ break;
+ }
+#endif
+ return state;
+}
+
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ uint8_t layer = get_highest_layer(layer_state);
+
+ switch (layer) {
+#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
+ case 0: // Reset
+ 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();
+ }
+ }
+ break;
+#endif
+
+ default:
+ if (index == _LEFT) {
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ } else if (index == _MIDDLE) {
+ if (clockwise) {
+ tap_code(KC_DOWN);
+ } else {
+ tap_code(KC_UP);
+ }
+ } else if (index == _RIGHT) {
+ if (clockwise) {
+ tap_code(KC_PGDN);
+ } else {
+ tap_code(KC_PGUP);
+ }
+ }
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/keebio/bdn9/keymaps/lickel/readme.md b/keyboards/keebio/bdn9/keymaps/lickel/readme.md
new file mode 100644
index 0000000000..b729319b99
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/lickel/readme.md
@@ -0,0 +1,17 @@
+# lickel's BDN9 keymap
+
+- Via support is enabled by default
+- Changing layers to non-zero changes the RGBs to breathing colors
+- Changing to layer 0 resets the RGBs to EEPROM settings
+- Layer 0 encoders are: Hue, Saturation, Value
+- Other layers are: Volume, Arrow, Pg up/down
+
+- Layer 0: Media Controls & RGB Effects
+- Layer 1: Xcode Debugging
+- Layers 2 and 3: Reserved for Via
+
+## Changelog
+
+### 1/17/2022 - 1.0
+
+- Initial release
diff --git a/keyboards/keebio/bdn9/keymaps/lickel/rules.mk b/keyboards/keebio/bdn9/keymaps/lickel/rules.mk
new file mode 100644
index 0000000000..c44f74d53a
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/lickel/rules.mk
@@ -0,0 +1,5 @@
+VIA_ENABLE = yes
+LTO_ENABLE = yes
+MOUSEKEY_ENABLE = yes
+CONSOLE_ENABLE = no
+COMMAND_ENABLE = no