summaryrefslogtreecommitdiff
path: root/layouts/community
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2018-11-05 21:36:26 -0800
committerJack Humbert <jack.humb@gmail.com>2018-11-06 00:36:26 -0500
commitf2101cfb6a2270345fe6235d4c36e2e0d49db528 (patch)
treedfa98b41f5dc9afd377712bb54aa6c0dde848178 /layouts/community
parent672926562519c1ee7370b3ef188c11525de326e5 (diff)
downloadqmk_firmware-f2101cfb6a2270345fe6235d4c36e2e0d49db528.tar.gz
qmk_firmware-f2101cfb6a2270345fe6235d4c36e2e0d49db528.zip
Update to drashna keymaps (#4365)
* Consistency fixes and more eeprom defaults * Handle setting Unicode mode on eeprom reset better * Unicode EEPROM hack * Re-enable permissive hold and ignore mod tap * Set unicode input mode * More unicode stuff * more haaaaaacks * Attempted RGB Cleanup * Fix compiler issue * Add GitLab CI config for personal compiling * Add avr gcc version to GitLab CI script * Add rgblight init to matrix init
Diffstat (limited to 'layouts/community')
-rw-r--r--layouts/community/ergodox/drashna/keymap.c2
-rw-r--r--layouts/community/ortho_4x12/drashna/config.h2
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c52
3 files changed, 35 insertions, 21 deletions
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c
index 518eaf0348..360a2d9c6d 100644
--- a/layouts/community/ergodox/drashna/keymap.c
+++ b/layouts/community/ergodox/drashna/keymap.c
@@ -40,7 +40,7 @@ bool skip_leds = false;
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, KC_QUOT, \
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, CTL_T(K2A), KC_MRSF, \
- KC_GRV, OSM(MOD_MEH),OSM(MOD_LGUI),KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC_IRNY, \
+ KC_GRV, OSM(MOD_MEH),OSM(MOD_LGUI),KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC_SHRG, \
OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \
KC_HOME, KC_PGUP, \
LT(_LOWER, KC_SPACE),KC_BSPC, KC_END, KC_PGDN, KC_DEL, LT(_RAISE, KC_ENTER) \
diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h
index b4c780cc11..f279651b63 100644
--- a/layouts/community/ortho_4x12/drashna/config.h
+++ b/layouts/community/ortho_4x12/drashna/config.h
@@ -18,7 +18,7 @@
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
// #define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1
// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
// #define EECONFIG_RGB_MATRIX (uint32_t *)16
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index 108df69315..2a9e32cc88 100644
--- a/layouts/community/ortho_4x12/drashna/keymap.c
+++ b/layouts/community/ortho_4x12/drashna/keymap.c
@@ -17,6 +17,10 @@
#include QMK_KEYBOARD_H
#include "drashna.h"
+#ifdef RGB_MATRIX_ENABLE
+extern bool g_suspend_state;
+#endif
+
#ifdef BACKLIGHT_ENABLE
enum planck_keycodes {
BACKLIT = NEW_SAFE_RANGE,
@@ -135,6 +139,15 @@ bool music_mask_user(uint16_t keycode) {
#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_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
rgb_led led;
@@ -152,25 +165,26 @@ void rgb_matrix_indicators_user(void) {
uint8_t this_mod = get_mods();
uint8_t this_led = host_keyboard_leds();
uint8_t this_osm = get_oneshot_mods();
-
- switch (biton32(layer_state)) {
- case _RAISE:
- rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break;
- case _LOWER:
- rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break;
- case _ADJUST:
- rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break;
- default:
- switch (biton32(default_layer_state)) {
- case _QWERTY:
- rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, true); break;
- case _COLEMAK:
- rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, true); break;
- case _DVORAK:
- rgb_matrix_layer_helper(0x00, 0xFF, 0x00, true); break;
- case _WORKMAN:
- rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, true); break;
- }
+ if (!g_suspend_state) {
+ switch (biton32(layer_state)) {
+ case _RAISE:
+ rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break;
+ case _LOWER:
+ rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break;
+ case _ADJUST:
+ rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break;
+ default:
+ switch (biton32(default_layer_state)) {
+ case _QWERTY:
+ rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, true); break;
+ case _COLEMAK:
+ rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, true); break;
+ case _DVORAK:
+ rgb_matrix_layer_helper(0x00, 0xFF, 0x00, true); break;
+ case _WORKMAN:
+ rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, true); break;
+ }
+ }
}
switch (biton32(default_layer_state)) {