Merge pull request #1 from qmk/master

pull
reviewable/pr1298/r1
barrar 8 years ago committed by GitHub
commit 4fe58aa6ec

@ -255,7 +255,7 @@ float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
#endif /* AUDIO_ENABLE */ #endif /* AUDIO_ENABLE */
void persistant_default_layer_set(uint16_t default_layer) void persistent_default_layer_set(uint16_t default_layer)
{ {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
@ -366,7 +366,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
case MACRO_QWERTY: case MACRO_QWERTY:
if (record->event.pressed) if (record->event.pressed)
{ {
persistant_default_layer_set(1UL<<LAYER_QWERTY); persistent_default_layer_set(1UL<<LAYER_QWERTY);
} }
break; break;

@ -168,7 +168,7 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -177,25 +177,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
case DVORAK: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;
case DVORMAC: case DVORMAC:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORMAC); persistent_default_layer_set(1UL<<_DVORMAC);
} }
return false; return false;
break; break;

@ -119,7 +119,7 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -128,25 +128,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
case DVORAK: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;
case WOW: case WOW:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_WOW); persistent_default_layer_set(1UL<<_WOW);
} }
return false; return false;
break; break;

@ -151,7 +151,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
} }
} }
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -160,19 +160,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
case DVORAK: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -256,7 +256,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -266,25 +266,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
/* layout switcher */ /* layout switcher */
case LAY_QWE: case LAY_QWE:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<QWE); persistent_default_layer_set(1UL<<QWE);
} }
return false; return false;
break; break;
case LAY_COL: case LAY_COL:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<COL); persistent_default_layer_set(1UL<<COL);
} }
return false; return false;
break; break;
case LAY_WOR: case LAY_WOR:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<WOR); persistent_default_layer_set(1UL<<WOR);
} }
return false; return false;
break; break;
case LAY_DVO: case LAY_DVO:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<DVO); persistent_default_layer_set(1UL<<DVO);
} }
return false; return false;
break; break;

@ -254,7 +254,7 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -265,17 +265,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) { switch(id) {
case _DV: case _DV:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DV); persistent_default_layer_set(1UL<<_DV);
} }
break; break;
case _QW: case _QW:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QW); persistent_default_layer_set(1UL<<_QW);
} }
break; break;
case _CM: case _CM:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_CM); persistent_default_layer_set(1UL<<_CM);
} }
break; break;
} }

@ -121,7 +121,7 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -131,17 +131,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) { switch(id) {
case _DV: case _DV:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DV); persistent_default_layer_set(1UL<<_DV);
} }
break; break;
case _QW: case _QW:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QW); persistent_default_layer_set(1UL<<_QW);
} }
break; break;
case _CM: case _CM:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_CM); persistent_default_layer_set(1UL<<_CM);
} }
break; break;
} }

@ -147,7 +147,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -186,7 +186,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -216,7 +216,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -955,7 +955,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
#ifdef RGBSPS_ENABLE #ifdef RGBSPS_ENABLE
@ -1134,14 +1134,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// layout switchers // layout switchers
case QWERTY: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
#ifdef LAYOUT_DVORAK #ifdef LAYOUT_DVORAK
case DVORAK: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;
@ -1149,7 +1149,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef LAYOUT_COLEMAK #ifdef LAYOUT_COLEMAK
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -1157,7 +1157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef LAYOUT_WORKMAN #ifdef LAYOUT_WORKMAN
case WORKMAN: case WORKMAN:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_WORKMAN); persistent_default_layer_set(1UL<<_WORKMAN);
} }
return false; return false;
break; break;
@ -1165,7 +1165,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef LAYOUT_NORMAN #ifdef LAYOUT_NORMAN
case NORMAN: case NORMAN:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_NORMAN); persistent_default_layer_set(1UL<<_NORMAN);
} }
return false; return false;
break; break;

@ -146,7 +146,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO_NONE; return MACRO_NONE;
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -155,19 +155,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
case DVORAK: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -283,7 +283,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }

@ -8,7 +8,7 @@ needed, they will be mapped to home row keys. The `keymap.c` file will contain
the exact changes. The diagrams in this README shows the highlights of the the exact changes. The diagrams in this README shows the highlights of the
changes from the default mappings. changes from the default mappings.
I also decided to change all calls to `persistant_default_layer_set()` to I also decided to change all calls to `persistent_default_layer_set()` to
`default_layer_set()` since this is my personal perference. `default_layer_set()` since this is my personal perference.
## Macros ## Macros

@ -269,7 +269,7 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -279,17 +279,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) { switch(id) {
case _DV: case _DV:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DV); persistent_default_layer_set(1UL<<_DV);
} }
break; break;
case _QW: case _QW:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QW); persistent_default_layer_set(1UL<<_QW);
} }
break; break;
case _CM: case _CM:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_CM); persistent_default_layer_set(1UL<<_CM);
} }
break; break;
} }

@ -186,7 +186,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
bool TOG_STATUS = false; bool TOG_STATUS = false;
int RGB_current_mode; int RGB_current_mode;
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -208,7 +208,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -217,7 +217,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -226,7 +226,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -138,7 +138,7 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -150,7 +150,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -147,7 +147,7 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -147,7 +147,7 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -152,7 +152,7 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -164,7 +164,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -173,7 +173,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -182,7 +182,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -150,19 +150,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
case DVORAK: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -76,7 +76,7 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -86,17 +86,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) { switch(id) {
case _DV: case _DV:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DV); persistent_default_layer_set(1UL<<_DV);
} }
break; break;
case _QW: case _QW:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QW); persistent_default_layer_set(1UL<<_QW);
} }
break; break;
case _CM: case _CM:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_CM); persistent_default_layer_set(1UL<<_CM);
} }
break; break;
} }

@ -80,8 +80,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
} }
}; };
// Set a layer persistantly. // Set a layer persistently.
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }

@ -149,7 +149,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;

@ -186,7 +186,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -216,7 +216,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -7,5 +7,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
TAP_DANCE_ENABLE = no TAP_DANCE_ENABLE = yes
AUDIO_ENABLE = no AUDIO_ENABLE = no
API_SYSEX_ENABLE = no

@ -1,23 +1,31 @@
#ifndef CONFIG_USER_H #ifndef CONFIG_USER_H
#define CONFIG_USER_H #define CONFIG_USER_H
#ifndef NO_DEBUG
#define NO_DEBUG
#endif
#ifndef NO_PRINT
#define NO_PRINT
#endif
#include "../../config.h" #include "../../config.h"
#define TAPPING_TOGGLE 2
#define TAPPING_TERM 300
#define ONESHOT_TAP_TOGGLE 2
#define ONESHOT_TIMEOUT 300
#define _______ KC_TRNS #define _______ KC_TRNS
#define XXXXXXX KC_NO #define XXXXXXX KC_NO
#define ONESHOT_TAP_TOGGLE 2
#define ONESHOT_TIMEOUT 500
#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 60
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0
#define DM_PLAY DYN_MACRO_PLAY1
#define DM_STRT DYN_REC_START1
#define DM_STOP DYN_REC_STOP
#define OSL_RSE OSL(RSE)
#define OSL_LWR OSL(LWR)
#define OSL_FUN OSL(FUN)
#define OSM_CTL OSM(MOD_LCTL)
#define OSM_ALT OSM(MOD_LALT)
#define OSM_SFT OSM(MOD_LSFT)
#endif #endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

@ -7,7 +7,10 @@
extern keymap_config_t keymap_config; extern keymap_config_t keymap_config;
enum planck_layers { DEF, LWR, RSE, FUN }; enum planck_layers { DEF, LWR, RSE, FUN };
enum planck_keycodes { M1 = SAFE_RANGE, M2, M3, M4 }; enum planck_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE };
enum tap_dance_keys { TD_SCLN };
#include "dynamic_macro.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default /* Default
@ -16,16 +19,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+-------------+------+------+------+------+------| * |------+------+------+------+------+-------------+------+------+------+------+------|
* | A | S | D | F | G | Tab | Enter| H | J | K | L | ; | * | A | S | D | F | G | Tab | Enter| H | J | K | L | ; |
* |------+------+------+------+------+------|------+------+------+------+------+------| * |------+------+------+------+------+------|------+------+------+------+------+------|
* | Z | X | C | V | B | Shift| Play | N | M | , | . | / | * | Z | X | C | V | B | Shift|DmPlay| N | M | , | . | / |
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | Super| Alt | Fun | Lower| Space | Raise| Left | Down | Up |Right | * | Ctrl | Super| Alt | Fun | Lower| Space | Raise| Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[DEF] = { [DEF] = {
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P}, {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P},
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, TD(TD_SCLN)},
{KC_Z, KC_X, KC_C, KC_V, KC_B, OSM(MOD_LSFT), XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, {KC_Z, KC_X, KC_C, KC_V, KC_B, OSM_SFT, DM_PLAY, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
{KC_LCTL, KC_LGUI, KC_LALT, TT(FUN), TT(LWR), KC_SPC, KC_SPC, TT(RSE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} {OSM_CTL, KC_LGUI, OSM_ALT, OSL_FUN, OSL_LWR, KC_SPC, KC_SPC, OSL_RSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
}, },
/* Lower /* Lower
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
@ -50,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+-------------+------+------+------+------+------| * |------+------+------+------+------+-------------+------+------+------+------+------|
* | ` | | | | | | | - | = | | [ | ] | * | ` | | | | | | | - | = | | [ | ] |
* |------+------+------+------+------+------|------+------+------+------+------+------| * |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | | * | | | | | | | | | | | ' | \ |
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Home | PgDn | PgUp | End | * | | | | | | | | Home | PgDn | PgUp | End |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
@ -65,30 +68,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | Reset|Delete| F6 | F7 | F8 | F9 | F10 | * | F1 | F2 | F3 | F4 | F5 | Reset|Delete| F6 | F7 | F8 | F9 | F10 |
* |------+------+------+------+------+-------------+------+------+------+------+------| * |------+------+------+------+------+-------------+------+------+------+------+------|
* | F11 | F12 | F13 | F14 | F15 | | | F16 | F17 | F18 | F19 | F20 | * | F11 | F12 | F13 | F14 | F15 | | | |MsWhLt|MsWhDn|MsWhUp|MsWhRt|
* |------+------+------+------+------+------|------+------+------+------+------+------| * |------+------+------+------+------+------|------+------+------+------+------+------|
* |BlTggl|BlStep| | M1 | M2 | | | M3 | M4 |MsBtn1|MsBtn2|MsBtn3| * |BlTggl|BlStep| | | |DmStrt|DmStop| | |MsBtn1|MsBtn2|MsBtn3|
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | |MsLeft|MsDown| MsUp |MsRght| * | | | | | | | |MsLeft|MsDown| MsUp |MsRght|
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[FUN] = { [FUN] = {
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, KC_DEL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10}, {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, KC_DEL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10},
{KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20}, {KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R},
{BL_TOGG, BL_STEP, _______, M1, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3}, {BL_TOGG, BL_STEP, _______, _______, _______, DM_STRT, DM_STOP, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R} {_______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R}
}, },
}; };
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_SCLN] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, S(KC_SCLN)) // once for semi-colon, twice for colon
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { if (!process_record_dynamic_macro(keycode, record)) {
case M1: return false;
if (record->event.pressed) {
SEND_STRING(" 2>&1 > ");
}
return false;
break;
} }
return true; return true;
} }

@ -0,0 +1,12 @@
About
------
A simple split qwerty Planck layout that makes use of one-shot modifiers,
one-shot layers, tap-dance keys and dynamic macros.
Layout
-------
![Layout](keyboard-layout.jpg "Keyboard Layout")

@ -88,8 +88,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
} }
}; };
// Set a layer persistantly. // Set a layer persistently.
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }

@ -204,7 +204,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -217,7 +217,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
break; break;
return false; return false;
@ -226,7 +226,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
break; break;
return false; return false;
@ -235,7 +235,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
break; break;
return false; return false;

@ -164,7 +164,7 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -176,7 +176,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_workman, false, 0); PLAY_NOTE_ARRAY(tone_workman, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_WORKMAN); persistent_default_layer_set(1UL<<_WORKMAN);
} }
return false; return false;
break; break;
@ -185,7 +185,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -200,7 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
keymap_config.raw = eeconfig_read_keymap(); keymap_config.raw = eeconfig_read_keymap();
keymap_config.nkro = 1; keymap_config.nkro = 1;
eeconfig_update_keymap(keymap_config.raw); eeconfig_update_keymap(keymap_config.raw);
persistant_default_layer_set(1UL<<_PLOVER); persistent_default_layer_set(1UL<<_PLOVER);
} }
return false; return false;
break; break;

@ -270,7 +270,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }

@ -6,7 +6,7 @@ needed, they will be mapped to home row keys. The `keymap.c` file will contain
the exact changes. The diagrams in this README shows the highlights of the the exact changes. The diagrams in this README shows the highlights of the
changes from the default mappings. changes from the default mappings.
I also decided to change all calls to `persistant_default_layer_set()` to I also decided to change all calls to `persistent_default_layer_set()` to
`default_layer_set()` since this is my personal perference. `default_layer_set()` since this is my personal perference.
## Macros ## Macros

@ -183,7 +183,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -195,7 +195,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_workman, false, 0); PLAY_NOTE_ARRAY(tone_workman, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_WORKMAN); persistent_default_layer_set(1UL<<_WORKMAN);
} }
return false; return false;
break; break;
@ -212,7 +212,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;

@ -213,7 +213,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -251,7 +251,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -260,7 +260,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -269,7 +269,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -143,7 +143,7 @@ float goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -156,7 +156,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
break; break;
case _COLEMAK: case _COLEMAK:
@ -164,7 +164,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
break; break;
case _DVORAK: case _DVORAK:
@ -172,7 +172,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
break; break;
case _LOWER: case _LOWER:

@ -100,7 +100,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -112,7 +112,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -121,7 +121,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -130,7 +130,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -233,7 +233,7 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif /* AUDIO_ENABLE */ #endif /* AUDIO_ENABLE */
void persistant_default_layer_set(uint16_t default_layer) void persistent_default_layer_set(uint16_t default_layer)
{ {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
@ -344,7 +344,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
case MACRO_QWERTY: case MACRO_QWERTY:
if (record->event.pressed) if (record->event.pressed)
{ {
persistant_default_layer_set(1UL<<LAYER_QWERTY); persistent_default_layer_set(1UL<<LAYER_QWERTY);
} }
break; break;

@ -139,7 +139,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -151,7 +151,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -160,7 +160,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;

@ -162,7 +162,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -174,7 +174,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -183,7 +183,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -192,7 +192,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -183,7 +183,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -195,7 +195,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -204,7 +204,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -213,7 +213,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -209,7 +209,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -222,7 +222,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
break; break;
case _COLEMAK: case _COLEMAK:
@ -230,7 +230,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
break; break;
case _DVORAK: case _DVORAK:
@ -238,7 +238,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
break; break;
case _LOWER: case _LOWER:

@ -159,7 +159,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -171,7 +171,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -180,7 +180,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -16,7 +16,7 @@ void tap(uint16_t keycode){
unregister_code(keycode); unregister_code(keycode);
}; };
void persistant_default_layer_set(uint16_t default_layer){ void persistent_default_layer_set(uint16_t default_layer){
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
}; };
@ -200,7 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case COLEMAK: case COLEMAK:
if(record->event.pressed){ if(record->event.pressed){
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
@ -209,7 +209,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break; break;
case SWCOLE: case SWCOLE:
if(record->event.pressed){ if(record->event.pressed){
persistant_default_layer_set(1UL<<_SWCOLE); persistent_default_layer_set(1UL<<_SWCOLE);
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_swcole, false, 0); PLAY_NOTE_ARRAY(tone_swcole, false, 0);
#endif #endif

@ -134,7 +134,7 @@ void matrix_init_user(void) {
#endif #endif
} }
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -146,7 +146,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
break; break;
case GAME: case GAME:
@ -154,7 +154,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_game, false, STACCATO); PLAY_NOTE_ARRAY(tone_game, false, STACCATO);
#endif #endif
persistant_default_layer_set(1UL<<_GAME); persistent_default_layer_set(1UL<<_GAME);
} }
break; break;
case RAISE: case RAISE:

@ -225,7 +225,7 @@ float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND); float goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -238,7 +238,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
break; break;
case _COLEMAK: case _COLEMAK:
@ -246,7 +246,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
break; break;
case _DVORAK: case _DVORAK:
@ -254,7 +254,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
break; break;
case _GAME: case _GAME:
@ -262,7 +262,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_GAME); persistent_default_layer_set(1UL<<_GAME);
} }
break; break;
case _NUMPAD: case _NUMPAD:
@ -270,7 +270,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_NUMPAD); persistent_default_layer_set(1UL<<_NUMPAD);
} }
break; break;
case _ARROW: case _ARROW:
@ -278,7 +278,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_LOWER); persistent_default_layer_set(1UL<<_LOWER);
} }
break; break;
case _LOWER: case _LOWER:

@ -180,7 +180,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -192,7 +192,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -201,7 +201,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -210,7 +210,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -196,7 +196,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -231,7 +231,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break; break;
case MQWERTY: case MQWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_MQWERTY); persistent_default_layer_set(1UL<<_MQWERTY);
} }
return false; return false;
break; break;

@ -82,7 +82,7 @@ float tone_startup[][2] = {
float tone_goodbye[][2] = SONG(GOODBYE_SOUND); float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }

@ -183,7 +183,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -195,7 +195,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -204,7 +204,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -213,7 +213,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -177,7 +177,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -16,7 +16,7 @@ void tap(uint16_t keycode){
unregister_code(keycode); unregister_code(keycode);
}; };
void persistant_default_layer_set(uint16_t default_layer){ void persistent_default_layer_set(uint16_t default_layer){
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
}; };
@ -200,7 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case COLEMAK: case COLEMAK:
if(record->event.pressed){ if(record->event.pressed){
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
@ -209,7 +209,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break; break;
case SWCOLE: case SWCOLE:
if(record->event.pressed){ if(record->event.pressed){
persistant_default_layer_set(1UL<<_SWCOLE); persistent_default_layer_set(1UL<<_SWCOLE);
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_swcole, false, 0); PLAY_NOTE_ARRAY(tone_swcole, false, 0);
#endif #endif

@ -31,7 +31,7 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -41,7 +41,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) { switch(id) {
case _NP: case _NP:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_NP); persistent_default_layer_set(1UL<<_NP);
} }
break; break;
} }

@ -38,7 +38,7 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -48,12 +48,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) { switch(id) {
case _L1: case _L1:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_L1); persistent_default_layer_set(1UL<<_L1);
} }
break; break;
case _NP: case _NP:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_NP); persistent_default_layer_set(1UL<<_NP);
} }
break; break;
} }

@ -0,0 +1,21 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

@ -0,0 +1,98 @@
#include "satan.h"
// Used for SHIFT_ESC
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _BL 0
#define _FL 1
#define _______ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,-----------------------------------------------------------.
* |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
* |-----------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |
* |-----------------------------------------------------------|
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |
* |-----------------------------------------------------------|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
* |-----------------------------------------------------------|
* |Ctrl|Gui |Alt | Space |Alt |Gui |FN |Ctrl |
* `-----------------------------------------------------------'
*/
[_BL] = KEYMAP_ANSI(
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC,KC_BSLS, \
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O,KC_QUOT, KC_ENT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \
KC_LCTL, MO(_FL), KC_LGUI, KC_SPC, KC_RALT,KC_RGUI, MO(_FL),KC_RCTL),
/* Keymap _FL: Function Layer
* ,-----------------------------------------------------------.
* | | | | | | | | | | | | | | RESET|
* |-----------------------------------------------------------|
* | | | | | | | | | | | |BL-|BL+|BL |
* |--------------------------------------------ΩΩ---------------|
* | | | | | | | | | | | | |
* |-----------------------------------------------------------|
* | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | |
* |-----------------------------------------------------------|
* | | | | | | | | |
* `-----------------------------------------------------------'
*/
[_FL] = KEYMAP_ANSI(
#ifdef RGBLIGHT_ENABLE
KC_GRV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG, \
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
_______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______, \
_______,_______,_______, _______, _______,_______,_______, _______),
#else
KC_GRV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \
_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, BL_DEC, BL_INC,BL_TOGG, \
KC_DEL, KC_VOLD,KC_MUTE,KC_VOLU,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,_______,_______, \
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
_______,_______,_______, _______, _______,_______,_______,_______),
#endif
};
enum function_id {
SHIFT_ESC,
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_FUNCTION(SHIFT_ESC),
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
static uint8_t shift_esc_shift_mask;
switch (id) {
case SHIFT_ESC:
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
if (record->event.pressed) {
if (shift_esc_shift_mask) {
add_key(KC_GRV);
send_keyboard_report();
} else {
add_key(KC_ESC);
send_keyboard_report();
}
} else {
if (shift_esc_shift_mask) {
del_key(KC_GRV);
send_keyboard_report();
} else {
del_key(KC_ESC);
send_keyboard_report();
}
}
break;
}
}

@ -0,0 +1 @@
# Colemak layout for GH60 Satan

@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
) )
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -120,19 +120,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
case DVORAK: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -177,7 +177,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -0,0 +1,3 @@
ifndef MAKEFILE_INCLUDED
include ../../Makefile
endif

@ -0,0 +1,147 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
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/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER Bathroom Epiphanies
#define PRODUCT tiger_lily
#define DESCRIPTION Tiger Lily controller for the Filco Majestouch 2
/*
* Frosty Flake Rev. 20140521 made by Bathroom Ephiphanies
* Ported from the Bathroom Epiphanies TMK Firmware:
* https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers
*
*/
/* key matrix size */
#define MATRIX_ROWS 8 // Row0 - Row7 in the schematic
#define MATRIX_COLS 18 // ColA - ColR in the schematic
/*
* Keyboard Matrix Assignments
*/
#define UNUSED_PINS { B0, C4, D3 }
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/*
* Force NKRO
*
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
* makefile for this to work.)
*
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
* until the next keyboard reset.
*
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
* fully operational during normal computer usage.
*
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
* power-up.
*
*/
//#define FORCE_NKRO
/*
* Magic Key Options
*
* Magic keys are hotkey commands that allow control over firmware functions of
* the keyboard. They are best used in combination with the HID Listen program,
* found here: https://www.pjrc.com/teensy/hid_listen.html
*
* The options below allow the magic key functionality to be changed. This is
* useful if your keyboard/keypad is missing keys and you want magic key support.
*
*/
/* key combination for magic key command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* control how magic key switches layers */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
/* override magic key keymap */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
//#define MAGIC_KEY_HELP1 H
//#define MAGIC_KEY_HELP2 SLASH
//#define MAGIC_KEY_DEBUG D
//#define MAGIC_KEY_DEBUG_MATRIX X
//#define MAGIC_KEY_DEBUG_KBD K
//#define MAGIC_KEY_DEBUG_MOUSE M
//#define MAGIC_KEY_VERSION V
//#define MAGIC_KEY_STATUS S
//#define MAGIC_KEY_CONSOLE C
//#define MAGIC_KEY_LAYER0_ALT1 ESC
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
//#define MAGIC_KEY_LAYER0 0
//#define MAGIC_KEY_LAYER1 1
//#define MAGIC_KEY_LAYER2 2
//#define MAGIC_KEY_LAYER3 3
//#define MAGIC_KEY_LAYER4 4
//#define MAGIC_KEY_LAYER5 5
//#define MAGIC_KEY_LAYER6 6
//#define MAGIC_KEY_LAYER7 7
//#define MAGIC_KEY_LAYER8 8
//#define MAGIC_KEY_LAYER9 9
//#define MAGIC_KEY_BOOTLOADER PAUSE
//#define MAGIC_KEY_LOCK CAPS
//#define MAGIC_KEY_EEPROM E
//#define MAGIC_KEY_NKRO N
//#define MAGIC_KEY_SLEEP_LED Z
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#endif

@ -0,0 +1,21 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

@ -0,0 +1,8 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
// place overrides here
#endif

@ -0,0 +1,11 @@
#include "tiger_lily.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP(\
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT)
};

@ -0,0 +1 @@
# The default keymap for tiger_lily

@ -0,0 +1,137 @@
/*
Copyright 2017 Gabriel Young <gabeplaysdrums@live.com>
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 <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <util/delay.h>
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#ifndef DEBOUNCING_DELAY
# define DEBOUNCING_DELAY 5
#endif
static uint8_t debouncing = DEBOUNCING_DELAY;
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
static matrix_row_t scan_col(void) {
return (
(PINC&(1<<2) ? 0 : ((matrix_row_t)1<<0)) | \
(PINB&(1<<3) ? 0 : ((matrix_row_t)1<<1)) | \
(PINB&(1<<4) ? 0 : ((matrix_row_t)1<<2)) | \
(PINB&(1<<2) ? 0 : ((matrix_row_t)1<<3)) | \
(PINB&(1<<1) ? 0 : ((matrix_row_t)1<<4)) | \
(PINC&(1<<7) ? 0 : ((matrix_row_t)1<<5)) | \
(PINB&(1<<6) ? 0 : ((matrix_row_t)1<<6)) | \
(PINB&(1<<5) ? 0 : ((matrix_row_t)1<<7))
);
}
static void select_col(uint8_t col) {
switch (col) {
case 0: PORTD = (PORTD & ~0b01110111) | 0b01110110; break; \
case 1: PORTD = (PORTD & ~0b01110111) | 0b01100001; break; \
case 2: PORTD = (PORTD & ~0b01110111) | 0b01100101; break; \
case 3: PORTD = (PORTD & ~0b01110111) | 0b00000011; break; \
case 4: PORTD = (PORTD & ~0b01110111) | 0b00000111; break; \
case 5: PORTD = (PORTD & ~0b01110111) | 0b00010011; break; \
case 6: PORTD = (PORTD & ~0b01110111) | 0b00010111; break; \
case 7: PORTD = (PORTD & ~0b01110111) | 0b00100011; break; \
case 8: PORTD = (PORTD & ~0b01110111) | 0b00100111; break; \
case 9: PORTD = (PORTD & ~0b01110111) | 0b00110011; break; \
case 10: PORTD = (PORTD & ~0b01110111) | 0b01110010; break; \
case 11: PORTD = (PORTD & ~0b01110111) | 0b01100110; break; \
case 12: PORTD = (PORTD & ~0b01110111) | 0b01110000; break; \
case 13: PORTD = (PORTD & ~0b01110111) | 0b01100100; break; \
case 14: PORTD = (PORTD & ~0b01110111) | 0b01100000; break; \
case 15: PORTD = (PORTD & ~0b01110111) | 0b01000111; break; \
case 16: PORTD = (PORTD & ~0b01110111) | 0b01000011; break; \
case 17: PORTD = (PORTD & ~0b01110111) | 0b00110111; break;
}
}
void matrix_init(void) {
/* Column output pins */ \
DDRD |= 0b01110111; \
/* Row input pins */ \
DDRC &= ~0b10000100; \
DDRB &= ~0b01111110; \
PORTC |= 0b10000100; \
PORTB |= 0b01111110;
for (uint8_t i=0; i < MATRIX_ROWS; i++)
matrix[i] = matrix_debouncing[i] = 0;
matrix_init_quantum();
}
uint8_t matrix_scan(void) {
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
select_col(col);
_delay_us(3);
matrix_row_t col_scan = scan_col();
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
bool curr_bit = col_scan & (1<<row);
if (prev_bit != curr_bit) {
matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
debouncing = DEBOUNCING_DELAY;
}
}
}
if (debouncing) {
if (--debouncing)
_delay_ms(1);
else
for (uint8_t i = 0; i < MATRIX_ROWS; i++)
matrix[i] = matrix_debouncing[i];
}
matrix_scan_quantum();
return 1;
}
inline matrix_row_t matrix_get_row(uint8_t row) {
return matrix[row];
}
void matrix_print(void) {
#ifndef NO_PRINT
print("\nr\\c ABCDEFGHIJKLMNOPQR\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
matrix_row_t matrix_row = matrix_get_row(row);
xprintf("%02X: ", row);
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
bool curr_bit = matrix_row & (1<<col);
xprintf("%c", curr_bit ? '*' : '.');
}
print("\n");
}
#endif
}
uint8_t matrix_key_count(void) {
uint8_t count = 0;
for (uint8_t row = 0; row < MATRIX_ROWS; row++)
count += bitpop32(matrix[row]);
return count;
}

@ -0,0 +1,32 @@
tiger_lily keyboard firmware
======================
This is the firmware for Rev. 20161114 of the Tiger Lily controller by [Bathroom Epiphanies](http://bathroomepiphanies.com/controllers/), a replacement controller for the [Filco Majestouch 2 104 key](https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=1819). Bathroom Epiphanies has advised that the source is also compatible with the Black Petal controller, however I do not own an example to test against.
The code was adapted from the [BathroomEpiphanies TMK Firmware](https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers).
## Quantum MK Firmware
For the full Quantum feature list, see [the parent readme](/).
## Building
Download or clone the whole firmware and navigate to the keyboards/tiger_lily folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
Depending on which keymap you would like to use, you will have to compile slightly differently.
### Default
To build with the default keymap, simply run `make default`.
### Other Keymaps
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
```
$ make [default|jack|<name>]
```
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.

@ -0,0 +1,71 @@
# MCU name
#MCU = at90usb1287
MCU = atmega32u2
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section Size in *bytes*
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= yes # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE ?= no # USB Nkey Rollover
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE ?= no # MIDI controls
UNICODE_ENABLE ?= no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE ?= no # Audio output on port C6
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
CUSTOM_MATRIX = yes
SRC += matrix.c

@ -0,0 +1,63 @@
#include "tiger_lily.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
DDRB |= (1<<7);
DDRC |= (1<<5) | (1<<6);
print_dec(usb_led);
if (usb_led & (1<<USB_LED_NUM_LOCK))
PORTC &= ~(1<<5);
else
PORTC |= (1<<5);
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
PORTB &= ~(1<<7);
else
PORTB |= (1<<7);
if (usb_led & (1<<USB_LED_CAPS_LOCK))
PORTC &= ~(1<<6);
else
PORTC |= (1<<6);
led_set_user(usb_led);
}
__attribute__ ((weak))
void matrix_init_user(void) {
}
__attribute__ ((weak))
void matrix_scan_user(void) {
}
__attribute__ ((weak))
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
__attribute__ ((weak))
void led_set_user(uint8_t usb_led) {
}

@ -0,0 +1,50 @@
#ifndef TIGER_LILY_H
#define TIGER_LILY_H
#include "quantum.h"
// This a shortcut to help you visually see your layout.
// The following is an example using the Planck MIT layout
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
/*
Matrix col/row mapping
,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
| J6 | | I4 | H4 | H2 | H6 | | A7 | E6 | D2 | D4 | | B4 | B7 | B6 | B0 | | C7 | C5 | A5 |
`----' `-------------------' `-------------------' `-------------------' `--------------'
,-------------------------------------------------------------------------. ,--------------. ,-------------------.
| J4 | J7 | I7 | H7 | G7 | G4 | F4 | F7 | E7 | D7 | R7 | R4 | E4 | B2 | | L4 | O4 | Q4 | | K1 | L1 | Q1 | Q0 |
|-------------------------------------------------------------------------| |--------------| |-------------------|
| J2 | J5 | I5 | H5 | G5 | G2 | F2 | F5 | E5 | D5 | R5 | R2 | E2 | B3 | | K4 | O7 | Q7 | | K5 | L5 | Q5 | O5 |
|-------------------------------------------------------------------------| '--------------' |-------------- |
| O5 | J3 | I3 | H3 | G3 | G6 | F6 | F3 | E3 | D3 | R3 | R6 | B1 | | K2 | L2 | Q2 | |
|-------------------------------------------------------------------------| ,----. |-------------------|
| N2 | J1 | I1 | H1 | G1 | G0 | F0 | F1 | E1 | D1 | R0 | N3 | | O6 | | K3 | L3 | Q3 | O3 |
|-------------------------------------------------------------------------| ,--------------. |-------------- |
| A4 | P2 | C6 | K6 | C0 | M3 | D0 | A1 | | O0 | K0 | L0 | | L6 | Q6 | |
`-------------------------------------------------------------------------' `--------------' `-------------------'
*/
#define KEYMAP( \
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \
KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \
) \
{ \
/* Columns and rows need to be swapped in the below definition */ \
/* A B C D E F G H I J K L M N O P Q R */ \
/* 0 */ { KC_NO, KB0, KC0, KD0, KC_NO, KF0, KG0, KC_NO, KC_NO, KC_NO, KK0, KL0, KC_NO, KC_NO, KO0, KC_NO, KQ0, KR0 }, \
/* 1 */ { KA1, KB1, KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, KC_NO, KC_NO, KC_NO, KC_NO, KQ1, KC_NO }, \
/* 2 */ { KC_NO, KB2, KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KC_NO, KN2, KC_NO, KP2, KQ2, KR2 }, \
/* 3 */ { KC_NO, KB3, KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KQ3, KR3 }, \
/* 4 */ { KA4, KB4, KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KC_NO, KC_NO, KO4, KC_NO, KQ4, KR4 }, \
/* 5 */ { KA5, KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KC_NO, KC_NO, KO5, KC_NO, KQ5, KR5 }, \
/* 6 */ { KC_NO, KB6, KC6, KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO, KC_NO, KO6, KC_NO, KQ6, KR6 }, \
/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \
}
#endif

@ -69,7 +69,7 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -79,17 +79,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) { switch(id) {
case _DV: case _DV:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DV); persistent_default_layer_set(1UL<<_DV);
} }
break; break;
case _QW: case _QW:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QW); persistent_default_layer_set(1UL<<_QW);
} }
break; break;
case _CM: case _CM:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_CM); persistent_default_layer_set(1UL<<_CM);
} }
break; break;
} }

@ -285,7 +285,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/ /*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }

@ -8,7 +8,7 @@ needed, they will be mapped to home row keys. The `keymap.c` file will contain
the exact changes. The diagrams in this README shows the highlights of the the exact changes. The diagrams in this README shows the highlights of the
changes from the default mappings. changes from the default mappings.
I also decided to change all calls to `persistant_default_layer_set()` to I also decided to change all calls to `persistent_default_layer_set()` to
`default_layer_set()` since this is my personal perference. `default_layer_set()` since this is my personal perference.
## Macros ## Macros

@ -171,7 +171,7 @@ ALT_T(BACKLIT), _______ , _______ , KC_MPLY , KC_MNXT , _____
/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ /*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -180,19 +180,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
case DVORAK: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
} }
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -80,19 +80,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
case DVORAK: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

@ -299,7 +299,7 @@ float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
#endif /* AUDIO_ENABLE */ #endif /* AUDIO_ENABLE */
void persistant_default_layer_set(uint16_t default_layer) void persistent_default_layer_set(uint16_t default_layer)
{ {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
@ -427,7 +427,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
case MACRO_QWERTY: case MACRO_QWERTY:
if (record->event.pressed) if (record->event.pressed)
{ {
persistant_default_layer_set(1UL<<LAYER_QWERTY); persistent_default_layer_set(1UL<<LAYER_QWERTY);
} }
break; break;

@ -537,6 +537,21 @@ void process_action(keyrecord_t *record, action_t action)
break; break;
} }
#ifndef NO_ACTION_LAYER
// if this event is a layer action, update the leds
switch (action.kind.id) {
case ACT_LAYER:
#ifndef NO_ACTION_TAPPING
case ACT_LAYER_TAP:
case ACT_LAYER_TAP_EXT:
#endif
led_set(host_keyboard_leds());
break;
default:
break;
}
#endif
#ifndef NO_ACTION_ONESHOT #ifndef NO_ACTION_ONESHOT
/* Because we switch layers after a oneshot event, we need to release the /* Because we switch layers after a oneshot event, we need to release the
* key before we leave the layer or no key up event will be generated. * key before we leave the layer or no key up event will be generated.

Loading…
Cancel
Save