Improve and Cleanup Shutdown callbacks (#21060)
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
This commit is contained in:
parent
4601f339e4
commit
3ef06aa732
|
@ -283,6 +283,65 @@ void suspend_wakeup_init_user(void) {
|
|||
* Keyboard/Revision: `void suspend_power_down_kb(void)` and `void suspend_wakeup_init_user(void)`
|
||||
* Keymap: `void suspend_power_down_kb(void)` and `void suspend_wakeup_init_user(void)`
|
||||
|
||||
|
||||
# Keyboard Shutdown/Reboot Code
|
||||
|
||||
This function gets called whenever the firmware is reset, whether it's a soft reset or reset to the bootloader. This is the spot to use for any sort of cleanup, as this happens right before the actual reset. And it can be useful for turning off different systems (such as RGB, onboard screens, etc).
|
||||
|
||||
Additionally, it differentiates between the soft reset (eg, rebooting back into the firmware) or jumping to the bootloader.
|
||||
|
||||
Certain tasks are performed during shutdown too. The keyboard is cleared, music and midi is stopped (if enabled), the shutdown chime is triggered (if audio is enabled), and haptic is stopped.
|
||||
|
||||
If `jump_to_bootloader` is set to `true`, this indicates that the board will be entering the bootloader for a new firmware flash, whereas `false` indicates that this is happening for a soft reset and will load the firmware agaim immediately (such as when using `QK_REBOOT` or `QK_CLEAR_EEPROM`).
|
||||
|
||||
As there is a keyboard and user level function, returning `false` for the user function will disable the keyboard level function, allowing for customization.
|
||||
|
||||
?> Bootmagic does not trigger `shutdown_*()` as it happens before most of the initialization process.
|
||||
|
||||
### Example `shutdown_kb()` Implementation
|
||||
|
||||
```c
|
||||
bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (jump_to_bootloader) {
|
||||
// red for bootloader
|
||||
rgb_matrix_set_color_all(RGB_OFF);
|
||||
} else {
|
||||
// off for soft reset
|
||||
rgb_matrix_set_color_all(RGB_GREEN);
|
||||
}
|
||||
// force flushing -- otherwise will never happen
|
||||
rgb_matrix_update_pwm_buffers();
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
### Example `shutdown_user()` Implementation
|
||||
|
||||
```c
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
if (jump_to_bootloader) {
|
||||
// red for bootloader
|
||||
rgb_matrix_set_color_all(RGB_RED);
|
||||
} else {
|
||||
// off for soft reset
|
||||
rgb_matrix_set_color_all(RGB_OFF);
|
||||
}
|
||||
// force flushing -- otherwise will never happen
|
||||
rgb_matrix_update_pwm_buffers();
|
||||
// false to not process kb level
|
||||
return false;
|
||||
}
|
||||
```
|
||||
|
||||
### Keyboard shutdown/reboot Function Documentation
|
||||
|
||||
* Keyboard/Revision: `bool shutdown_kb(bool jump_to_bootloader)`
|
||||
* Keymap: `bool shutdown_user(bool jump_to_bootloader)`
|
||||
|
||||
# Deferred Execution :id=deferred-execution
|
||||
|
||||
QMK has the ability to execute a callback after a specified period of time, rather than having to manually manage timers. To enable this functionality, set `DEFERRED_EXEC_ENABLE = yes` in rules.mk.
|
||||
|
|
|
@ -183,22 +183,8 @@ void oled_render_boot(bool bootloader) {
|
|||
oled_render_dirty(true);
|
||||
}
|
||||
|
||||
bool reboot = false;
|
||||
|
||||
bool uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
|
||||
// Display a special message prior to rebooting...
|
||||
if (keycode == QK_BOOT) {
|
||||
reboot = true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void shutdown_user(void) {
|
||||
oled_render_boot(reboot);
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
oled_render_boot(jump_to_bootloader);
|
||||
}
|
||||
|
||||
```
|
||||
|
|
|
@ -66,15 +66,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
|
@ -166,39 +163,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//Tap Dance Definitions
|
||||
tap_dance_action_t tap_dance_actions[] = {
|
||||
//Tap once for Esc, twice for Caps Lock
|
||||
|
|
|
@ -210,15 +210,3 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
|
|||
// Forward-declare this helper function since it is defined in rgb_matrix.c.
|
||||
void rgb_matrix_update_pwm_buffers(void);
|
||||
#endif
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
rgblight_setrgb(RGB_RED);
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
rgb_matrix_set_color_all(RGB_RED);
|
||||
rgb_matrix_update_pwm_buffers();
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
}
|
||||
|
|
|
@ -255,15 +255,3 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
|||
// rgb_matrix.c.
|
||||
void rgb_matrix_update_pwm_buffers(void);
|
||||
#endif
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
rgblight_setrgb(RGB_RED);
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
rgb_matrix_set_color_all(RGB_RED);
|
||||
rgb_matrix_update_pwm_buffers();
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
}
|
||||
|
|
|
@ -134,15 +134,3 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
|||
// Forward-declare this helper function since it is defined in rgb_matrix.c.
|
||||
void rgb_matrix_update_pwm_buffers(void);
|
||||
#endif
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(1);
|
||||
rgblight_setrgb(RGB_RED);
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
rgb_matrix_set_color_all(RGB_RED);
|
||||
rgb_matrix_update_pwm_buffers();
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
}
|
||||
|
|
|
@ -157,15 +157,3 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
|||
// Forward-declare this helper function since it is defined in rgb_matrix.c.
|
||||
void rgb_matrix_update_pwm_buffers(void);
|
||||
#endif
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(1);
|
||||
rgblight_setrgb(RGB_RED);
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
rgb_matrix_set_color_all(RGB_RED);
|
||||
rgb_matrix_update_pwm_buffers();
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
}
|
||||
|
|
|
@ -382,3 +382,20 @@ void matrix_scan_kb(void) {
|
|||
matrix_scan_user();
|
||||
}
|
||||
#endif // KEYBOARD_bastardkb_charybdis_3x5_blackpill || KEYBOARD_bastardkb_charybdis_4x6_blackpill
|
||||
|
||||
bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
rgblight_setrgb(RGB_RED);
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
void rgb_matrix_update_pwm_buffers(void);
|
||||
rgb_matrix_set_color_all(RGB_RED);
|
||||
rgb_matrix_update_pwm_buffers();
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -210,15 +210,3 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
|
|||
// Forward-declare this helper function since it is defined in rgb_matrix.c.
|
||||
void rgb_matrix_update_pwm_buffers(void);
|
||||
#endif
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
rgblight_setrgb(RGB_RED);
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
rgb_matrix_set_color_all(RGB_RED);
|
||||
rgb_matrix_update_pwm_buffers();
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
}
|
||||
|
|
|
@ -210,7 +210,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
|||
void rgb_matrix_update_pwm_buffers(void);
|
||||
#endif
|
||||
|
||||
void shutdown_user(void) {
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
|
@ -220,4 +220,5 @@ void shutdown_user(void) {
|
|||
rgb_matrix_set_color_all(RGB_RED);
|
||||
rgb_matrix_update_pwm_buffers();
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -343,3 +343,20 @@ void keyboard_pre_init_kb(void) {
|
|||
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
rgblight_setrgb(RGB_RED);
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
void rgb_matrix_update_pwm_buffers(void);
|
||||
rgb_matrix_set_color_all(RGB_RED);
|
||||
rgb_matrix_update_pwm_buffers();
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -15,9 +15,12 @@
|
|||
*/
|
||||
#include "quantum.h"
|
||||
|
||||
__attribute__((weak))
|
||||
void shutdown_user(void) {
|
||||
bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_setrgb(255, 0, 0);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -147,11 +147,12 @@ void keyboard_post_init_user(void) {
|
|||
do_rgb_layers(layer_state, LAYER_BASE, LAYER_BASE_END);
|
||||
}
|
||||
|
||||
void shutdown_user(void) {
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
clear_rgb_layers();
|
||||
rgblight_enable();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
rgblight_sethsv_noeeprom(HSV_RED);
|
||||
return false;
|
||||
}
|
||||
|
||||
void spidey_glow(void) {
|
||||
|
@ -218,4 +219,3 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,10 +22,14 @@ void keyboard_pre_init_kb(void) {
|
|||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void shutdown_user(void) {
|
||||
bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
// Shutdown LEDs
|
||||
writePinLow(LED_00);
|
||||
writePinLow(LED_01);
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
|
|
|
@ -22,10 +22,14 @@ void keyboard_pre_init_kb(void) {
|
|||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void shutdown_user(void) {
|
||||
bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
// Shutdown LEDs
|
||||
writePinLow(LED_00);
|
||||
writePinLow(LED_01);
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
|
|
|
@ -22,10 +22,14 @@ void keyboard_pre_init_kb(void) {
|
|||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void shutdown_user(void) {
|
||||
bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
// Shutdown LEDs
|
||||
writePinLow(LED_00);
|
||||
writePinLow(LED_01);
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
|
|
|
@ -23,11 +23,15 @@ void keyboard_pre_init_kb(void) {
|
|||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void shutdown_user(void) {
|
||||
bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
// Shutdown LEDs
|
||||
writePinLow(LED_00);
|
||||
writePinLow(LED_01);
|
||||
writePinLow(LED_02);
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
|
|
|
@ -23,11 +23,15 @@ void keyboard_pre_init_kb(void) {
|
|||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void shutdown_user(void) {
|
||||
bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
// Shutdown LEDs
|
||||
writePinLow(LED_00);
|
||||
writePinLow(LED_01);
|
||||
writePinLow(LED_02);
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
|
|
|
@ -23,11 +23,15 @@ void keyboard_pre_init_kb(void) {
|
|||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void shutdown_user(void) {
|
||||
bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
// Shutdown LEDs
|
||||
writePinLow(LED_00);
|
||||
writePinLow(LED_01);
|
||||
writePinLow(LED_02);
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
|
|
|
@ -54,11 +54,15 @@ void keyboard_pre_init_kb(void) {
|
|||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void shutdown_user(void) {
|
||||
bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
// Shutdown LEDs
|
||||
writePinLow(LED_00);
|
||||
writePinLow(LED_01);
|
||||
writePinLow(LED_02);
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
|
|
|
@ -124,14 +124,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -174,36 +169,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -316,36 +316,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{cc
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -94,20 +94,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = {
|
||||
{NOTE_B5, 20},
|
||||
{NOTE_B6, 8},
|
||||
{NOTE_DS6, 20},
|
||||
{NOTE_B6, 8}
|
||||
};
|
||||
// float tone_startup[][2] = {
|
||||
// {NOTE_B5, 20},
|
||||
// {NOTE_B6, 8},
|
||||
// {NOTE_DS6, 20},
|
||||
// {NOTE_B6, 8}
|
||||
// };
|
||||
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
|
@ -178,36 +175,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -163,20 +163,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = {
|
||||
{NOTE_B5, 20},
|
||||
{NOTE_B6, 8},
|
||||
{NOTE_DS6, 20},
|
||||
{NOTE_B6, 8}
|
||||
};
|
||||
// float tone_startup[][2] = {
|
||||
// {NOTE_B5, 20},
|
||||
// {NOTE_B6, 8},
|
||||
// {NOTE_DS6, 20},
|
||||
// {NOTE_B6, 8}
|
||||
// };
|
||||
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
|
@ -247,36 +243,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -173,7 +173,6 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
|||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
// define variables for reactive RGB
|
||||
|
@ -329,36 +328,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(50); // gets rid of tick
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -237,7 +237,6 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
|||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
static int current_default_layer;
|
||||
|
@ -334,35 +333,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(50); // gets rid of tick
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -185,7 +185,6 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
|||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
// define variables for reactive RGB
|
||||
|
@ -341,36 +340,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_get_mode();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -181,7 +181,6 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
|||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
// define variables for reactive RGB
|
||||
|
@ -440,41 +439,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
|
||||
//keyboard start-up code. Runs once when the firmware starts up.
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_get_mode();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//assign the right code to your layers for OLED display
|
||||
#define L_BASE 0
|
||||
#define L_OPT 2
|
||||
|
|
|
@ -171,7 +171,6 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
|||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
// define variables for reactive RGB
|
||||
|
@ -322,40 +321,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_get_mode();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (is_keyboard_master()) {
|
||||
|
|
|
@ -92,13 +92,8 @@ bool led_update_kb(led_t led_state) {
|
|||
}
|
||||
|
||||
#define REBOOT_MAGIC 0x41544B42
|
||||
void shutdown_user(void)
|
||||
{
|
||||
// set the magic number for resetting to the bootloader
|
||||
*(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC;
|
||||
}
|
||||
|
||||
void bootloader_jump(void) {
|
||||
shutdown_user();
|
||||
*(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC;
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
|
|
@ -54,13 +54,9 @@ bool led_update_kb(led_t led_state) {
|
|||
}
|
||||
|
||||
#define REBOOT_MAGIC 0x41544B42
|
||||
void shutdown_user(void)
|
||||
{
|
||||
// set the magic number for resetting to the bootloader
|
||||
*(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC;
|
||||
}
|
||||
|
||||
void bootloader_jump(void) {
|
||||
shutdown_user();
|
||||
// set the magic number for resetting to the bootloader
|
||||
*(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC;
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
|
|
@ -22,10 +22,14 @@ void keyboard_pre_init_kb(void) {
|
|||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void shutdown_user(void) {
|
||||
bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
// Shutdown LEDs
|
||||
writePinLow(LED_00);
|
||||
writePinLow(LED_01);
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
#include "quantum.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
#endif
|
||||
|
||||
// // green led on
|
||||
// DDRD |= (1<<5);
|
||||
// PORTD &= ~(1<<5);
|
||||
|
||||
// // orange led on
|
||||
// DDRB |= (1<<0);
|
||||
// PORTB &= ~(1<<0);
|
||||
|
||||
matrix_init_user();
|
||||
};
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
#endif
|
||||
}
|
|
@ -6,9 +6,6 @@ void matrix_init_user(void)
|
|||
#ifdef STENO_ENABLE
|
||||
steno_set_mode(STENO_MODE_BOLT); // or STENO_MODE_GEMINI
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
@ -31,27 +28,4 @@ bool led_update_user(led_t led_state)
|
|||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(song_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(song_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -131,7 +131,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL ,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_CAPS, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_ENT ,
|
||||
_______, _______, _______, KC_MUTE, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END
|
||||
_______, _______, _______, KC_MUTE, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END
|
||||
),
|
||||
|
||||
/* FUNCTIONS
|
||||
|
@ -155,11 +155,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -210,36 +207,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -120,16 +120,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -183,36 +178,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||
KC_DEL , KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_LSFT, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, KC_NUHS, KC_NUBS, XXXXXXX, KC_PGUP, KC_ENT,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||
),
|
||||
|
||||
/* LOWER
|
||||
|
@ -145,7 +145,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL ,
|
||||
KC_DEL , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, S(KC_NUHS), S(KC_NUBS), XXXXXXX, KC_PGUP, KC_ENT ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||
),
|
||||
|
||||
/* MEDIA AND COMMANDS
|
||||
|
@ -163,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
XXXXXXX, XXXXXXX, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, KC_AGAIN, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, KC_WSCH, XXXXXXX, KC_FIND, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DM_PLY1, DM_PLY2,
|
||||
KC_LSFT, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ZOOM_OUT, ZOOM_IN, KC_MPRV, DM_RSTP,
|
||||
ONESHOT, XXXXXXX, XXXXXXX, _______, KC_VOLD, KC_MUTE, KC_MUTE, KC_VOLU, ZOOM_NML, KC_MSTP, KC_MNXT, KC_MPLY
|
||||
ONESHOT, XXXXXXX, XXXXXXX, _______, KC_VOLD, KC_MUTE, KC_MUTE, KC_VOLU, ZOOM_NML, KC_MSTP, KC_MNXT, KC_MPLY
|
||||
),
|
||||
|
||||
/* ONESHOT
|
||||
|
@ -205,14 +205,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_numpad[][2] = SONG(NUM_LOCK_ON_SOUND);
|
||||
float tone_oneshot[][2] = SONG(TERMINAL_SOUND);
|
||||
float tone_dyn_macro_rec[][2] = SONG(SONIC_RING);
|
||||
float tone_dyn_macro_stop[][2] = SONG(COIN_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
void press_key(uint16_t key) {
|
||||
|
@ -303,36 +300,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -164,16 +164,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -273,36 +268,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -176,16 +176,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -339,38 +334,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
return true;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_one_key(KC_R)) {
|
||||
tap_random_base64();
|
||||
|
|
|
@ -282,26 +282,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
|
||||
float tone_ly_normal[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_ly_spacial[][2] = SONG(DVORAK_SOUND);
|
||||
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
void startup_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_startup);
|
||||
#endif
|
||||
}
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_goodbye);
|
||||
stop_all_notes();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -163,15 +163,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -271,36 +267,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,9 +6,6 @@ void matrix_init_user(void)
|
|||
#ifdef STENO_ENABLE
|
||||
steno_set_mode(STENO_MODE_BOLT); // or STENO_MODE_GEMINI
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
@ -31,27 +28,4 @@ bool led_update_user(led_t led_state)
|
|||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(song_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(song_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -6,9 +6,6 @@ void matrix_init_user(void)
|
|||
#ifdef STENO_ENABLE
|
||||
steno_set_mode(STENO_MODE_BOLT); // or STENO_MODE_GEMINI
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
@ -32,26 +29,4 @@ bool led_update_user(led_t led_state)
|
|||
}
|
||||
#endif
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(song_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(song_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -140,16 +140,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
|
||||
float tone_workman[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_qwerty[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -196,36 +189,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, LT_RAI(KC_MINS),
|
||||
KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL
|
||||
),
|
||||
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
|
@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_LSFT, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________, LT_RAI(KC_MINS),
|
||||
KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL
|
||||
),
|
||||
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
|
@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_LSFT, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________, LT_RAI(KC_MINS),
|
||||
KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL
|
||||
),
|
||||
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ~ | \ |
|
||||
|
@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
_______, __________________LONG_FUNC_RIGHT__________________,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | * | \ |
|
||||
|
@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
_______, KC_LEFT, KC_DOWN, KC_RIGHT,KC_MUTE, KC_VOLD, KC_1, KC_2, KC_3, KC_UP, KC_SLSH, _______,
|
||||
_______, _______, _______, _______, _______, KC_SPC, KC_0, _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NUM
|
||||
),
|
||||
|
||||
|
||||
/* Plover layer (http://opensteno.org)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||
|
@ -107,14 +107,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
* | Exit | | | A | O | | E | U | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
|
||||
[_PLOVER] = LAYOUT_ortho_4x12_wrapper(
|
||||
KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,
|
||||
XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
|
||||
XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
|
||||
/* FN layer on Esc key
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | ! | @ | # | $ | % | ^ | & | * | ( | ) | + |
|
||||
|
@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
_______, __________________LONG_FUNC_RIGHT__________________,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
|
||||
/* Num Layer
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Q | Up | 4 | | | 7 | 8 | 9 | - | + | Bksp |
|
||||
|
@ -150,7 +150,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
_______, KC_Z, KC_X, KC_C, KC_V, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PSLS, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, _______, _______, KC_NUM, KC_MPLY
|
||||
),
|
||||
|
||||
|
||||
/* Mouse Layer (semi-col)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ACCL0| ACCL1| ACCL2|Email |Email2| Home | Wh_Up| WHL_L| M_Up | WHL_R|PASS| Meta |
|
||||
|
@ -162,14 +162,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
* | | | | | | BTN1 | | | | Citx | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
|
||||
[_MOUSECURSOR] = LAYOUT_ortho_4x12_wrapper(
|
||||
KC_ACL0, KC_ACL1, KC_ACL2, M_EMAIL,M_EMAIL2, KC_HOME, KC_PGUP, KC_WH_L, KC_MS_U, KC_WH_R, P_MPASS, P_META,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, O_RTQ6H, KC_END , KC_PGDN, KC_MS_L, KC_MS_D, KC_MS_R, _______, O_DAYRN,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5, _______, _______,
|
||||
_______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, P_CITRIX, O_AUTODC
|
||||
),
|
||||
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | Del |
|
||||
|
@ -187,21 +187,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
_______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DOWN,BL_UP, BL_STEP, BL_TOGG,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, CK_RST, CK_DOWN, CK_UP, CK_TOGG
|
||||
)
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -307,38 +302,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
|
||||
void matrix_init_keymap(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
rgblight_mode(RGB_MATRIX_CYCLE_ALL);
|
||||
#endif //RGB_matrix
|
||||
wait_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
wait_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -160,15 +160,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_workman[][2] = SONG(WORKMAN_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -268,36 +263,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -168,17 +168,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||
{
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
|
@ -217,37 +207,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void)
|
||||
{
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(100); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -133,16 +133,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_dyn_macro_play[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
|
@ -239,36 +234,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -132,16 +132,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_dyn_macro_play[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
|
@ -238,36 +233,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -101,12 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_nerd[][2] = SONG(QWERTY_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -149,36 +144,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -76,16 +76,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -185,36 +180,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -28,7 +28,7 @@ enum {
|
|||
RSHIFT,
|
||||
LSHIFT,
|
||||
TD_S,
|
||||
SLASH
|
||||
SLASH
|
||||
};
|
||||
|
||||
int cur_dance (tap_dance_state_t *state);
|
||||
|
@ -116,10 +116,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
TD(LSHIFT), KC_QUOT, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(RSHIFT),
|
||||
TD(X_AT_FUN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, ALT_TAB, KC_SPACE, KC_ENTER, MT(MOD_LCTL | MOD_LSFT, KC_LGUI), KC_PGUP, KC_PGDN, LT(_LOWER, KC_PLUS)
|
||||
),
|
||||
|
||||
|
||||
[_UPPER] = LAYOUT_planck_grid(
|
||||
KC_GRAVE, KC_AMPR, KC_PERC, KC_NO, KC_NO, KC_EQL, KC_ASTR, KC_NO, KC_NO, KC_EXLM, KC_HASH, KC_TRNS,
|
||||
KC_PLUS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLS,
|
||||
KC_PLUS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLS,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS
|
||||
),
|
||||
|
@ -156,7 +156,7 @@ int cur_dance (tap_dance_state_t *state) {
|
|||
if (state->interrupted || !state->pressed)return TRIPLE_TAP;
|
||||
else return TRIPLE_HOLD;
|
||||
}
|
||||
else return 8; // magic number that i dont believe works.
|
||||
else return 8; // magic number that i dont believe works.
|
||||
}
|
||||
|
||||
// instance of tap for the 'X' dance.
|
||||
|
@ -251,4 +251,7 @@ tap_dance_action_t tap_dance_actions[] = {
|
|||
|
||||
};
|
||||
|
||||
void shutdown_user(void) { clear_keyboard(); }
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
clear_keyboard();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -6,9 +6,6 @@ void matrix_init_user(void)
|
|||
#ifdef STENO_ENABLE
|
||||
steno_set_mode(STENO_MODE_BOLT); // or STENO_MODE_GEMINI
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
@ -31,27 +28,4 @@ bool led_update_user(led_t led_state)
|
|||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(song_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(song_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -120,13 +120,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -189,36 +184,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -142,14 +142,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -221,36 +216,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -123,14 +123,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -173,36 +168,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -31,42 +31,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
|
||||
LAYOUT_planck_grid(
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_T(KC_ENT),
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_T(KC_ENT),
|
||||
MO(1), KC_LCTL, KC_LALT, KC_LGUI, MO(2), LT(5,KC_ENT), LT(4,KC_SPC), MO(3), KC_SLSH, KC_LEFT, KC_DOWN, CTL_T(KC_RGHT)),
|
||||
|
||||
LAYOUT_planck_grid(
|
||||
KC_ESC, KC_NUM, LCTL(KC_SPC), KC_UP, LSFT(KC_SPC), KC_DLR, KC_EQL, KC_P7, KC_P8, KC_P9, KC_PPLS, LCTL(KC_BSPC),
|
||||
KC_TAB, FIND, KC_LEFT, KC_DOWN, KC_RGHT, KC_PERC, KC_CIRC, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_BSLS,
|
||||
KC_LSFT, UNDO, CUT, COPY, PASTE, EXCEL_HOME, KC_PSCR, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_LSFT,
|
||||
KC_ESC, KC_NUM, LCTL(KC_SPC), KC_UP, LSFT(KC_SPC), KC_DLR, KC_EQL, KC_P7, KC_P8, KC_P9, KC_PPLS, LCTL(KC_BSPC),
|
||||
KC_TAB, FIND, KC_LEFT, KC_DOWN, KC_RGHT, KC_PERC, KC_CIRC, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_BSLS,
|
||||
KC_LSFT, UNDO, CUT, COPY, PASTE, EXCEL_HOME, KC_PSCR, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_LSFT,
|
||||
KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, TO(1), KC_ENT, KC_SPC, KC_PENT, KC_P0, KC_PDOT, KC_PAST, KC_LCTL),
|
||||
|
||||
LAYOUT_planck_grid(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||
KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_EQL, KC_LT, KC_GT, KC_LPRN,
|
||||
KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_MPLY, KC_MNXT, KC_PGUP, SFT_T(KC_VOLU),
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||
KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_EQL, KC_LT, KC_GT, KC_LPRN,
|
||||
KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_MPLY, KC_MNXT, KC_PGUP, SFT_T(KC_VOLU),
|
||||
TO(0), KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_ENT, KC_SPC, MO(3), KC_PSCR, KC_MPRV, KC_PGDN, CTL_T(KC_VOLD)),
|
||||
|
||||
LAYOUT_planck_grid(
|
||||
KC_TILD, DESK_LEFT, WIN_LEFT, KC_F4, WIN_RIGHT, DESK_RIGHT, DOCS, SNAP_LEFT, SNAP_UP, SNAP_RIGHT, SNAP_DOWN, KC_DEL,
|
||||
KC_CAPS, KC_QUOT, KC_LBRC, KC_LCBR, KC_LPRN, KC_BSLS, KC_SLSH, KC_RPRN, KC_RCBR, KC_RBRC, KC_DQUO, KC_QUOT,
|
||||
KC_PWR, KC_SLEP, KC_WAKE, KC_HOME, BL_BRTG, BL_STEP, KC_TRNS, KC_CALC, KC_LT, KC_GT, KC_COLON, KC_LSFT,
|
||||
KC_TILD, DESK_LEFT, WIN_LEFT, KC_F4, WIN_RIGHT, DESK_RIGHT, DOCS, SNAP_LEFT, SNAP_UP, SNAP_RIGHT, SNAP_DOWN, KC_DEL,
|
||||
KC_CAPS, KC_QUOT, KC_LBRC, KC_LCBR, KC_LPRN, KC_BSLS, KC_SLSH, KC_RPRN, KC_RCBR, KC_RBRC, KC_DQUO, KC_QUOT,
|
||||
KC_PWR, KC_SLEP, KC_WAKE, KC_HOME, BL_BRTG, BL_STEP, KC_TRNS, KC_CALC, KC_LT, KC_GT, KC_COLON, KC_LSFT,
|
||||
TO(0), KC_LCTL, KC_LALT, KC_LGUI, KC_LALT, KC_LCTL, KC_TRNS, KC_TRNS, AU_TOGG, MU_TOGG, MU_NEXT, LCTL(KC_RGHT)),
|
||||
|
||||
LAYOUT_planck_grid(
|
||||
TO(0), KC_LSCR, WIN_LEFT, KC_MS_WH_UP, WIN_RIGHT, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_U, KC_MS_BTN2, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_INS, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS,
|
||||
QK_BOOT, KC_APP, KC_MS_ACCEL0, KC_MS_ACCEL0, KC_MS_ACCEL0, KC_TRNS, KC_TRNS, TO(0), TO(1), TO(2), TO(3), TO(4),
|
||||
TO(0), KC_LSCR, WIN_LEFT, KC_MS_WH_UP, WIN_RIGHT, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_U, KC_MS_BTN2, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_INS, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS,
|
||||
QK_BOOT, KC_APP, KC_MS_ACCEL0, KC_MS_ACCEL0, KC_MS_ACCEL0, KC_TRNS, KC_TRNS, TO(0), TO(1), TO(2), TO(3), TO(4),
|
||||
TO(0), KC_MENU, KC_TRNS, KC_TRNS, KC_LALT, KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RCTL),
|
||||
|
||||
LAYOUT_planck_grid(
|
||||
KC_BSPC, KC_P, KC_O, KC_I, KC_U, KC_Y, KC_T, KC_R, KC_E, KC_W, KC_Q, KC_BSPC,
|
||||
KC_TAB, KC_SCLN, KC_L, KC_K, KC_J, KC_H, KC_G, KC_F, KC_D, KC_S, KC_A, KC_QUOT,
|
||||
KC_LSFT, KC_ENT, KC_DOT, KC_COMM, KC_M, KC_N, KC_B, KC_V, KC_C, KC_X, KC_Z, SFT_T(KC_ENT),
|
||||
KC_BSPC, KC_P, KC_O, KC_I, KC_U, KC_Y, KC_T, KC_R, KC_E, KC_W, KC_Q, KC_BSPC,
|
||||
KC_TAB, KC_SCLN, KC_L, KC_K, KC_J, KC_H, KC_G, KC_F, KC_D, KC_S, KC_A, KC_QUOT,
|
||||
KC_LSFT, KC_ENT, KC_DOT, KC_COMM, KC_M, KC_N, KC_B, KC_V, KC_C, KC_X, KC_Z, SFT_T(KC_ENT),
|
||||
TO(0), KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_TRNS, KC_TRNS, MO(3), KC_SLSH, KC_LEFT, KC_DOWN, LCTL(KC_RGHT)),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
@ -76,7 +76,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
void matrix_init_user(void)
|
||||
{
|
||||
set_voice(default_voice);
|
||||
startup_user();
|
||||
println("Matrix Init");
|
||||
}
|
||||
|
||||
|
@ -123,29 +122,4 @@ bool led_update_user(led_t led_state)
|
|||
old_led_state = led_state;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(30); // gets rid of tick
|
||||
PLAY_SONG(tone_my_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_my_goodbye);
|
||||
_delay_ms(3000);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void audio_on_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_audio_on);
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_music_on);
|
||||
}
|
||||
|
||||
#endif /* AUDIO_ENABLE */
|
||||
#endif /* AUDIO_ENABLE */
|
||||
|
|
|
@ -52,8 +52,6 @@ enum my_keycodes{
|
|||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_swcole[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_capslock_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
|
||||
|
@ -414,32 +412,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
return true;
|
||||
};
|
||||
|
||||
void matrix_init_user(void){ // Run once at startup
|
||||
#ifdef AUDIO_ENABLE
|
||||
_delay_ms(50); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
void play_goodbye_tone(void){
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
}
|
||||
|
||||
void shutdown_user(void){
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void){ // Run when the music layer is turned on
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void music_off_user(void){ // Run when music is turned off
|
||||
PLAY_SONG(tone_goodbye);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -81,13 +81,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = {
|
||||
{NOTE_B5, 20},
|
||||
{NOTE_B6, 8},
|
||||
{NOTE_DS6, 20},
|
||||
{NOTE_B6, 8}
|
||||
};
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_game[][2] = {
|
||||
{NOTE_E6, 10} ,{NOTE_E6, 10} ,{NOTE_REST, 10} ,{NOTE_E6, 10} ,
|
||||
|
@ -95,26 +88,6 @@ float tone_game[][2] = {
|
|||
{NOTE_G6, 10} ,{NOTE_REST, 30},
|
||||
{NOTE_G5, 10} ,{NOTE_REST, 30}
|
||||
};
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
void startup_user(void) {
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
void shutdown_user(void) {
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void) {
|
||||
music_scale_user();
|
||||
}
|
||||
void music_scale_user(void) {
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -69,47 +69,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
)
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = {
|
||||
{NOTE_C5, 8},
|
||||
{NOTE_E6, 4},
|
||||
{NOTE_D6, 16},
|
||||
{NOTE_G6, 8}
|
||||
};
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -174,19 +174,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = {
|
||||
{NOTE_D5, 8},
|
||||
{NOTE_E6, 8},
|
||||
{NOTE_D6, 8},
|
||||
{NOTE_E5, 8}
|
||||
};
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
|
@ -249,36 +236,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -111,20 +111,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = {
|
||||
{NOTE_B5, 20},
|
||||
{NOTE_B6, 8},
|
||||
{NOTE_DS6, 20},
|
||||
{NOTE_B6, 8}
|
||||
};
|
||||
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
|
@ -177,36 +166,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -158,20 +158,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = {
|
||||
{NOTE_B5, 20},
|
||||
{NOTE_B6, 8},
|
||||
{NOTE_DS6, 20},
|
||||
{NOTE_B6, 8}
|
||||
};
|
||||
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
|
@ -242,36 +231,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -135,20 +135,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = {
|
||||
{NOTE_B5, 20},
|
||||
{NOTE_B6, 8},
|
||||
{NOTE_DS6, 20},
|
||||
{NOTE_B6, 8}
|
||||
};
|
||||
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
|
@ -201,36 +190,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user(void)
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -52,7 +52,6 @@ enum my_keycodes{
|
|||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_swcole[][2] = SONG(QWERTY_SOUND);
|
||||
|
@ -414,32 +413,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
return true;
|
||||
};
|
||||
|
||||
void matrix_init_user(void){ // Run once at startup
|
||||
#ifdef AUDIO_ENABLE
|
||||
_delay_ms(50); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
void play_goodbye_tone(void){
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
}
|
||||
|
||||
void shutdown_user(void){
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void){ // Run when the music layer is turned on
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void music_off_user(void){ // Run when music is turned off
|
||||
PLAY_SONG(tone_goodbye);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -44,10 +44,11 @@ bool led_update_user(led_t led_state) {
|
|||
return false;
|
||||
}
|
||||
|
||||
void shutdown_user (void) {
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
rgblight_setrgb(RGB_RED);
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ __attribute__((weak)) void post_process_record_kb(uint16_t keycode, keyrecord_t
|
|||
|
||||
__attribute__((weak)) void post_process_record_user(uint16_t keycode, keyrecord_t *record) {}
|
||||
|
||||
void shutdown_quantum(void) {
|
||||
void shutdown_quantum(bool jump_to_bootloader) {
|
||||
clear_keyboard();
|
||||
#if defined(MIDI_ENABLE) && defined(MIDI_BASIC)
|
||||
process_midi_all_notes_off();
|
||||
|
@ -183,12 +183,12 @@ void shutdown_quantum(void) {
|
|||
# endif
|
||||
uint16_t timer_start = timer_read();
|
||||
PLAY_SONG(goodbye_song);
|
||||
shutdown_user();
|
||||
shutdown_kb(jump_to_bootloader);
|
||||
while (timer_elapsed(timer_start) < 250)
|
||||
wait_ms(1);
|
||||
stop_all_notes();
|
||||
#else
|
||||
shutdown_user();
|
||||
shutdown_kb(jump_to_bootloader);
|
||||
wait_ms(250);
|
||||
#endif
|
||||
#ifdef HAPTIC_ENABLE
|
||||
|
@ -197,12 +197,12 @@ void shutdown_quantum(void) {
|
|||
}
|
||||
|
||||
void reset_keyboard(void) {
|
||||
shutdown_quantum();
|
||||
shutdown_quantum(true);
|
||||
bootloader_jump();
|
||||
}
|
||||
|
||||
void soft_reset_keyboard(void) {
|
||||
shutdown_quantum();
|
||||
shutdown_quantum(false);
|
||||
mcu_reset();
|
||||
}
|
||||
|
||||
|
@ -491,9 +491,16 @@ void set_single_persistent_default_layer(uint8_t default_layer) {
|
|||
// Override these functions in your keymap file to play different tunes on
|
||||
// different events such as startup and bootloader jump
|
||||
|
||||
__attribute__((weak)) void startup_user(void) {}
|
||||
__attribute__((weak)) bool shutdown_user(bool jump_to_bootloader) {
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__((weak)) void shutdown_user(void) {}
|
||||
__attribute__((weak)) bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void suspend_power_down_quantum(void) {
|
||||
suspend_power_down_kb();
|
||||
|
|
|
@ -255,8 +255,8 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record);
|
|||
void reset_keyboard(void);
|
||||
void soft_reset_keyboard(void);
|
||||
|
||||
void startup_user(void);
|
||||
void shutdown_user(void);
|
||||
bool shutdown_kb(bool jump_to_bootloader);
|
||||
bool shutdown_user(bool jump_to_bootloader);
|
||||
|
||||
void register_code16(uint16_t code);
|
||||
void unregister_code16(uint16_t code);
|
||||
|
|
|
@ -68,7 +68,7 @@ void shutdown_keymap(void) {}
|
|||
* If RGBs enabled,
|
||||
* then set RGB color to Red
|
||||
*/
|
||||
void shutdown_user (void) {
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
|
@ -78,6 +78,7 @@ void shutdown_user (void) {
|
|||
rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 );
|
||||
#endif //RGB_MATRIX_ENABLE
|
||||
shutdown_keymap();
|
||||
return false;
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
|
|
|
@ -54,7 +54,7 @@ __attribute__((weak)) void shutdown_keymap(void) {}
|
|||
void rgb_matrix_update_pwm_buffers(void);
|
||||
|
||||
// On RESET, set all RGB to red, shutdown the keymap.
|
||||
void shutdown_user(void) {
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(1);
|
||||
|
@ -66,6 +66,7 @@ void shutdown_user(void) {
|
|||
rgb_matrix_update_pwm_buffers();
|
||||
#endif
|
||||
shutdown_keymap();
|
||||
return false;
|
||||
}
|
||||
|
||||
__attribute__((weak)) void suspend_power_down_keymap(void) {}
|
||||
|
|
|
@ -73,8 +73,13 @@ void keyboard_post_init_user(void) {
|
|||
void rgb_matrix_update_pwm_buffers(void);
|
||||
#endif
|
||||
|
||||
__attribute__((weak)) void shutdown_keymap(void) {}
|
||||
void shutdown_user(void) {
|
||||
__attribute__((weak)) bool shutdown_keymap(bool jump_to_bootloader) {
|
||||
return true;
|
||||
}
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
if (!shutdown_keymap(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(1);
|
||||
|
@ -87,8 +92,7 @@ void shutdown_user(void) {
|
|||
#ifdef OLED_ENABLE
|
||||
oled_off();
|
||||
#endif
|
||||
|
||||
shutdown_keymap();
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__((weak)) void suspend_power_down_keymap(void) {}
|
||||
|
@ -268,11 +272,6 @@ void matrix_slave_scan_user(void) {
|
|||
|
||||
__attribute__((weak)) void housekeeping_task_keymap(void) {}
|
||||
void housekeeping_task_user(void) {
|
||||
static bool has_ran_yet;
|
||||
if (!has_ran_yet) {
|
||||
has_ran_yet = true;
|
||||
startup_user();
|
||||
}
|
||||
#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
|
||||
run_diablo_macro_check();
|
||||
#endif // TAP_DANCE_ENABLE
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
void keyboard_post_init_keymap(void);
|
||||
void matrix_init_secret(void);
|
||||
void shutdown_keymap(void);
|
||||
bool shutdown_keymap(bool jump_to_bootloader);
|
||||
void suspend_power_down_keymap(void);
|
||||
void suspend_wakeup_init_keymap(void);
|
||||
void matrix_scan_keymap(void);
|
||||
|
|
|
@ -53,9 +53,14 @@ void suspend_wakeup_init_user(void) {
|
|||
}
|
||||
|
||||
|
||||
__attribute__ ((weak)) void shutdown_keymap(void) {}
|
||||
void shutdown_user (void) {
|
||||
shutdown_keymap();
|
||||
__attribute__((weak)) bool shutdown_keymap(bool jump_to_bootloader) {
|
||||
return true;
|
||||
}
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
if (!shutdown_keymap(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__ ((weak)) void eeconfig_init_keymap(void) {}
|
||||
|
|
|
@ -55,16 +55,3 @@ void suspend_wakeup_init_user(void) {
|
|||
wait_ms(10);
|
||||
#endif
|
||||
}
|
||||
|
||||
__attribute__((weak)) void startup_keymap(void) {}
|
||||
|
||||
void startup_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
matrix_init_rgb();
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
startup_keymap();
|
||||
}
|
||||
|
||||
__attribute__((weak)) void shutdown_keymap(void) {}
|
||||
|
||||
void shutdown_user(void) { shutdown_keymap(); }
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/**
|
||||
* Copyright (C) 2021 Jerrell, Jacob <@jjerrell>
|
||||
*
|
||||
*
|
||||
* This file is part of qmk_firmware.
|
||||
*
|
||||
*
|
||||
* qmk_firmware 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* qmk_firmware 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 qmk_firmware. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
@ -114,12 +114,16 @@ void startup_user(void)
|
|||
startup_keymap();
|
||||
}
|
||||
|
||||
__attribute__((weak)) void shutdown_keymap(void) {}
|
||||
void shutdown_user(void)
|
||||
{
|
||||
__attribute__((weak)) bool shutdown_keymap(bool jump_to_bootloader) {
|
||||
return true;
|
||||
}
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
if (!shutdown_keymap(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
wait_ms(TAP_CODE_DELAY);
|
||||
stop_all_notes();
|
||||
shutdown_keymap();
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__((weak)) void music_on_keymap(void) {}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/**
|
||||
* Copyright (C) 2021 Jerrell, Jacob <@jjerrell>
|
||||
*
|
||||
*
|
||||
* This file is part of qmk_firmware.
|
||||
*
|
||||
*
|
||||
* qmk_firmware 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* qmk_firmware 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 qmk_firmware. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
/************************* Userspace Layers *************************
|
||||
* Keymaps can define additional layers by making the first case
|
||||
* equal to `LAYER_SAFE_RANGE`
|
||||
* equal to `LAYER_SAFE_RANGE`
|
||||
********************************************************************/
|
||||
enum userspace_layers {
|
||||
_WORKMAN,
|
||||
|
@ -49,5 +49,5 @@ void dip_switch_update_keymap(uint8_t index, bool active);
|
|||
bool music_mask_keymap(uint16_t keycode);
|
||||
layer_state_t default_layer_state_set_keymap(layer_state_t state);
|
||||
void startup_keymap(void);
|
||||
void shutdown_keymap(void);
|
||||
bool shutdown_keymap(bool jump_to_bootloader);
|
||||
void music_on_keymap(void);
|
||||
|
|
|
@ -62,11 +62,14 @@ void keyboard_post_init_user(void){
|
|||
keyboard_post_init_keymap();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void shutdown_keymap(void) {}
|
||||
|
||||
void shutdown_user (void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
__attribute__((weak)) bool shutdown_keymap(bool jump_to_bootloader) {
|
||||
return true;
|
||||
}
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
if (!shutdown_keymap(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(1);
|
||||
rgblight_setrgb(RGB_TEAL);
|
||||
|
@ -76,7 +79,7 @@ void shutdown_user (void) {
|
|||
// rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 );
|
||||
// while(timer_elapsed(timer_start) < 250) { wait_ms(1); }
|
||||
#endif //RGB_MATRIX_ENABLE
|
||||
shutdown_keymap();
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
|
|
|
@ -61,7 +61,7 @@ bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed);
|
|||
bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
|
||||
bool send_game_macro(const char *str, keyrecord_t *record, bool override);
|
||||
void matrix_init_keymap(void);
|
||||
void shutdown_keymap(void);
|
||||
bool shutdown_keymap(bool jump_to_bootloader);
|
||||
void suspend_power_down_keymap(void);
|
||||
void suspend_wakeup_init_keymap(void);
|
||||
void matrix_scan_keymap(void);
|
||||
|
|
|
@ -17,5 +17,8 @@ void eeconfig_init_user(void) {
|
|||
}
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
void shutdown_user(void) { shutdown_user_rgb(); }
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
shutdown_user_rgb();
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue