diff options
author | Drashna Jaelre <drashna@live.com> | 2021-05-21 23:17:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 23:17:32 -0700 |
commit | a0fed0ea176d1c986e40fc4981b900509c90d66e (patch) | |
tree | ee12f5943046015ea0dce8e2a30a68bc8eb99dbe /keyboards/preonic/keymaps/senseored | |
parent | 76c23b15abc824f867b48d8d5100dced2417d336 (diff) |
Convert Encoder callbacks to be boolean functions (#12805)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Diffstat (limited to 'keyboards/preonic/keymaps/senseored')
-rw-r--r-- | keyboards/preonic/keymaps/senseored/keymap.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/keyboards/preonic/keymaps/senseored/keymap.c b/keyboards/preonic/keymaps/senseored/keymap.c index 6ddf289420..c78528d8c3 100644 --- a/keyboards/preonic/keymaps/senseored/keymap.c +++ b/keyboards/preonic/keymaps/senseored/keymap.c @@ -25,7 +25,7 @@ enum preonic_layers { _FNL2, _ADJUST, _GAMEMODE, - _FNL3, + _FNL3, _LOWER2, _RAISE2 }; @@ -236,7 +236,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Raise * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | § | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | * |------+------+------+------+------+-------------+------+------+------+------+------| * | ´ | ` | @ | £ | $ | € | ¨ | { | [ | ] | } | \ | @@ -271,7 +271,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P0) SS_TAP(X_P1) SS_TAP(X_P7) SS_TAP(X_P6) SS_UP(X_LALT)); SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_KP_0) SS_TAP(X_KP_1) SS_TAP(X_KP_7) SS_TAP(X_KP_6) SS_UP(X_LALT) ); return false; - + if(bnumlock) { tap_code(KC_NLCK); bnumlock = false; @@ -283,14 +283,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } else { workmode = false; - return false; - } + return false; + } } - + } return true; switch (keycode) { - + case BACKLIT: if (record->event.pressed) { register_code(KC_RSFT); @@ -318,7 +318,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -342,6 +342,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { unregister_code(KC_PGUP); } } + return true; } void dip_switch_update_user(uint8_t index, bool active) { @@ -375,7 +376,7 @@ uint32_t layer_state_set_user(uint32_t state) { if(!bnumlock) { tap_code(KC_NLCK); } - + break; case _ADJUST: if(bnumlock) { @@ -398,7 +399,7 @@ uint32_t layer_state_set_user(uint32_t state) { if(bnumlock) { tap_code(KC_NLCK); } - + break; } // } |