diff options
Diffstat (limited to 'keyboards/meishi2')
| -rw-r--r-- | keyboards/meishi2/keymaps/moc/config.h | 19 | ||||
| -rw-r--r-- | keyboards/meishi2/keymaps/moc/keymap.c | 45 | ||||
| -rw-r--r-- | keyboards/meishi2/keymaps/moc/readme.md | 17 |
3 files changed, 81 insertions, 0 deletions
diff --git a/keyboards/meishi2/keymaps/moc/config.h b/keyboards/meishi2/keymaps/moc/config.h new file mode 100644 index 000000000..9b5675af6 --- /dev/null +++ b/keyboards/meishi2/keymaps/moc/config.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* Copyright 2021 Atsushi Nagase | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | // place overrides here | ||
diff --git a/keyboards/meishi2/keymaps/moc/keymap.c b/keyboards/meishi2/keymaps/moc/keymap.c new file mode 100644 index 000000000..5e6c2e9c2 --- /dev/null +++ b/keyboards/meishi2/keymaps/moc/keymap.c | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | /* Copyright 2021 Atsushi Nagase | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | enum meishi2_moc_layers { | ||
| 19 | _DEFAULT, | ||
| 20 | _RAISE | ||
| 21 | }; | ||
| 22 | |||
| 23 | #define PRO_MICRO_LED_TX D5 | ||
| 24 | #define RAISE MO(_RAISE) | ||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | [_DEFAULT] = LAYOUT( /* Base */ | ||
| 28 | RAISE, KC_B, KC_N, KC_SPC | ||
| 29 | ), | ||
| 30 | [_RAISE] = LAYOUT( /* Raise */ | ||
| 31 | _______, KC_LEFT, KC_RGHT, LSFT(KC_S) | ||
| 32 | ) | ||
| 33 | }; | ||
| 34 | |||
| 35 | void matrix_init_user(void) { | ||
| 36 | setPinOutput(PRO_MICRO_LED_TX); | ||
| 37 | writePinHigh(PRO_MICRO_LED_TX); | ||
| 38 | } | ||
| 39 | |||
| 40 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 41 | if (keycode == RAISE) { | ||
| 42 | writePin(PRO_MICRO_LED_TX, !record->event.pressed); | ||
| 43 | } | ||
| 44 | return true; | ||
| 45 | } | ||
diff --git a/keyboards/meishi2/keymaps/moc/readme.md b/keyboards/meishi2/keymaps/moc/readme.md new file mode 100644 index 000000000..aac1b25c9 --- /dev/null +++ b/keyboards/meishi2/keymaps/moc/readme.md | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | # [MOC] keymap for meishi2 | ||
| 2 | |||
| 3 | ``` | ||
| 4 | ,--------- ------ ------ -----, | ||
| 5 | | RAISE | ⏮ | ⏭ | ⏯ | | ||
| 6 | `--------- ------ ------ -----' | ||
| 7 | ``` | ||
| 8 | |||
| 9 | ## Raise Layer | ||
| 10 | |||
| 11 | ``` | ||
| 12 | ,--------- ------ ------ -----, | ||
| 13 | | | ⏪ | ⏩ | 🔀 | | ||
| 14 | `--------- ------ ------ -----' | ||
| 15 | ``` | ||
| 16 | |||
| 17 | [moc]: http://moc.daper.net/ | ||
