diff options
Diffstat (limited to 'qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c')
| -rw-r--r-- | qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c | 17 | 
1 files changed, 12 insertions, 5 deletions
| diff --git a/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c b/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c index 63bb76d..8819917 100644 --- a/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c +++ b/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c @@ -3,6 +3,8 @@  #include "keycodes.h"  #include "star_key.h"  #include "lighting.h" +#include "enter_dance.h" +#include "shift_dance.h"  void keyboard_post_init_user(void) {      lighting_init(); @@ -16,6 +18,10 @@ void housekeeping_task_user(void) {      housekeeping_task_lighting();  } +void oneshot_mods_changed_user(uint8_t mods) { +    oneshot_mods_changed_lighting(mods); +} +  /*   * Rules and modifier to apply over the keycodes. This includes the keys   * redefinitions and the keys to include in the caps_word mecanism. @@ -34,7 +40,6 @@ bool caps_word_press_user(uint16_t keycode) {          case KC_A ... KC_Z:          case KC_1 ... KC_0:          case KC_MINS: -        case KEY_C: // Add also the tapdance keys here.          case KEY_W:          case KEY_E:          case BP_Z:  // Additionals keys from the bepo layout. @@ -65,9 +70,8 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {          case KEY_E:              return 230;          case KEY_W: -            return 400; -        case KEY_EE: -            return 350; +        case TD_ENTER: +            return 2 * TAPPING_TERM;          default:              return TAPPING_TERM;      } @@ -88,8 +92,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {        latest_key = keycode;      } -  // Call the star_key handler +  // Call the callback handlers    star_key_process_record(keycode, record); +  shift_dance_process_record(keycode, record); +  enter_dance_process_record(keycode, record);    switch (keycode) {      case KC_LEFT_SHIFT: @@ -97,6 +103,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {          tap_code16(KC_CAPS_LOCK);        }        return true; +    case KC_ESC:      case AL_ENT:        if (layer_state_is(LAYER_SYMBOLS) && !record->event.pressed) {            // Remove the layer the key is released. | 
