diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2019-08-13 12:25:51 -0500 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-08-13 10:25:51 -0700 |
commit | 0ec0d29e9f4d83af724d69efbaefeece57faddd9 (patch) | |
tree | a0334556fb16005ae2a98ffd1c5635c8d56476ac /keyboards/keebio/iris/keymaps/sethBarberee | |
parent | d8d2a096742f611e3ade527e7224e8281867c563 (diff) |
[Keymap] Adding my userspace and keymaps (#6496)
* add Userspace and keymaps
* Adding keymaps for zeal60 and iris
* Created my own tap dance that toggles RGB Mode based on whether I toggled caps lock or not
* parent 578ed42a7f8f986147cad040d50d4ae1d24a32e2
author Seth Barberee <seth.barberee@gmail.com> 1565065903 -0500
committer Seth Barberee <seth.barberee@gmail.com> 1565065903 -0500
move to userspace
add zeal60
* update based on review
* move userspace to github name
Diffstat (limited to 'keyboards/keebio/iris/keymaps/sethBarberee')
-rw-r--r-- | keyboards/keebio/iris/keymaps/sethBarberee/config.h | 60 | ||||
-rw-r--r-- | keyboards/keebio/iris/keymaps/sethBarberee/keymap.c | 179 | ||||
-rw-r--r-- | keyboards/keebio/iris/keymaps/sethBarberee/rules.mk | 8 |
3 files changed, 247 insertions, 0 deletions
diff --git a/keyboards/keebio/iris/keymaps/sethBarberee/config.h b/keyboards/keebio/iris/keymaps/sethBarberee/config.h new file mode 100644 index 0000000000..fd5bda8666 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/sethBarberee/config.h @@ -0,0 +1,60 @@ +/* +Copyright 2017 Danny Nguyen <danny@keeb.io> + +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/>. +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +//#define USE_I2C + +/* Select hand configuration */ + +//#define MASTER_LEFT +//#define MASTER_RIGHT +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLED_NUM 8 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLED_SPLIT { RGBLED_NUM, 0} // defined to sync animations + +#define FORCE_NKRO // force NKRO on by default + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + + +#if !defined(NO_DEBUG) && !defined(CONSOLE_ENABLE) +#define NO_DEBUG +#endif // !NO_DEBUG +#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) +#define NO_PRINT +#endif // !NO_PRINT + +#define NO_MUSIC_MODE + +// Override caps lock indication from my userspace +//#undef NORMAL_MODE +//#define NORMAL_MODE 1 + +//#undef CAPS_LOCK_MODE +//#define CAPS_LOCK_MODE 28 diff --git a/keyboards/keebio/iris/keymaps/sethBarberee/keymap.c b/keyboards/keebio/iris/keymaps/sethBarberee/keymap.c new file mode 100644 index 0000000000..1e39c33d18 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/sethBarberee/keymap.c @@ -0,0 +1,179 @@ +#include QMK_KEYBOARD_H +#include "sethBarberee.h" + +extern backlight_config_t backlight_config; + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +#define KC_ KC_TRNS + +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_RST RESET +#define KC_BL_S BL_STEP +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD +#define KC_VK VLK_TOG + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ECAP, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + LCTL, Z , X , C , V , B , SPC, RASE, N , M ,COMM,DOT ,SLSH,RSFT, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LGUI,LOWR, SPC, BSPC ,ENT,LALT + // `----+----+----' `----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RST , , , UP , , , GRV , P7 , P8 , P9 , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL , ,LEFT,DOWN,RGHT,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + BL_S, , , , ,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , ,LPRN , DEL , , P0 + // `----+----+----' `----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_ADJUST] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + VK, ,RHUD,RSAD,RVAD, , , , , , , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + BL_S,RST , , , , , , , , , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ) + +}; + +void keyboard_pre_init_user(void) { + // Make sure the red LEDs don't light + setPinOutput(D5); + writePinHigh(D5); + + setPinOutput(B0); + writePinHigh(B0); +} + +void keyboard_post_init_user(void){ + rgblight_enable_noeeprom(); // enable the RGBs + rgblight_sethsv_noeeprom_red(); // set to red + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // set to breathing +} + +void suspend_power_down_user(void){ + backlight_config.enable = false; // disable LED backlight +} + +void suspend_wakeup_init_user(void){ + backlight_config.enable = true; // enable LED backlight +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} + +uint32_t layer_state_set_user(uint32_t state){ + switch(biton32(state)) { + case _QWERTY: + rgblight_sethsv_noeeprom(HSV_RED); + break; + case _LOWER: + rgblight_sethsv_noeeprom(HSV_GREEN); + break; + case _RAISE: + rgblight_sethsv_noeeprom(HSV_BLUE); + break; + case _ADJUST: + rgblight_sethsv_noeeprom(HSV_ORANGE); + break; + default: + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3); + break; + + } + return state; +} diff --git a/keyboards/keebio/iris/keymaps/sethBarberee/rules.mk b/keyboards/keebio/iris/keymaps/sethBarberee/rules.mk new file mode 100644 index 0000000000..d7bc1927dc --- /dev/null +++ b/keyboards/keebio/iris/keymaps/sethBarberee/rules.mk @@ -0,0 +1,8 @@ +BOOTMAGIC_ENABLE = no +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable my Red LEDS +RGBLIGHT_ENABLE = yes # Enable my RGBS +VELOCIKEY_ENABLE = yes # I like RGB +TAP_DANCE_ENABLE = yes # fancy fancy Caps +LINK_TIME_OPTIMIZATION = yes # Enable link time optimization |