skeletyl: fix tap dance
Signed-off-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
parent
8a71d85e16
commit
e23f10b7e9
1 changed files with 19 additions and 8 deletions
|
@ -6,7 +6,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
[0] = LAYOUT_split_3x5_3(
|
||||
KC_Q, LGUI(KC_W), KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, DE_Z, KC_BSPC,
|
||||
KC_A, LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LCTL_T(KC_N), LSFT_T(KC_E), LALT_T(KC_I), KC_O,
|
||||
DE_Y, KC_X, KC_C, LSFT_T(KC_D), KC_V, KC_K, LSFT_T(KC_H), DE_COMM, DE_DOT, DE_MINS,
|
||||
DE_Y, LT(0,KC_X), KC_C, LSFT_T(KC_D), KC_V, KC_K, LSFT_T(KC_H), DE_COMM, DE_DOT, DE_MINS,
|
||||
LT(3, KC_DEL), LT(2, KC_ENT), XXXXXXX, XXXXXXX, LT(1, KC_SPC), OSL(3)
|
||||
),
|
||||
// Zahlen
|
||||
|
@ -39,16 +39,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
)
|
||||
|
||||
};
|
||||
|
||||
// https://github.com/qmk/qmk_firmware/blob/master/docs/mod_tap.md#changing-hold-function
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_X:
|
||||
if (record->tap.count && record->event.pressed) {
|
||||
tap_code16(C(KC_X)); // Intercept tap function to send Ctrl-C
|
||||
} else if (record->event.pressed) {
|
||||
tap_code16(C(LCTL(KC_X))); // Intercept hold function to send Ctrl-V
|
||||
case LT(0,KC_X):
|
||||
if (!record->tap.count && record->event.pressed) {
|
||||
tap_code16(C(KC_X)); // Intercept hold function to send Ctrl-X
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
return true; // Return true for normal processing of tap keycode
|
||||
case LT(0,KC_C):
|
||||
if (!record->tap.count && record->event.pressed) {
|
||||
tap_code16(C(KC_C)); // Intercept hold function to send Ctrl-C
|
||||
return false;
|
||||
}
|
||||
return true; // Return true for normal processing of tap keycode
|
||||
case LT(0,KC_V):
|
||||
if (!record->tap.count && record->event.pressed) {
|
||||
tap_code16(C(KC_V)); // Intercept hold function to send Ctrl-V
|
||||
return false;
|
||||
}
|
||||
return true; // Return true for normal processing of tap keycode
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue