summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Shpits <hexbug@gmail.com>2021-02-17 04:13:30 +0500
committerGitHub <noreply@github.com>2021-02-16 15:13:30 -0800
commitbf3ee94b9ab8030a46f22e5ad80f20ea0675c510 (patch)
tree81cfbd9c4f44518c74cc41536e51f7a3cb6b996f
parente43ead8e96380808b725bc6b1bd468b9313c6fc2 (diff)
[Keyboard] Add VIA support for YMD 75 (#11811)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r--keyboards/ymd75/config.h1
-rw-r--r--keyboards/ymd75/keymaps/via/keymap.c61
-rw-r--r--keyboards/ymd75/keymaps/via/rules.mk2
3 files changed, 64 insertions, 0 deletions
diff --git a/keyboards/ymd75/config.h b/keyboards/ymd75/config.h
index cf3d3fd8df..79dcdc6c43 100644
--- a/keyboards/ymd75/config.h
+++ b/keyboards/ymd75/config.h
@@ -35,3 +35,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_HUE_STEP 12
#define RGBLIGHT_SAT_STEP 15
#define RGBLIGHT_VAL_STEP 18
+#define DYNAMIC_KEYMAP_LAYER_COUNT 3
diff --git a/keyboards/ymd75/keymaps/via/keymap.c b/keyboards/ymd75/keymaps/via/keymap.c
new file mode 100644
index 0000000000..4a9107bf95
--- /dev/null
+++ b/keyboards/ymd75/keymaps/via/keymap.c
@@ -0,0 +1,61 @@
+ /* Copyright 2021 kshpits
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* 0: Main Layer
+ * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
+ * │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PRSCR│PAUSE│ DEL │
+ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤
+ * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ BACKSPACE │HOME │
+ * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤
+ * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ END │
+ * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
+ * │ CAPS │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ RETURN │PG_UP│
+ * ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
+ * │ LSHIFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ RSHIFT │ UP │PG_DN│
+ * ├──────┬─────┴┬────┴─┬───┴─────┴─────┴─────┴─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤
+ * │LCTRL │L_GUI │L_ALT │ SPACE │R_ALT| FN │R_CTR│LEFT │DOWN │RIGHT│
+ * └──────┴──────┴──────┴──────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┘─────┘
+ */
+ [0] = LAYOUT(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_PAUS, KC_DEL,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN ,KC_QUOT, KC_ENT, KC_PGUP,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+
+ [1] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, KC_INS,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______,
+ _______, _______, _______, _______, _______, _______, KC_APP, KC_MPRV, KC_VOLD, KC_MNXT
+ ),
+ [2] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+};
diff --git a/keyboards/ymd75/keymaps/via/rules.mk b/keyboards/ymd75/keymaps/via/rules.mk
new file mode 100644
index 0000000000..43061db1dd
--- /dev/null
+++ b/keyboards/ymd75/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+LTO_ENABLE = yes \ No newline at end of file