diff options
| author | dezli <29718605+dezlidezlidezli@users.noreply.github.com> | 2020-09-22 13:03:03 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-21 22:03:03 -0700 |
| commit | bfbcfbc83e9c496abff002726f7cc07108d99003 (patch) | |
| tree | a22a1497bfe9b24fc390cdaacd25e0fc2393d21a /keyboards/minimacro5/keymaps/default/keymap.c | |
| parent | 967ed19d77ce6793dac6cd94e294fe9edff5a39b (diff) | |
| download | qmk_firmware-bfbcfbc83e9c496abff002726f7cc07108d99003.tar.gz qmk_firmware-bfbcfbc83e9c496abff002726f7cc07108d99003.zip | |
[Keyboard] Add miniMACRO5 Macropad (#10392)
* add miniMACRO5
add all nessecary files for the miniMACRO5
I have rewritten the readme, and changed the keymaps to be more simple. I have tested compiling, and everything works perfectly.
* update miniMACRO5 readme
add the make example into the readme file
* Update keyboards/minimacro5/config.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/minimacro5/keymaps/default/keymap.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/minimacro5/keymaps/media/keymap.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/minimacro5/keymaps/media/keymap.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/minimacro5/minimacro5.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/minimacro5/info.json
Co-authored-by: Ryan <fauxpark@gmail.com>
* Apply suggestions from code review
applied all suggestions.
Co-authored-by: Ryan <fauxpark@gmail.com>
* drashna suggestions - enum rather than define
committed enum update by drashna
Co-authored-by: Drashna Jaelre <drashna@live.com>
* update keymap.c
incorrect brackets
Co-authored-by: dezli <m@dez.li>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/minimacro5/keymaps/default/keymap.c')
| -rw-r--r-- | keyboards/minimacro5/keymaps/default/keymap.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/keyboards/minimacro5/keymaps/default/keymap.c b/keyboards/minimacro5/keymaps/default/keymap.c new file mode 100644 index 000000000..acd7f3283 --- /dev/null +++ b/keyboards/minimacro5/keymaps/default/keymap.c | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | |||
| 3 | enum layers { | ||
| 4 | _MAIN, | ||
| 5 | }; | ||
| 6 | |||
| 7 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 8 | if (index == 0) { /* First encoder*/ | ||
| 9 | if (clockwise) { | ||
| 10 | tap_code(KC_1); | ||
| 11 | } else { | ||
| 12 | tap_code(KC_2); | ||
| 13 | } | ||
| 14 | } else if (index == 1) { /* Second encoder*/ | ||
| 15 | if (clockwise) { | ||
| 16 | tap_code(KC_3); | ||
| 17 | } else { | ||
| 18 | tap_code(KC_4); | ||
| 19 | } | ||
| 20 | } else if (index == 2) { /* Third encoder*/ | ||
| 21 | if (clockwise) { | ||
| 22 | tap_code(KC_5); | ||
| 23 | } else { | ||
| 24 | tap_code(KC_6); | ||
| 25 | } | ||
| 26 | } else if (index == 3) { /* Fourth encoder*/ | ||
| 27 | if (clockwise) { | ||
| 28 | tap_code(KC_7); | ||
| 29 | } else { | ||
| 30 | tap_code(KC_8); | ||
| 31 | } | ||
| 32 | } else if (index == 4) { /* Fifth encoder*/ | ||
| 33 | if (clockwise) { | ||
| 34 | tap_code(KC_9); | ||
| 35 | } else { | ||
| 36 | tap_code(KC_0); | ||
| 37 | } | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | // | ||
| 42 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first | ||
| 43 | [_MAIN] = LAYOUT_ortho_1x5( | ||
| 44 | KC_A, KC_B, KC_C, KC_D, KC_E | ||
| 45 | ) | ||
| 46 | }; | ||
