summaryrefslogtreecommitdiffstats
path: root/keyboards/kbd4x/kbd4x.h
diff options
context:
space:
mode:
authorRebecca Le <543859+sevenseacat@users.noreply.github.com>2018-10-02 11:43:43 +0800
committerDrashna Jaelre <drashna@live.com>2018-10-01 20:43:43 -0700
commit9f2e39732f2458b1bfe5d546581da508c2be577e (patch)
treeaee0020e68c872ec50102731b33523db2af26a1a /keyboards/kbd4x/kbd4x.h
parentabcf64ecbdadc226350d457dfdc5079ce51fd72c (diff)
Keyboard: Add support for the KBD4x (#4036)
* Generate a new project for the KBD4x * Specify the possible layouts for the KBD4x - MIT and grid * Fill out the readme for the KBD4x * Configure the default keymap and wiring configuration as specified on http://qmkeyboard.cn/ * Add info.json for QMK Configurator * Enable backlight support for the KBD4x * Standardise on LAYOUT_planck_mit/LAYOUT_ortho_4x12 layout names * Add whitespace so the Readme will render correctly * Disable mouse keys support for the KBD4x to make the firmware small enough
Diffstat (limited to 'keyboards/kbd4x/kbd4x.h')
-rw-r--r--keyboards/kbd4x/kbd4x.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/keyboards/kbd4x/kbd4x.h b/keyboards/kbd4x/kbd4x.h
new file mode 100644
index 0000000000..d7a851e3eb
--- /dev/null
+++ b/keyboards/kbd4x/kbd4x.h
@@ -0,0 +1,48 @@
+/* Copyright 2018 sevenseacat
+ *
+ * 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/>.
+ */
+#ifndef KBD4X_H
+#define KBD4X_H
+
+#include "quantum.h"
+
+#define LAYOUT_planck_mit( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
+ { k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \
+}
+
+// The PCB does support a grid layout, but the case does not.
+#define LAYOUT_ortho_4x12( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
+}
+
+#endif