Skip to content

Commit

Permalink
add C_X
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanwang-wf committed Jul 8, 2024
1 parent 3b5e064 commit 2f2d13f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions qmk/yuanw/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ enum my_keycodes { RDO = SAFE_RANGE,
UND,
ALTREP2,
ALTREP3,
C_X,
};

// clang-format off
/** \brief QWERTY layout (3 rows, 10 columns). */
#define LAYOUT_LAYER_BASE \
QK_REP, KC_W, KC_M, KC_P, XXXXXXX, XXXXXXX, KC_COMM, KC_SCLN, KC_DOT, QK_REP, \
KC_R, KC_S, KC_N, KC_T, KC_G, KC_V, KC_H, KC_A, KC_I, KC_O, \
C(KC_X), KC_C, KC_F, KC_D, XXXXXXX, XXXXXXX, KC_L, KC_U, KC_Y, KC_QUOT, \
C_X, KC_C, KC_F, KC_D, XXXXXXX, XXXXXXX, KC_L, KC_U, KC_Y, KC_QUOT, \
ESC_MED, SPC_NAV, TAB_FUN, ENT_SYM, E_NUM

/** Convenience row shorthands. */
Expand Down Expand Up @@ -364,7 +365,6 @@ static void process_altrep3(uint16_t keycode, uint8_t mods) {

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {

case ALTREP2:
if (record->event.pressed) {
process_altrep2(get_last_keycode(), get_last_mods());
Expand Down Expand Up @@ -439,6 +439,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
return false;
}

case C_X:
if (record->event.pressed) {
tap_code16(C(KC_X));
return false;
}
}
return true; // Process all other keycodes normally
}

0 comments on commit 2f2d13f

Please sign in to comment.