summaryrefslogtreecommitdiffstats
path: root/layouts/community/ergodox/drashna
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-11-20 12:37:24 -0800
committerGitHub <noreply@github.com>2019-11-20 12:37:24 -0800
commiteb91c962886b1bb52c2d457a574cba09e2a8b0f0 (patch)
tree20f3d49671b6d42ca1edf285431e3e4120551228 /layouts/community/ergodox/drashna
parent8e8986b2506ca4cdd2339a441314a0838e3a4329 (diff)
[Keymap] All about (ARM) RGB and OLEDs (drashna keymaps) (#7354)
* Add Kyria Keymap * Enable all RGBLIGHT Animations for ARM and high capacity AVR * Reduce GNUC version for __has_include * Cleanup Ortho 4x12 Community layout * Update Collide 39 keymap * Cleanup Keymaps * Enable full 30 LEDs for Ergodox * Change EEPROM Load timing * Use RGB Matrix on Planck Rev6 * Use correct keymap swap * Enable everything for ARM * Only enable rgb sleep on avr until crash is fixed * Add additional Kyria keymap config * Overhaul Kyria OLED display * Improve kyria keymap based on usage * Minor tweaks to rules * Update OLED code to truncate properly * Fix RGB Light layer indication * Switch all of biton32 to get_highest_layer function * Fix OLED Keylogger display * Run qmk cformat over all of my user files * Slight tweak to kyria based on usage * Move around LALT_T config * Add comments about base wrappers to keymaps * Another cformat pass * Temp fix for VUSB boards and NKRO * Convert tabs to spaces in rules.mk files * Only enable RGBLight if it's enabled * Add Encoder Flip setting * Update OLED font file
Diffstat (limited to 'layouts/community/ergodox/drashna')
-rw-r--r--layouts/community/ergodox/drashna/config.h15
-rw-r--r--layouts/community/ergodox/drashna/keymap.c33
-rw-r--r--layouts/community/ergodox/drashna/rules.mk4
3 files changed, 21 insertions, 31 deletions
diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h
index 4943832990..0091ebcde8 100644
--- a/layouts/community/ergodox/drashna/config.h
+++ b/layouts/community/ergodox/drashna/config.h
@@ -1,18 +1,19 @@
#pragma once
#ifdef RGBLIGHT_ENABLE
-# undef RGBLIGHT_SAT_STEP
-# define RGBLIGHT_SAT_STEP 12
-
-# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
-# define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
-#endif // RGBLIGHT_ENABLE
+# undef RGBLIGHT_SAT_STEP
+# define RGBLIGHT_SAT_STEP 12
+# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
+# define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
+#endif // RGBLIGHT_ENABLE
#undef PRODUCT
-#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine
+#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine
#undef DEBOUNCE
#define DEBOUNCE 30
#define TAPPING_TERM_PER_KEY
+
+#define ERGODOX_LED_30
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c
index 6ed4558e27..8308bfdaa1 100644
--- a/layouts/community/ergodox/drashna/keymap.c
+++ b/layouts/community/ergodox/drashna/keymap.c
@@ -1,20 +1,3 @@
-/*
-This is the keymap for the keyboard
-Copyright 2012 Jun Wako <wakojun@gmail.com>
-Copyright 2015 Jack Humbert
-Copyright 2017 Art Ortenburger
-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
#include "drashna.h"
#ifdef UNICODEMAP_ENABLE
@@ -32,6 +15,13 @@ enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE };
// define layer change stuff for underglow indicator
bool skip_leds = false;
+/*
+ * The `LAYOUT_ergodox_pretty_base` macro is a template to allow the use of
+ * identical modifiers for the default layouts (eg QWERTY, Colemak, Dvorak,
+ * etc), so that there is no need to set them up for each layout, and modify
+ * all of them if I want to change them. This helps to keep consistency and
+ * ease of use. K## is a placeholder to pass through the individual keycodes
+ */
// clang-format off
#define LAYOUT_ergodox_pretty_base( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
@@ -40,8 +30,8 @@ bool skip_leds = false;
) \
LAYOUT_ergodox_pretty_wrapper( \
KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \
- KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \
- KC_C1R3, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
+ LALT_T(KC_TAB), K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \
+ KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \
KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \
OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \
@@ -402,7 +392,7 @@ void rgb_matrix_indicators_user(void) {
rgb_matrix_config.enable
# endif
) {
- switch (biton32(layer_state)) {
+ switch (get_highest_layer(layer_state)) {
case _GAMEPAD:
rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q
@@ -432,7 +422,7 @@ void rgb_matrix_indicators_user(void) {
break;
default: {
bool mods_enabled = IS_LAYER_ON(_MODS);
- switch (biton32(default_layer_state)) {
+ switch (get_highest_layer(default_layer_state)) {
case _QWERTY:
rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
break;
@@ -466,7 +456,6 @@ void rgb_matrix_indicators_user(void) {
#endif // RGB_MATRIX_INIT
-
uint16_t get_tapping_term(uint16_t keycode) {
if (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) {
if (mod_config(keycode & 0xf) & MOD_MASK_ALT) {
diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk
index f9f9ea2bab..3aee59df6c 100644
--- a/layouts/community/ergodox/drashna/rules.mk
+++ b/layouts/community/ergodox/drashna/rules.mk
@@ -3,8 +3,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
COMMAND_ENABLE = no # Commands for debug and configuration
SPACE_CADET_ENABLE = no
ifeq ($(strip $(KEYBOARD)), ergodox_ez)
- RGBLIGHT_ENABLE = yes
- RGB_MATRIX_ENABLE = no
+ RGBLIGHT_ENABLE = yes
+ RGB_MATRIX_ENABLE = no
endif
CONSOLE_ENABLE = no
BOOTMAGIC_ENABLE = yes