Convert Encoder callbacks to be boolean functions (#12805)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
This commit is contained in:
co-authored by
James Young
parent
76c23b15ab
commit
a0fed0ea17
@@ -221,7 +221,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -251,6 +251,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
|
||||
@@ -144,7 +144,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -174,6 +174,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
|
||||
@@ -139,7 +139,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -169,6 +169,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -263,7 +263,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -293,6 +293,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
|
||||
@@ -256,7 +256,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -286,6 +286,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
|
||||
@@ -187,7 +187,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -226,6 +226,7 @@ void encoder_update(bool clockwise) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -316,6 +316,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -137,7 +137,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RIGHT)) {
|
||||
if (clockwise) {
|
||||
@@ -167,6 +167,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
|
||||
@@ -279,7 +279,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -309,6 +309,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
|
||||
@@ -51,16 +51,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_planck_grid( /* Right */
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_DEL, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT_planck_grid( /* Left */
|
||||
KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_BSPC,
|
||||
KC_DEL, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TILD,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TILD,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||
),
|
||||
|
||||
@@ -89,7 +89,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -119,6 +119,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
|
||||
@@ -190,7 +190,7 @@ uint16_t muse_tempo = 20;
|
||||
|
||||
extern float clicky_rand;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (is_clicky_on()) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -238,6 +238,7 @@ void encoder_update(bool clockwise) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
|
||||
@@ -317,7 +317,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -347,6 +347,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
|
||||
@@ -256,7 +256,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -290,6 +290,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
|
||||
@@ -128,7 +128,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -152,6 +152,7 @@ void encoder_update(bool clockwise) {
|
||||
unregister_code(KC_PGUP);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
|
||||
@@ -177,7 +177,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise)
|
||||
bool encoder_update(bool clockwise)
|
||||
{
|
||||
if (muse_mode)
|
||||
{
|
||||
@@ -227,6 +227,7 @@ void encoder_update(bool clockwise)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active)
|
||||
|
||||
@@ -25,7 +25,7 @@ enum planck_layers {
|
||||
_RAISE,
|
||||
_FUNCTION,
|
||||
_ADJUST
|
||||
|
||||
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
@@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
layer_off(_FUNCTION);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -170,7 +170,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -204,6 +204,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool music_mask_user(uint16_t keycode) {
|
||||
|
||||
@@ -109,7 +109,7 @@ uint32_t layer_state_set_user(uint32_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (clockwise && !IS_LAYER_ON(_RAISE)) {
|
||||
tap_code(KC_MS_WH_DOWN);
|
||||
} else if (!clockwise && !IS_LAYER_ON(_RAISE)) {
|
||||
@@ -119,4 +119,5 @@ void encoder_update(bool clockwise) {
|
||||
} else if (!clockwise && IS_LAYER_ON(_RAISE)) {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -353,6 +353,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -157,7 +157,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -181,6 +181,7 @@ void encoder_update(bool clockwise) {
|
||||
unregister_code(KC_PGUP);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
|
||||
@@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, SI_QUES, SI_ASTR, SI_GRV, SI_PLUS, _______,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, SI_LABK, SI_RABK, KC_END, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
@@ -178,7 +178,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -202,6 +202,7 @@ void encoder_update(bool clockwise) {
|
||||
unregister_code(KC_PGUP);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
|
||||
@@ -232,7 +232,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -266,6 +266,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
|
||||
@@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Nav Layer
|
||||
/* Nav Layer
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | PGUP | UP | PGDN | |KC_CAD|
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
@@ -139,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* DEV Layer
|
||||
/* DEV Layer
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | |R_CMLM| | | | | | | |KC_CAD|
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
@@ -223,7 +223,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -247,6 +247,7 @@ void encoder_update(bool clockwise) {
|
||||
unregister_code(KC_PGUP);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
@@ -301,5 +302,3 @@ bool music_mask_user(uint16_t keycode) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -184,6 +184,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
*
|
||||
*
|
||||
* An Italian ANSI layout
|
||||
* Version 0.3
|
||||
*
|
||||
* Version 0.3
|
||||
*
|
||||
* Created by Silvio Gulizia on the basis of the default Planck keymap.
|
||||
* Thanks to SomeBuddyOnReddit, gepeirl, fauxpark, BXO511, drashna, and ridingqwerty.
|
||||
*
|
||||
* The layout is based on the original Planck layout when used with language set to Italian on your Mac.
|
||||
* Accented vowels have been moverd on RAISE ("è", "ì", and "ù") and LOWER ("é", "ò", and "à")
|
||||
* The layout is based on the original Planck layout when used with language set to Italian on your Mac.
|
||||
* Accented vowels have been moverd on RAISE ("�", "�", and "�") and LOWER ("�", "�", and "�")
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -40,9 +40,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* |Enter | F1 | F2 | F3 | F4 | F5 | | _ | = | é | ò | à |
|
||||
* |Enter | F1 | F2 | F3 | F4 | F5 | | _ | = | � | � | � |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F6 | F7 | F8 | F9 | |NUMPAD| § | ± | { | } | | |
|
||||
* | | F6 | F7 | F8 | F9 | |NUMPAD| � | � | { | } | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
@@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | SGCOM| DESK | | | | - | + | è | ì | ù |
|
||||
* | | | SGCOM| DESK | | | | - | + | � | � | � |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Caps | | PHONE| SVIV |VIVERE| |NUMPAD| | | [ | ] | \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
@@ -162,7 +162,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -192,6 +192,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -264,7 +264,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -288,6 +288,7 @@ void encoder_update(bool clockwise) {
|
||||
unregister_code(KC_PGUP);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
|
||||
@@ -48,7 +48,7 @@ enum planck_keycodes {
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
@@ -79,9 +79,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_planck_grid(
|
||||
XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ASTR, KC_4, KC_5, KC_6, KC_MINS, XXXXXXX,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_1, KC_2, KC_3, KC_PLUS, MT(MOD_LSFT, KC_ENT),
|
||||
XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ASTR, KC_4, KC_5, KC_6, KC_MINS, XXXXXXX,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_1, KC_2, KC_3, KC_PLUS, MT(MOD_LSFT, KC_ENT),
|
||||
_______, XXXXXXX, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_0, KC_DOT, KC_EQL, XXXXXXX
|
||||
),
|
||||
|
||||
@@ -93,13 +93,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | _ | + |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | Space | | Home | PgDn | PgUp | End |
|
||||
* | | | | | | Space | | Home | PgDn | PgUp | End |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_planck_grid(
|
||||
KC_GRV, KC_EXLM, KC_DQUO, LALT(KC_4), KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
XXXXXXX, KC_TILD, KC_NUHS, KC_SLSH, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, KC_BSLS, KC_MINS, KC_EQL, KC_PIPE,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, MT(MOD_LSFT, KC_ENT),
|
||||
KC_GRV, KC_EXLM, KC_DQUO, LALT(KC_4), KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
XXXXXXX, KC_TILD, KC_NUHS, KC_SLSH, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, KC_BSLS, KC_MINS, KC_EQL, KC_PIPE,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, MT(MOD_LSFT, KC_ENT),
|
||||
_______, XXXXXXX, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||
),
|
||||
|
||||
@@ -116,9 +116,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FN] = LAYOUT_planck_grid(
|
||||
LALT(KC_BSPC), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
|
||||
XXXXXXX, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
LALT(KC_BSPC), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
|
||||
XXXXXXX, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
@@ -128,16 +128,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |PRNT SC| | UP | | | | | | | | |SLEEP |
|
||||
* |-------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | LEFT | DOWN | RIGHT| | | | LEFT | DOWN | UP | RIGHT| |
|
||||
* |-------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |-------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |-------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | MUTE |VOLDWN|VOL UP| |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_SPACE_FN] = LAYOUT_planck_grid(
|
||||
KC_PSCR, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP,
|
||||
XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_PSCR, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP,
|
||||
XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC__MUTE, KC__VOLDOWN, KC__VOLUP, XXXXXXX
|
||||
),
|
||||
|
||||
@@ -216,7 +216,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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
|
||||
),
|
||||
),
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
@@ -297,7 +297,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -319,6 +319,7 @@ void encoder_update(bool clockwise) {
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
|
||||
@@ -247,7 +247,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (clockwise) {
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
register_code(KC_MS_WH_DOWN);
|
||||
@@ -265,6 +265,7 @@ void encoder_update(bool clockwise) {
|
||||
unregister_code(KC_PGUP);
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -308,7 +308,7 @@ uint16_t dac_value_generate(void) {
|
||||
return value;
|
||||
}
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (clockwise) {
|
||||
dac_morph = (dac_morph + 1) % AUDIO_DAC_WAVETABLE_CUSTOM_LENGTH;
|
||||
} else {
|
||||
@@ -317,4 +317,5 @@ void encoder_update(bool clockwise) {
|
||||
else
|
||||
dac_morph--;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/* Copyright 2020 Tushar Khan
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
*
|
||||
* 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 QMK_KEYBOARD_H
|
||||
#include "muse.h"
|
||||
@@ -77,8 +77,8 @@ enum keycodes {
|
||||
EMAIL, // [email address]
|
||||
PHONE, // [phone number]
|
||||
GT_CMT, // git commit -m ''
|
||||
SHEBANG, // #!/usr/bin/env
|
||||
CHMOD, // chmod 744 *sh
|
||||
SHEBANG, // #!/usr/bin/env
|
||||
CHMOD, // chmod 744 *sh
|
||||
PY_VENV, // source *env*/bin/activate
|
||||
};
|
||||
|
||||
@@ -355,7 +355,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
// enabling base layer song breaks a lot of other songs including
|
||||
// - macro recording start song
|
||||
// - rotary feedback songs
|
||||
|
||||
|
||||
// PLAY_SONG(base_song);
|
||||
break;
|
||||
case _HYPER:
|
||||
@@ -393,10 +393,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
|
||||
/*
|
||||
██ ██ ███████ ██ ██ ██████ ██████ ██████ ███████ ███████
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
█████ █████ ████ ██ ██ ██ ██ ██ █████ ███████
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ███████ ██ ██ ██████ ██████ ██████ ███████ ███████
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
█████ █████ ████ ██ ██ ██ ██ ██ █████ ███████
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ███████ ██ ██████ ██████ ██████ ███████ ███████
|
||||
*/
|
||||
|
||||
@@ -480,10 +480,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return false;
|
||||
|
||||
/*
|
||||
███ ███ █████ ██████ ██████ ██████ ███████
|
||||
████ ████ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ████ ██ ███████ ██ ██████ ██ ██ ███████
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
███ ███ █████ ██████ ██████ ██████ ███████
|
||||
████ ████ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ████ ██ ███████ ██ ██████ ██ ██ ███████
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██████ ██ ██ ██████ ███████
|
||||
*/
|
||||
|
||||
@@ -527,10 +527,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
};
|
||||
|
||||
/*
|
||||
█████ ██ ██ ██████ ██ ██████
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
███████ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
█████ ██ ██ ██████ ██ ██████
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
███████ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██████ ██████ ██ ██████
|
||||
*/
|
||||
|
||||
@@ -600,7 +600,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
|
||||
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -615,7 +615,7 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
static int scroll_interval = 5;
|
||||
|
||||
switch (rotary_state) {
|
||||
@@ -686,5 +686,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -139,7 +139,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -169,6 +169,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
|
||||
@@ -95,8 +95,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
RESET, _______, _______, _______, _______, LALT(LCTL(KC_7)), LALT(LCTL(KC_8)), _______, _______, _______, LALT(LCTL(KC_L)), _______,
|
||||
_______, _______, _______, _______, _______, LALT(LCTL(KC_U)), LALT(LCTL(KC_I)), LALT(LCTL(KC_H)), _______, _______, _______, _______,
|
||||
RESET, _______, _______, _______, _______, LALT(LCTL(KC_7)), LALT(LCTL(KC_8)), _______, _______, _______, LALT(LCTL(KC_L)), _______,
|
||||
_______, _______, _______, _______, _______, LALT(LCTL(KC_U)), LALT(LCTL(KC_I)), LALT(LCTL(KC_H)), _______, _______, _______, _______,
|
||||
_______, _______, _______, LALT(LCTL(KC_J)), LALT(LCTL(KC_K)), _______, _______, _______, _______, _______, _______, LALT(LCTL(KC_ENTER)),
|
||||
TO(0), TO(4), _______, _______, _______, _______, KC_NO, _______, KC_AUDIO_VOL_DOWN, KC_F14, KC_F15, KC_AUDIO_VOL_UP
|
||||
),
|
||||
@@ -133,7 +133,7 @@ void keyboard_post_init_user(void) {
|
||||
const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = {
|
||||
[0] = { {32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,204,255}, {169,120,255}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255},
|
||||
{32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,204,255}, {169,120,255}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255},
|
||||
{32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,204,255}, {169,120,255}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255},
|
||||
{32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,204,255}, {169,120,255}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255},
|
||||
{32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,0,0}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255} },
|
||||
|
||||
[1] = { {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255},
|
||||
@@ -215,7 +215,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -245,6 +245,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -267,7 +267,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update(bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -291,6 +291,7 @@ void encoder_update(bool clockwise) {
|
||||
unregister_code(KC_PGUP);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
|
||||
Reference in New Issue
Block a user