updates planck experimental, width of color output
This commit is contained in:
parent
8125cdb88c
commit
7db2ec1509
@ -23,15 +23,16 @@ extern keymap_config_t keymap_config;
|
|||||||
#define _PLOVER 5
|
#define _PLOVER 5
|
||||||
#define _ADJUST 16
|
#define _ADJUST 16
|
||||||
|
|
||||||
// Macro name shortcuts
|
enum planck_keycodes {
|
||||||
#define QWERTY M(_QWERTY)
|
QWERTY = SAFE_RANGE,
|
||||||
#define COLEMAK M(_COLEMAK)
|
COLEMAK,
|
||||||
#define DVORAK M(_DVORAK)
|
DVORAK,
|
||||||
#define LOWER M(_LOWER)
|
PLOVER,
|
||||||
#define RAISE M(_RAISE)
|
LOWER,
|
||||||
#define M_BL 5
|
RAISE,
|
||||||
#define PLOVER M(12)
|
BACKLIT,
|
||||||
#define EXT_PLV M(13)
|
EXT_PLV
|
||||||
|
};
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
// Fillers to make layering more clear
|
||||||
#define _______ KC_TRNS
|
#define _______ KC_TRNS
|
||||||
@ -193,10 +194,10 @@ void persistant_default_layer_set(uint16_t default_layer) {
|
|||||||
default_layer_set(default_layer);
|
default_layer_set(default_layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
||||||
{
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch(id) {
|
switch (keycode) {
|
||||||
case _QWERTY:
|
case QWERTY:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
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)
|
|||||||
persistant_default_layer_set(1UL<<_QWERTY);
|
persistant_default_layer_set(1UL<<_QWERTY);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case _COLEMAK:
|
return false;
|
||||||
|
case COLEMAK:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
|
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)
|
|||||||
persistant_default_layer_set(1UL<<_COLEMAK);
|
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case _DVORAK:
|
return false;
|
||||||
|
case DVORAK:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
|
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)
|
|||||||
persistant_default_layer_set(1UL<<_DVORAK);
|
persistant_default_layer_set(1UL<<_DVORAK);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case _LOWER:
|
return false;
|
||||||
|
case LOWER:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
layer_on(_LOWER);
|
layer_on(_LOWER);
|
||||||
#ifdef BACKLIGHT_ENABLE
|
#ifdef BACKLIGHT_ENABLE
|
||||||
@ -233,7 +237,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case _RAISE:
|
return false;
|
||||||
|
case RAISE:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
layer_on(_RAISE);
|
layer_on(_RAISE);
|
||||||
#ifdef BACKLIGHT_ENABLE
|
#ifdef BACKLIGHT_ENABLE
|
||||||
@ -246,7 +251,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case M_BL:
|
return false;
|
||||||
|
case BACKLIT:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
register_code(KC_RSFT);
|
register_code(KC_RSFT);
|
||||||
#ifdef BACKLIGHT_ENABLE
|
#ifdef BACKLIGHT_ENABLE
|
||||||
@ -256,7 +262,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
unregister_code(KC_RSFT);
|
unregister_code(KC_RSFT);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 12:
|
return false;
|
||||||
|
case PLOVER:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
stop_all_notes();
|
stop_all_notes();
|
||||||
@ -274,7 +281,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 13:
|
return false;
|
||||||
|
case EXT_PLV:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);
|
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)
|
|||||||
layer_off(_PLOVER);
|
layer_off(_PLOVER);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
return MACRO_NONE;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
|
@ -75,7 +75,7 @@ endif
|
|||||||
TAB_LOG = printf "\n$$LOG\n\n" | $(AWK) '{ sub(/^/," | "); print }'
|
TAB_LOG = printf "\n$$LOG\n\n" | $(AWK) '{ sub(/^/," | "); print }'
|
||||||
TAB_LOG_PLAIN = printf "$$LOG\n"
|
TAB_LOG_PLAIN = printf "$$LOG\n"
|
||||||
AWK_STATUS = $(AWK) '{ printf " %-10s\n", $$1; }'
|
AWK_STATUS = $(AWK) '{ printf " %-10s\n", $$1; }'
|
||||||
AWK_CMD = $(AWK) '{ printf "%-69s", $$0; }'
|
AWK_CMD = $(AWK) '{ printf "%-99s", $$0; }'
|
||||||
PRINT_ERROR = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) && false
|
PRINT_ERROR = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) && false
|
||||||
PRINT_WARNING = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG)
|
PRINT_WARNING = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG)
|
||||||
PRINT_ERROR_PLAIN = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN) && false
|
PRINT_ERROR_PLAIN = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN) && false
|
||||||
|
Loading…
Reference in New Issue
Block a user