diff options
Diffstat (limited to 'users/uqs')
-rw-r--r-- | users/uqs/config.h | 3 | ||||
-rw-r--r-- | users/uqs/uqs.c | 36 | ||||
-rw-r--r-- | users/uqs/uqs.h | 2 |
3 files changed, 20 insertions, 21 deletions
diff --git a/users/uqs/config.h b/users/uqs/config.h index b8a140fe87..4bb793532b 100644 --- a/users/uqs/config.h +++ b/users/uqs/config.h @@ -4,7 +4,6 @@ #ifdef RGBLIGHT_ENABLE # define RGBLIGHT_SLEEP -//# define RGBLIGHT_ANIMATIONS // disabled to save space # define RGBLIGHT_LAYERS # define RGBLIGHT_MAX_LAYERS 8 // default is 16 # define RGBLIGHT_DISABLE_KEYCODES // RGB_foo keys no longer work, saves 600 bytes @@ -23,7 +22,7 @@ #define LEADER_TIMEOUT 400 #define LEADER_PER_KEY_TIMING -#define UNICODE_SELECTED_MODES UC_LNX +#define UNICODE_SELECTED_MODES UNICODE_MODE_LINUX // make KC_ACL0 et al work when held. #define MK_COMBINED diff --git a/users/uqs/uqs.c b/users/uqs/uqs.c index 72284143c6..82cf70c439 100644 --- a/users/uqs/uqs.c +++ b/users/uqs/uqs.c @@ -78,9 +78,9 @@ const rgblight_segment_t* const PROGMEM my_rgb_layers[] = { my_rgb_segments[L_MOUSE], }; -_Static_assert(sizeof(my_rgb_layers) / sizeof(my_rgb_layers[0]) == - sizeof(my_rgb_segments) / sizeof(my_rgb_segments[0]), - "Number of rgb_segment definitions does not match up!"); +_Static_assert(ARRAY_SIZE(my_rgb_layers) == + ARRAY_SIZE(my_rgb_segments), + "Number of rgb_segment definitions does not match up!"); #endif #ifdef COMBO_ENABLE @@ -125,7 +125,7 @@ const uint16_t PROGMEM my_combos[][4] = { {KC_BTN1, KC_BTN2, KC_BTN3, COMBO_END}, }; -const uint16_t COMBO_LEN = sizeof(my_action_combos) / sizeof(my_action_combos[0]) + sizeof(my_combos) / sizeof(my_combos[0]); +const uint16_t COMBO_LEN = ARRAY_SIZE(my_action_combos) + ARRAY_SIZE(my_combos); #define MY_ACTION_COMBO(ck) \ [ck] = { .keys = &(my_action_combos[ck][0]) } @@ -162,11 +162,11 @@ combo_t key_combos[] = { MY_COMBO(14), }; -_Static_assert(sizeof(key_combos) / sizeof(key_combos[0]) == - (sizeof(my_action_combos) / sizeof(my_action_combos[0]) + sizeof(my_combos) / sizeof(my_combos[0])), - "Number of combo definitions does not match up!"); +_Static_assert(ARRAY_SIZE(key_combos) == + (ARRAY_SIZE(my_action_combos) + ARRAY_SIZE(my_combos)), + "Number of combo definitions does not match up!"); #else -combo_t key_combos[sizeof(my_action_combos) / sizeof(my_action_combos[0]) + sizeof(my_combos) / sizeof(my_combos[0])]; +combo_t key_combos[ARRAY_SIZE(my_action_combos) + ARRAY_SIZE(my_combos)]; #endif void process_combo_event(uint16_t combo_index, bool pressed) { @@ -235,10 +235,10 @@ void keyboard_post_init_user(void) { #endif #if defined(COMBO_ENABLE) && !defined(COMBO_STATICALLY) uint8_t i = 0; - for (; i < sizeof(my_action_combos) / sizeof(my_action_combos[0]); i++) { + for (; i < ARRAY_SIZE(my_action_combos); i++) { key_combos[i].keys = &(my_action_combos[i][0]); } - for (uint8_t j = 0; j < sizeof(my_combos) / sizeof(my_combos[0]); j++, i++) { + for (uint8_t j = 0; j < ARRAY_SIZE(my_combos); j++, i++) { key_combos[i].keycode = my_combos[j][0]; key_combos[i].keys = &(my_combos[j][1]); } @@ -502,10 +502,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { /* * Obsoleted by making tmux understand Ctrl-(Shift)-Tab natively. case TM_NEXT: - if (record->event.pressed) SEND_STRING(SS_LCTRL("a") "n"); + if (record->event.pressed) SEND_STRING(SS_LCTL("a") "n"); break; case TM_PREV: - if (record->event.pressed) SEND_STRING(SS_LCTRL("a") "p"); + if (record->event.pressed) SEND_STRING(SS_LCTL("a") "p"); break; */ // TODO: use key overrides to turn, e.g. Win+Ctrl-Tab into VIM_NEXT. @@ -517,16 +517,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) SEND_STRING(SS_TAP(X_ESC) SS_TAP(X_G) SS_LSFT("t")); break; case WIN_LEFT: - if (record->event.pressed) SEND_STRING(SS_LCTRL("w") SS_TAP(X_H)); + if (record->event.pressed) SEND_STRING(SS_LCTL("w") SS_TAP(X_H)); break; case WIN_DN: - if (record->event.pressed) SEND_STRING(SS_LCTRL("w") SS_TAP(X_J)); + if (record->event.pressed) SEND_STRING(SS_LCTL("w") SS_TAP(X_J)); break; case WIN_UP: - if (record->event.pressed) SEND_STRING(SS_LCTRL("w") SS_TAP(X_K)); + if (record->event.pressed) SEND_STRING(SS_LCTL("w") SS_TAP(X_K)); break; case WIN_RGHT: - if (record->event.pressed) SEND_STRING(SS_LCTRL("w") SS_TAP(X_L)); + if (record->event.pressed) SEND_STRING(SS_LCTL("w") SS_TAP(X_L)); break; } @@ -560,13 +560,13 @@ void matrix_scan_user(void) { } // tableflip (LEADER - TF) SEQ_TWO_KEYS(KC_T, KC_F) { - //set_unicode_input_mode(UC_LNX); + //set_unicode_input_mode(UNICODE_MODE_LINUX); //send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); send_unicode_string("(╯°□°)╯︵ ┻━┻"); } // untableflip SEQ_THREE_KEYS(KC_U, KC_T, KC_F) { - //set_unicode_input_mode(UC_LNX); + //set_unicode_input_mode(UNICODE_MODE_LINUX); //send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); send_unicode_string("┬─┬ノ( º _ ºノ)"); } diff --git a/users/uqs/uqs.h b/users/uqs/uqs.h index f8b30caf79..b5026e5b59 100644 --- a/users/uqs/uqs.h +++ b/users/uqs/uqs.h @@ -52,7 +52,7 @@ enum custom_keycodes { }; #ifndef LEADER_ENABLE -#define KC_LEAD KC_NO +#define QK_LEAD KC_NO #endif // Shorter names |