summaryrefslogtreecommitdiff
path: root/keyboards/ergodox/keymaps
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-11-18 22:22:29 -0500
committerJack Humbert <jack.humb@gmail.com>2016-11-18 22:22:29 -0500
commitab6557c1a04b7f6a1d262d07f9b42e7e28d8028a (patch)
treed4747efac27d00a4f3d64a6fb970d8eb36882333 /keyboards/ergodox/keymaps
parent161bd5596b5d8199f2e56246a27ccbdb8c80bb36 (diff)
parent285c5a91f23e972d9c579184283443111186329d (diff)
wqMerge branch 'wu5y7' of https://github.com/jackhumbert/qmk_firmware into wu5y7
Diffstat (limited to 'keyboards/ergodox/keymaps')
-rw-r--r--keyboards/ergodox/keymaps/erez_experimental/Makefile2
-rw-r--r--keyboards/ergodox/keymaps/erez_experimental/config.h11
-rw-r--r--keyboards/ergodox/keymaps/erez_experimental/keymap.c36
3 files changed, 42 insertions, 7 deletions
diff --git a/keyboards/ergodox/keymaps/erez_experimental/Makefile b/keyboards/ergodox/keymaps/erez_experimental/Makefile
index b673c5ce52..dbe89d1410 100644
--- a/keyboards/ergodox/keymaps/erez_experimental/Makefile
+++ b/keyboards/ergodox/keymaps/erez_experimental/Makefile
@@ -3,6 +3,8 @@
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
COMMAND_ENABLE = no # Commands for debug and configuration
+RGBLIGHT_ENABLE = yes
+MIDI_ENABLE = yes
ifndef QUANTUM_DIR
include ../../../../Makefile
diff --git a/keyboards/ergodox/keymaps/erez_experimental/config.h b/keyboards/ergodox/keymaps/erez_experimental/config.h
index e5d7fe1885..fbd12ab797 100644
--- a/keyboards/ergodox/keymaps/erez_experimental/config.h
+++ b/keyboards/ergodox/keymaps/erez_experimental/config.h
@@ -8,5 +8,16 @@
#undef LEADER_TIMEOUT
#define LEADER_TIMEOUT 300
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D7
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 15 // Number of LEDs
+#define RGBLIGHT_HUE_STEP 12
+#define RGBLIGHT_SAT_STEP 255
+#define RGBLIGHT_VAL_STEP 12
+
+#define RGB_MIDI
+#define RGBW_BB_TWI
#endif
diff --git a/keyboards/ergodox/keymaps/erez_experimental/keymap.c b/keyboards/ergodox/keymaps/erez_experimental/keymap.c
index 4804959d63..4a23c7ac58 100644
--- a/keyboards/ergodox/keymaps/erez_experimental/keymap.c
+++ b/keyboards/ergodox/keymaps/erez_experimental/keymap.c
@@ -7,6 +7,12 @@
#define SYMB 1 // symbols
#define MDIA 2 // media keys
+enum custom_keycodes {
+ PLACEHOLDER = SAFE_RANGE, // can always be here
+ RGB_FF00BB // always start with RGB_
+};
+
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
@@ -67,22 +73,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
- * | | | | | | | |
+ * |VAI |VAD |HUI | |SAI |TOG |MOD |
* | | |------| |------| | |
- * | | | | | | | |
+ * | | |HUD | |SAD | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[SYMB] = KEYMAP(
// left hand
- KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
+ RGB_FF00BB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5,
KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_TRNS, KC_TRNS,KC_TRNS,LCTL(KC_PGUP), LCTL(KC_PGDN),
KC_TRNS,KC_TRNS,
- KC_TRNS,
- KC_TRNS,KC_TRNS,KC_TRNS,
+ RGB_HUI,
+ RGB_VAI,RGB_VAD,RGB_HUD,
// right hand
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12,
@@ -90,8 +96,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_PIPE, KC_AT, KC_EQL, KC_PERC, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
- KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS
+ RGB_SAI,
+ RGB_SAD, RGB_TOG, RGB_MOD
),
/* Keymap 2: Media and mouse keys
*
@@ -152,6 +158,22 @@ void matrix_init_user(void) {
};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ // dynamically generate these.
+ case RGB_FF00BB:
+ if (record->event.pressed) {
+ rgblight_enable();
+ rgblight_mode(1);
+ rgblight_setrgb(0xff,0x00,0xbb);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
+
LEADER_EXTERNS();
// Runs constantly in the background, in a loop.