diff options
author | QMK Bot <hello@qmk.fm> | 2022-01-13 17:16:06 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2022-01-13 17:16:06 +0000 |
commit | 4f79b57774705ce1def5ef09502d3e828b712a35 (patch) | |
tree | 4196d113ad6bf2c4c1ad599b1f180cb8c9f26f18 /users/riblee/riblee.c | |
parent | 3058bf0f83af272afa05fe200e7d043b63f61aea (diff) | |
parent | a3af4b09b0786e7c228828b2b3676fb7dd9a1c2f (diff) |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'users/riblee/riblee.c')
-rw-r--r-- | users/riblee/riblee.c | 45 |
1 files changed, 17 insertions, 28 deletions
diff --git a/users/riblee/riblee.c b/users/riblee/riblee.c index 307c697204..02ba246f60 100644 --- a/users/riblee/riblee.c +++ b/users/riblee/riblee.c @@ -18,15 +18,13 @@ #include "raw_hid.h" #include <string.h> -const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); - // Tap Dance functions void dance_key_a (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { SEND_STRING("a"); reset_tap_dance(state); } else if (state->count == 2) { - if (!(keyboard_report->mods & shift)) { + if (!(keyboard_report->mods & MOD_MASK_SHIFT)) { send_unicode_string("á"); } else { send_unicode_string("Á"); @@ -41,7 +39,7 @@ void dance_key_e (qk_tap_dance_state_t *state, void *user_data) { SEND_STRING("e"); reset_tap_dance(state); } else if (state->count == 2) { - if (!(keyboard_report->mods & shift)) { + if (!(keyboard_report->mods & MOD_MASK_SHIFT)) { send_unicode_string("é"); } else { send_unicode_string("É"); @@ -56,7 +54,7 @@ void dance_key_i (qk_tap_dance_state_t *state, void *user_data) { SEND_STRING("i"); reset_tap_dance(state); } else if (state->count == 2) { - if (!(keyboard_report->mods & shift)) { + if (!(keyboard_report->mods & MOD_MASK_SHIFT)) { send_unicode_string("í"); } else { send_unicode_string("Í"); @@ -71,7 +69,7 @@ void dance_key_o (qk_tap_dance_state_t *state, void *user_data) { SEND_STRING("o"); reset_tap_dance(state); } else if (state->count == 2) { - if (!(keyboard_report->mods & shift)) { + if (!(keyboard_report->mods & MOD_MASK_SHIFT)) { send_unicode_string("ó"); } else { send_unicode_string("Ó"); @@ -79,7 +77,7 @@ void dance_key_o (qk_tap_dance_state_t *state, void *user_data) { reset_tap_dance(state); } else if (state->count == 3) { - if (!(keyboard_report->mods & shift)) { + if (!(keyboard_report->mods & MOD_MASK_SHIFT)) { send_unicode_string("ö"); } else { send_unicode_string("Ö"); @@ -87,7 +85,7 @@ void dance_key_o (qk_tap_dance_state_t *state, void *user_data) { reset_tap_dance(state); } else if (state->count == 4) { - if (!(keyboard_report->mods & shift)) { + if (!(keyboard_report->mods & MOD_MASK_SHIFT)) { send_unicode_string("ő"); } else { send_unicode_string("Ő"); @@ -102,7 +100,7 @@ void dance_key_u (qk_tap_dance_state_t *state, void *user_data) { SEND_STRING("u"); reset_tap_dance(state); } else if (state->count == 2) { - if (!(keyboard_report->mods & shift)) { + if (!(keyboard_report->mods & MOD_MASK_SHIFT)) { send_unicode_string("ú"); } else { send_unicode_string("Ú"); @@ -110,7 +108,7 @@ void dance_key_u (qk_tap_dance_state_t *state, void *user_data) { reset_tap_dance(state); } else if (state->count == 3) { - if (!(keyboard_report->mods & shift)) { + if (!(keyboard_report->mods & MOD_MASK_SHIFT)) { send_unicode_string("ü"); } else { send_unicode_string("Ü"); @@ -118,7 +116,7 @@ void dance_key_u (qk_tap_dance_state_t *state, void *user_data) { reset_tap_dance(state); } else if (state->count == 4) { - if (!(keyboard_report->mods & shift)) { + if (!(keyboard_report->mods & MOD_MASK_SHIFT)) { send_unicode_string("ű"); } else { send_unicode_string("Ű"); @@ -164,23 +162,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case BACKLIT: - if (record->event.pressed) { - register_code(keycode_config(KC_LGUI)); -#ifdef BACKLIGHT_ENABLE - backlight_step(); -#endif - } else { - unregister_code(keycode_config(KC_LGUI)); - } - return false; - break; - case CG_NORM: - set_unicode_input_mode(UC_MAC); - break; - case CG_SWAP: - set_unicode_input_mode(UC_LNX); - break; } return true; }; @@ -287,3 +268,11 @@ void raw_hid_receive(uint8_t *data, uint8_t length) { #endif #endif + +void keyboard_pre_init_user(void) { + // Set C13 pin as output + setPinOutput(C13); + + // Turn off the LED + writePinHigh(C13); +}
\ No newline at end of file |