diff options
author | Drashna Jaelre <drashna@live.com> | 2019-05-19 10:01:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-19 10:01:16 -0700 |
commit | 6b8be985551efc5a5f95dfea6dc1554352bc46e0 (patch) | |
tree | cb0db9437ef27eef7c07a26f985a615d17a4d794 /keyboards | |
parent | 2a8fd5823244eb1c7e8906b4118f01d2078c4e28 (diff) | |
parent | 89e9785d7a87e8dbb941dd272c032f34658169fd (diff) |
[Keymap] Drashna Corne Keyboard updates (#5903)
* Re-enable Audio
And there was much rejoicingmake keebio/iris/rev2:drashna AUDIO_ENABLE=yes!
* Re-add debounce to ergodox EZ
* Fix rgb matrix helper function
* Make sure that RGM Matrix is checked properly
* Fix merge commit?
* Disable more RGB matrix modes
* Increase Debounce for Ergodox EZ
The performance improvements have made it necessary, actually
* Consolidate RGB Matrix layer indication function
And changes to iris
* Fix lighting issue for gamepad
* Update Corne Keyboard configuration
* Update Corne Keyboard layout
* Update KC_MAKE macro to better handle crkbd split
* Tweaks to Corne Keyboard Layout
* Enable RGB Matrix Sleep
* Update my code to use layer_state_t typedef
Diffstat (limited to 'keyboards')
-rw-r--r-- | keyboards/crkbd/keymaps/drashna/config.h | 16 | ||||
-rw-r--r-- | keyboards/crkbd/keymaps/drashna/keymap.c | 66 | ||||
-rw-r--r-- | keyboards/keebio/iris/keymaps/drashna/keymap.c | 2 | ||||
-rw-r--r-- | keyboards/keebio/iris/keymaps/drashna/rules.mk | 2 |
4 files changed, 78 insertions, 8 deletions
diff --git a/keyboards/crkbd/keymaps/drashna/config.h b/keyboards/crkbd/keymaps/drashna/config.h index 0b035ba3c3..724d52c38c 100644 --- a/keyboards/crkbd/keymaps/drashna/config.h +++ b/keyboards/crkbd/keymaps/drashna/config.h @@ -48,17 +48,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_KEYPRESSES // reacts to keypresses # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// # define DISABLE_RGB_MATRIX_ALPHAS_MODS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BREATHING # define DISABLE_RGB_MATRIX_CYCLE_ALL +# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON # define DISABLE_RGB_MATRIX_DUAL_BEACON # define DISABLE_RGB_MATRIX_RAINBOW_BEACON # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// #define DISABLE_RGB_MATRIX_RAINDROPS -// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// # define DISABLE_RGB_MATRIX_RAINDROPS +// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP +// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_SOLID_REACTIVE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE @@ -67,8 +74,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define DISABLE_RGB_MATRIX_SPLASH +// # define DISABLE_RGB_MATRIX_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_SPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif #ifdef AUDIO_ENABLE # define B6_AUDIO diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 3eea7af9f9..af0bc0d9a7 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -20,9 +20,9 @@ enum crkbd_keycodes { ) \ LAYOUT_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ - KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \ + KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ - LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \ + KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \ ) #define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__) @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY, - _______, _______, _______, KC_NUKE, TG_MODS, _______ + _______, KC_NUKE, _______, _______, TG_MODS, _______ ) }; @@ -156,6 +156,8 @@ void add_keylog(uint16_t keycode) { if (keycode < 60) { keylog_str[0] = code_to_name[keycode]; } + keylog_str[KEYLOG_LEN] = 0; + log_timer = timer_read(); } @@ -267,3 +269,61 @@ uint16_t get_tapping_term(uint16_t keycode) { return TAPPING_TERM; } } + +#ifdef RGB_MATRIX_ENABLE + +void suspend_power_down_keymap(void) { + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_keymap(void) { + rgb_matrix_set_suspend_state(false); +} + +void rgb_matrix_indicators_user(void) { + if ( userspace_config.rgb_layer_change && +#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED + !g_suspend_state && +#endif +#if defined(RGBLIGHT_ENABLE) + (!rgblight_config.enable && rgb_matrix_config.enable) +#else + rgb_matrix_config.enable +#endif + ) { + switch (biton32(layer_state)) { + case _MODS: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _GAMEPAD: + rgb_matrix_layer_helper(0xFF, 0x80, 0x00, LED_FLAG_UNDERGLOW); break; + case _DIABLO: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_UNDERGLOW); break; + case _RAISE: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _LOWER: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _ADJUST: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_UNDERGLOW); break; + default: + switch (biton32(default_layer_state)) { + case _QWERTY: + rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_UNDERGLOW); break; + case _COLEMAK: + rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_UNDERGLOW); break; + case _DVORAK: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _WORKMAN: + rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_UNDERGLOW); break; + case _NORMAN: + rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_UNDERGLOW); break; + case _MALTRON: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _EUCALYN: + rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_UNDERGLOW); break; + case _CARPLAX: + rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_UNDERGLOW); break; + } + } + } +} +#endif diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c index 95092cc521..44ffb59f6a 100644 --- a/keyboards/keebio/iris/keymaps/drashna/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c @@ -13,7 +13,7 @@ KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ - LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \ + KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ ) #define LAYOUT_iris_base_wrapper(...) LAYOUT_iris_base(__VA_ARGS__) diff --git a/keyboards/keebio/iris/keymaps/drashna/rules.mk b/keyboards/keebio/iris/keymaps/drashna/rules.mk index 1311ab2801..a315e1a0b1 100644 --- a/keyboards/keebio/iris/keymaps/drashna/rules.mk +++ b/keyboards/keebio/iris/keymaps/drashna/rules.mk @@ -5,7 +5,7 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration TAP_DANCE_ENABLE = no RGBLIGHT_ENABLE = yes -AUDIO_ENABLE = no +AUDIO_ENABLE = yes NKRO_ENABLE = yes BACKLIGHT_ENABLE = no SWAP_HANDS_ENABLE = no |