diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2016-06-29 18:47:53 -0400 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2016-06-29 18:47:53 -0400 |
| commit | 7db2ec1509f6e90f8feea7c9fa73350544235a25 (patch) | |
| tree | 7bf3636d27514673da54c743a9d7c701d5242cbf | |
| parent | 8125cdb88ce1201fcfd16ed4c5313222ef4c230c (diff) | |
| download | qmk_firmware-7db2ec1509f6e90f8feea7c9fa73350544235a25.tar.gz qmk_firmware-7db2ec1509f6e90f8feea7c9fa73350544235a25.zip | |
updates planck experimental, width of color output
| -rw-r--r-- | keyboards/planck/keymaps/experimental/keymap.c | 51 | ||||
| -rw-r--r-- | tmk_core/rules.mk | 2 |
2 files changed, 31 insertions, 22 deletions
diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c index 856059289..8ec335d7d 100644 --- a/keyboards/planck/keymaps/experimental/keymap.c +++ b/keyboards/planck/keymaps/experimental/keymap.c | |||
| @@ -23,15 +23,16 @@ extern keymap_config_t keymap_config; | |||
| 23 | #define _PLOVER 5 | 23 | #define _PLOVER 5 |
| 24 | #define _ADJUST 16 | 24 | #define _ADJUST 16 |
| 25 | 25 | ||
| 26 | // Macro name shortcuts | 26 | enum planck_keycodes { |
| 27 | #define QWERTY M(_QWERTY) | 27 | QWERTY = SAFE_RANGE, |
| 28 | #define COLEMAK M(_COLEMAK) | 28 | COLEMAK, |
| 29 | #define DVORAK M(_DVORAK) | 29 | DVORAK, |
| 30 | #define LOWER M(_LOWER) | 30 | PLOVER, |
| 31 | #define RAISE M(_RAISE) | 31 | LOWER, |
| 32 | #define M_BL 5 | 32 | RAISE, |
| 33 | #define PLOVER M(12) | 33 | BACKLIT, |
| 34 | #define EXT_PLV M(13) | 34 | EXT_PLV |
| 35 | }; | ||
| 35 | 36 | ||
| 36 | // Fillers to make layering more clear | 37 | // Fillers to make layering more clear |
| 37 | #define _______ KC_TRNS | 38 | #define _______ KC_TRNS |
| @@ -193,10 +194,10 @@ void persistant_default_layer_set(uint16_t default_layer) { | |||
| 193 | default_layer_set(default_layer); | 194 | default_layer_set(default_layer); |
| 194 | } | 195 | } |
| 195 | 196 | ||
| 196 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 197 | |
| 197 | { | 198 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 198 | switch(id) { | 199 | switch (keycode) { |
| 199 | case _QWERTY: | 200 | case QWERTY: |
| 200 | if (record->event.pressed) { | 201 | if (record->event.pressed) { |
| 201 | #ifdef AUDIO_ENABLE | 202 | #ifdef AUDIO_ENABLE |
| 202 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 203 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); |
| @@ -204,7 +205,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 204 | persistant_default_layer_set(1UL<<_QWERTY); | 205 | persistant_default_layer_set(1UL<<_QWERTY); |
| 205 | } | 206 | } |
| 206 | break; | 207 | break; |
| 207 | case _COLEMAK: | 208 | return false; |
| 209 | case COLEMAK: | ||
| 208 | if (record->event.pressed) { | 210 | if (record->event.pressed) { |
| 209 | #ifdef AUDIO_ENABLE | 211 | #ifdef AUDIO_ENABLE |
| 210 | PLAY_NOTE_ARRAY(tone_colemak, false, 0); | 212 | PLAY_NOTE_ARRAY(tone_colemak, false, 0); |
| @@ -212,7 +214,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 212 | persistant_default_layer_set(1UL<<_COLEMAK); | 214 | persistant_default_layer_set(1UL<<_COLEMAK); |
| 213 | } | 215 | } |
| 214 | break; | 216 | break; |
| 215 | case _DVORAK: | 217 | return false; |
| 218 | case DVORAK: | ||
| 216 | if (record->event.pressed) { | 219 | if (record->event.pressed) { |
| 217 | #ifdef AUDIO_ENABLE | 220 | #ifdef AUDIO_ENABLE |
| 218 | PLAY_NOTE_ARRAY(tone_dvorak, false, 0); | 221 | PLAY_NOTE_ARRAY(tone_dvorak, false, 0); |
| @@ -220,7 +223,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 220 | persistant_default_layer_set(1UL<<_DVORAK); | 223 | persistant_default_layer_set(1UL<<_DVORAK); |
| 221 | } | 224 | } |
| 222 | break; | 225 | break; |
| 223 | case _LOWER: | 226 | return false; |
| 227 | case LOWER: | ||
| 224 | if (record->event.pressed) { | 228 | if (record->event.pressed) { |
| 225 | layer_on(_LOWER); | 229 | layer_on(_LOWER); |
| 226 | #ifdef BACKLIGHT_ENABLE | 230 | #ifdef BACKLIGHT_ENABLE |
| @@ -233,7 +237,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 233 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | 237 | update_tri_layer(_LOWER, _RAISE, _ADJUST); |
| 234 | } | 238 | } |
| 235 | break; | 239 | break; |
| 236 | case _RAISE: | 240 | return false; |
| 241 | case RAISE: | ||
| 237 | if (record->event.pressed) { | 242 | if (record->event.pressed) { |
| 238 | layer_on(_RAISE); | 243 | layer_on(_RAISE); |
| 239 | #ifdef BACKLIGHT_ENABLE | 244 | #ifdef BACKLIGHT_ENABLE |
| @@ -246,7 +251,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 246 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | 251 | update_tri_layer(_LOWER, _RAISE, _ADJUST); |
| 247 | } | 252 | } |
| 248 | break; | 253 | break; |
| 249 | case M_BL: | 254 | return false; |
| 255 | case BACKLIT: | ||
| 250 | if (record->event.pressed) { | 256 | if (record->event.pressed) { |
| 251 | register_code(KC_RSFT); | 257 | register_code(KC_RSFT); |
| 252 | #ifdef BACKLIGHT_ENABLE | 258 | #ifdef BACKLIGHT_ENABLE |
| @@ -256,7 +262,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 256 | unregister_code(KC_RSFT); | 262 | unregister_code(KC_RSFT); |
| 257 | } | 263 | } |
| 258 | break; | 264 | break; |
| 259 | case 12: | 265 | return false; |
| 266 | case PLOVER: | ||
| 260 | if (record->event.pressed) { | 267 | if (record->event.pressed) { |
| 261 | #ifdef AUDIO_ENABLE | 268 | #ifdef AUDIO_ENABLE |
| 262 | stop_all_notes(); | 269 | stop_all_notes(); |
| @@ -274,7 +281,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 274 | eeconfig_update_keymap(keymap_config.raw); | 281 | eeconfig_update_keymap(keymap_config.raw); |
| 275 | } | 282 | } |
| 276 | break; | 283 | break; |
| 277 | case 13: | 284 | return false; |
| 285 | case EXT_PLV: | ||
| 278 | if (record->event.pressed) { | 286 | if (record->event.pressed) { |
| 279 | #ifdef AUDIO_ENABLE | 287 | #ifdef AUDIO_ENABLE |
| 280 | PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); | 288 | PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); |
| @@ -282,9 +290,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 282 | layer_off(_PLOVER); | 290 | layer_off(_PLOVER); |
| 283 | } | 291 | } |
| 284 | break; | 292 | break; |
| 293 | return false; | ||
| 285 | 294 | ||
| 286 | } | 295 | } |
| 287 | return MACRO_NONE; | 296 | return true; |
| 288 | }; | 297 | }; |
| 289 | 298 | ||
| 290 | void matrix_init_user(void) { | 299 | void matrix_init_user(void) { |
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index e37ba0f83..a3ea4fc51 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk | |||
| @@ -75,7 +75,7 @@ endif | |||
| 75 | TAB_LOG = printf "\n$$LOG\n\n" | $(AWK) '{ sub(/^/," | "); print }' | 75 | TAB_LOG = printf "\n$$LOG\n\n" | $(AWK) '{ sub(/^/," | "); print }' |
| 76 | TAB_LOG_PLAIN = printf "$$LOG\n" | 76 | TAB_LOG_PLAIN = printf "$$LOG\n" |
| 77 | AWK_STATUS = $(AWK) '{ printf " %-10s\n", $$1; }' | 77 | AWK_STATUS = $(AWK) '{ printf " %-10s\n", $$1; }' |
| 78 | AWK_CMD = $(AWK) '{ printf "%-69s", $$0; }' | 78 | AWK_CMD = $(AWK) '{ printf "%-99s", $$0; }' |
| 79 | PRINT_ERROR = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) && false | 79 | PRINT_ERROR = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) && false |
| 80 | PRINT_WARNING = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) | 80 | PRINT_WARNING = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) |
| 81 | PRINT_ERROR_PLAIN = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN) && false | 81 | PRINT_ERROR_PLAIN = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN) && false |
