parameterize the delay
This commit is contained in:
parent
227566cc43
commit
62c177a8ff
11
keymap.c
11
keymap.c
|
@ -16,16 +16,18 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum custom_keycodes {
|
||||
QMK_TRIPLE_CLICK = SAFE_RANGE,
|
||||
QMK_TRIPLE_CLICK_CUT = SAFE_RANGE,
|
||||
QMK_BANANA,
|
||||
};
|
||||
|
||||
#define delay 200
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QMK_TRIPLE_CLICK:
|
||||
case QMK_TRIPLE_CLICK_CUT:
|
||||
if (record->event.pressed) {
|
||||
// when keycode is pressed
|
||||
SEND_STRING( SS_TAP(X_BTN1) SS_DELAY(250) SS_TAP(X_BTN1) SS_DELAY(250) SS_TAP(X_BTN1) SS_DELAY(250) SS_LCTL("x"));
|
||||
SEND_STRING( SS_TAP(X_BTN1) SS_DELAY(delay) SS_TAP(X_BTN1) SS_DELAY(delay) SS_TAP(X_BTN1) SS_DELAY(delay) SS_LCTL("x"));
|
||||
} else {
|
||||
// when keycode is released
|
||||
}
|
||||
|
@ -34,7 +36,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
case QMK_BANANA:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("banana");
|
||||
} else {
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -47,6 +48,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
RGB_RMOD, RGB_MOD,
|
||||
LCTL(KC_X), LCTL(KC_C), LCTL(KC_V),
|
||||
KC_PGUP, KC_PGDN, KC_VOLU, KC_VOLD,
|
||||
KC_1 , QMK_BANANA , QMK_TRIPLE_CLICK
|
||||
KC_1 , QMK_BANANA , QMK_TRIPLE_CLICK_CUT
|
||||
),
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue