diff options
author | Priyadi Iman Nurcahyo <priyadi@priyadi.net> | 2016-12-04 23:57:47 +0700 |
---|---|---|
committer | Priyadi Iman Nurcahyo <priyadi@priyadi.net> | 2016-12-04 23:57:47 +0700 |
commit | fc80aa9974faad146837cd26d9264b5a6c74dd4b (patch) | |
tree | 893e6f573c2753a51f67ed3636110850036405c7 /keyboards/ergodox/keymaps/erez_experimental | |
parent | a8e5f6180585f46684d713976ad05d4d81b11ab1 (diff) | |
parent | f39e1b5dfe7552f01dbc6eab95c268f41a9d98e2 (diff) |
Merge branch 'master' into promethium
Diffstat (limited to 'keyboards/ergodox/keymaps/erez_experimental')
-rw-r--r-- | keyboards/ergodox/keymaps/erez_experimental/Makefile | 2 | ||||
-rw-r--r-- | keyboards/ergodox/keymaps/erez_experimental/config.h | 1 | ||||
-rw-r--r-- | keyboards/ergodox/keymaps/erez_experimental/keymap.c | 42 |
3 files changed, 36 insertions, 9 deletions
diff --git a/keyboards/ergodox/keymaps/erez_experimental/Makefile b/keyboards/ergodox/keymaps/erez_experimental/Makefile index b673c5ce52..51a0c74c54 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..4da18c65aa 100644 --- a/keyboards/ergodox/keymaps/erez_experimental/config.h +++ b/keyboards/ergodox/keymaps/erez_experimental/config.h @@ -8,5 +8,6 @@ #undef LEADER_TIMEOUT #define LEADER_TIMEOUT 300 + #endif diff --git a/keyboards/ergodox/keymaps/erez_experimental/keymap.c b/keyboards/ergodox/keymaps/erez_experimental/keymap.c index 4804959d63..2963c40e31 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 * @@ -65,33 +71,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | |NxtTab|PrvTab| | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | | | | | | + * | | | |TOG | * ,------|------|------| |------+------+------. - * | | | | | | | | + * |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, KC_AMPR, KC_UNDS, KC_MINS, CM_SCLN, KC_PLUS, KC_TRNS, 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_TOG, KC_TRNS, + RGB_SAI, + RGB_SAD, KC_TRNS, RGB_MOD ), /* Keymap 2: Media and mouse keys * @@ -152,6 +158,24 @@ 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) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0xff,0x00,0xbb); + #endif + } + return false; + break; + } + return true; +} + LEADER_EXTERNS(); // Runs constantly in the background, in a loop. |