diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2017-07-02 01:06:59 +0300 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2017-07-08 21:59:51 -0400 |
commit | e5780a6dc66bb21969594f1b446916e36cf69253 (patch) | |
tree | be170b59b369f3a6c9f099df137f977908b01db7 /tests/basic/keymap.c | |
parent | 4087d6da0d60f51735f6ec2c34e5fdabcf9c4447 (diff) | |
download | qmk_firmware-e5780a6dc66bb21969594f1b446916e36cf69253.tar.gz |
Add tests for macros
Diffstat (limited to 'tests/basic/keymap.c')
-rw-r--r-- | tests/basic/keymap.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/basic/keymap.c b/tests/basic/keymap.c index 358cbdb59..adacb379c 100644 --- a/tests/basic/keymap.c +++ b/tests/basic/keymap.c @@ -24,9 +24,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = { // 0 1 2 3 4 5 6 7 8 9 - {KC_A, KC_B, KC_NO, KC_LSFT, KC_RSFT, KC_LCTL, COMBO1, SFT_T(KC_P), KC_NO, KC_NO}, + {KC_A, KC_B, KC_NO, KC_LSFT, KC_RSFT, KC_LCTL, COMBO1, SFT_T(KC_P), M(0), KC_NO}, {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, {KC_C, KC_D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, }, }; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case 0: + return MACRO(D(LSFT), T(H), U(LSFT), T(E), T(L), T(L), T(O), T(SPACE), W(100), + D(LSFT), T(W), U(LSFT), I(10), T(O), T(R), T(L), T(D), D(LSFT), T(1), U(LSFT), END); + } + } + return MACRO_NONE; +}; |