summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorcdc-mkb <90561417+cdc-mkb@users.noreply.github.com>2021-12-27 02:00:06 +0100
committerGitHub <noreply@github.com>2021-12-27 12:00:06 +1100
commit51be57c28709f60ce8c196de48d302d67abe6a4d (patch)
tree1e3d2b0b8d5871bc79530e6185dc717b87d82c59 /keyboards
parent94fe31609e41902c0cf579f2d2601ad8b54c5d3f (diff)
[Keyboard] Add MNT Reform USB Keyboard (Standalone) (#15561)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/mntre/config.h101
-rw-r--r--keyboards/mntre/info.json98
-rw-r--r--keyboards/mntre/keymaps/default/keymap.c31
-rw-r--r--keyboards/mntre/keymaps/default/readme.md19
-rw-r--r--keyboards/mntre/mntre.c19
-rw-r--r--keyboards/mntre/mntre.h30
-rw-r--r--keyboards/mntre/readme.md27
-rw-r--r--keyboards/mntre/rules.mk21
8 files changed, 346 insertions, 0 deletions
diff --git a/keyboards/mntre/config.h b/keyboards/mntre/config.h
new file mode 100644
index 0000000000..9ee3d3f272
--- /dev/null
+++ b/keyboards/mntre/config.h
@@ -0,0 +1,101 @@
+// Copyright 2021 Cedric Vincent (@cdc-mkb)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x1302
+#define DEVICE_VER 0x0002
+#define MANUFACTURER MNT Research GmbH
+#define PRODUCT MNT Reform USB Keyboard (Standalone)
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 14
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+ */
+#define MATRIX_ROW_PINS { B6, B5, B4, D7, D6, D4 }
+#define MATRIX_COL_PINS { D5, F7, E6, C7, B3, B2, B1, B0, F0, F1, F4, F5, F6, C6 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+#define BACKLIGHT_PIN B7
+#define BACKLIGHT_CUSTOM_RESOLUTION 0x400
+#define BACKLIGHT_LIMIT_VAL 84
+//#define BACKLIGHT_LEVELS 3
+//#define BACKLIGHT_BREATHING
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+//#define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+
+/* disable these deprecated features by default */
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+
+/* Bootmagic Lite key configuration */
+//#define BOOTMAGIC_LITE_ROW 0
+//#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/mntre/info.json b/keyboards/mntre/info.json
new file mode 100644
index 0000000000..05e4bd4fd0
--- /dev/null
+++ b/keyboards/mntre/info.json
@@ -0,0 +1,98 @@
+{
+ "keyboard_name": "MNT Reform USB Keyboard (Standalone)",
+ "url": "https://shop.mntmn.com/products/mnt-reform-usb-keyboard-standalone",
+ "maintainer": "cdc-mkb",
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"label": "ESC", "x": 0, "y": 0},
+ {"label": "F1", "x": 1, "y": 0},
+ {"label": "F2", "x": 2, "y": 0},
+ {"label": "F3", "x": 3, "y": 0},
+ {"label": "F4", "x": 4, "y": 0},
+ {"label": "F5", "x": 5, "y": 0},
+ {"label": "F6", "x": 6, "y": 0},
+ {"label": "F7", "x": 7, "y": 0},
+ {"label": "F8", "x": 8, "y": 0},
+ {"label": "F9", "x": 9, "y": 0},
+ {"label": "F10", "x": 10, "y": 0},
+ {"label": "F11", "x": 11, "y": 0},
+ {"label": "F12", "x": 12, "y": 0},
+ {"label": "NO", "x": 13, "y": 0, "w": 1.5},
+
+ {"label": "GRAVE", "x": 0, "y": 1},
+ {"label": "1", "x": 1, "y": 1},
+ {"label": "2", "x": 2, "y": 1},
+ {"label": "3", "x": 3, "y": 1},
+ {"label": "4", "x": 4, "y": 1},
+ {"label": "5", "x": 5, "y": 1},
+ {"label": "6", "x": 6, "y": 1},
+ {"label": "7", "x": 7, "y": 1},
+ {"label": "8", "x": 8, "y": 1},
+ {"label": "9", "x": 9, "y": 1},
+ {"label": "0", "x": 10, "y": 1},
+ {"label": "MINUS", "x": 11, "y": 1},
+ {"label": "EQUAL", "x": 12, "y": 1},
+ {"label": "BSPACE", "x": 13, "y": 1, "w": 1.5},
+
+ {"label": "TAB", "x": 0, "y": 2, "w": 1.5},
+ {"label": "Q", "x": 1.5, "y": 2},
+ {"label": "W", "x": 2.5, "y": 2},
+ {"label": "E", "x": 3.5, "y": 2},
+ {"label": "R", "x": 4.5, "y": 2},
+ {"label": "T", "x": 5.5, "y": 2},
+ {"label": "Y", "x": 6.5, "y": 2},
+ {"label": "U", "x": 7.5, "y": 2},
+ {"label": "I", "x": 8.5, "y": 2},
+ {"label": "O", "x": 9.5, "y": 2},
+ {"label": "P", "x": 10.5, "y": 2},
+ {"label": "LBRACKET", "x": 11.5, "y": 2},
+ {"label": "RBRACKET", "x": 12.5, "y": 2},
+ {"label": "BSLASH", "x": 13.5, "y": 2},
+
+ {"label": "LCTRL", "x": 0, "y": 3},
+ {"label": "APP", "x": 1, "y": 3},
+ {"label": "A", "x": 2, "y": 3},
+ {"label": "S", "x": 3, "y": 3},
+ {"label": "D", "x": 4, "y": 3},
+ {"label": "F", "x": 5, "y": 3},
+ {"label": "G", "x": 6, "y": 3},
+ {"label": "H", "x": 7, "y": 3},
+ {"label": "J", "x": 8, "y": 3},
+ {"label": "K", "x": 9, "y": 3},
+ {"label": "L", "x": 10, "y": 3},
+ {"label": "SCOLON", "x": 11, "y": 3},
+ {"label": "QUOTE", "x": 12, "y": 3},
+ {"label": "ENTER", "x": 13, "y": 3, "w": 1.5},
+
+ {"label": "LSHIFT", "x": 0, "y": 4, "w": 1.5},
+ {"label": "DEL", "x": 1.5, "y": 4},
+ {"label": "Z", "x": 2.5, "y": 4},
+ {"label": "X", "x": 3.5, "y": 4},
+ {"label": "C", "x": 4.5, "y": 4},
+ {"label": "V", "x": 5.5, "y": 4},
+ {"label": "B", "x": 6.5, "y": 4},
+ {"label": "N", "x": 7.5, "y": 4},
+ {"label": "M", "x": 8.5, "y": 4},
+ {"label": "COMMA", "x": 9.5, "y": 4},
+ {"label": "DOT", "x": 10.5, "y": 4},
+ {"label": "SLASH", "x": 11.5, "y": 4},
+ {"label": "UP", "x": 12.5, "y": 4},
+ {"label": "RSHIFT", "x": 13.5, "y": 4},
+
+ {"label": "RGUI", "x": 0, "y": 5, "w": 1.5},
+ {"label": "LGUI", "x": 1.5, "y": 5, "w": 1.5},
+ {"label": "RCTRL", "x": 3, "y": 5, "w": 1.5},
+ {"label": "SPACE", "x": 4.5, "y": 5, "w": 1.5},
+ {"label": "LALT", "x": 6, "y": 5},
+ {"label": "RALT", "x": 7, "y": 5},
+ {"label": "SPACE", "x": 8, "y": 5, "w": 1.5},
+ {"label": "PGUP", "x": 9.5, "y": 5},
+ {"label": "PGDOWN", "x": 10.5, "y": 5},
+ {"label": "LEFT", "x": 11.5, "y": 5},
+ {"label": "DOWN", "x": 12.5, "y": 5},
+ {"label": "RIGHT", "x": 13.5, "y": 5},
+ ]
+ }
+ }
+}
diff --git a/keyboards/mntre/keymaps/default/keymap.c b/keyboards/mntre/keymaps/default/keymap.c
new file mode 100644
index 0000000000..4dcdebe31b
--- /dev/null
+++ b/keyboards/mntre/keymaps/default/keymap.c
@@ -0,0 +1,31 @@
+// Copyright 2021 Cedric Vincent (@cdc-mkb)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Base */
+ [_BASE] = 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, MO(_FN),
+ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLASH,
+ KC_LCTRL, KC_APP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER,
+ KC_LSHIFT, KC_DEL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_UP, KC_RSHIFT,
+ KC_RGUI, KC_LGUI, KC_RCTRL, KC_SPACE, KC_LALT, KC_RALT, KC_SPACE, KC_PGUP, KC_PGDOWN, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+
+ [_FN] = LAYOUT(
+ _______, BL_DEC, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+};
diff --git a/keyboards/mntre/keymaps/default/readme.md b/keyboards/mntre/keymaps/default/readme.md
new file mode 100644
index 0000000000..fecdb68ea4
--- /dev/null
+++ b/keyboards/mntre/keymaps/default/readme.md
@@ -0,0 +1,19 @@
+# Default layout of MNT Reform USB Keyboard (Standalone)
+
+This is exactly the same layout as in the original firmware.
+Backlight level can be decreased and increased using Fn+F1 and Fn+F2
+respectively.
+
+ ┏━━━━━━┯━━━━━━┯━━━━━━┯━━━━━━┯━━━━━━┯━━━━━━┯━━━━━━┯━━━━━━┯━━━━━━┯━━━━━━┯━━━━━━┯━━━━━━┯━━━━━━┯━━━━━━━━━━┓
+ ┃ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ Fn ┃
+ ┠──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────────┨
+ ┃ `~ │ 1! │ 2@ │ 3# │ 4$ │ 5% │ 6^ │ 7& │ 8* │ 9( │ 0) │ -_ │ =+ │ Backspace┃
+ ┠──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──────┨
+ ┃ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [{ │ ]} │ \| ┃
+ ┠──────┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──────┨
+ ┃ LCtrl│ App │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ;: │ '" │ Enter ┃
+ ┠──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──────┨
+ ┃ LShift │ Del │ Z │ X │ C │ V │ B │ N │ M │ ,< │ .> │ /? │ Up │RShift┃
+ ┠──────────┼──────┴──┬───┴──────┼──────┴──┬───┴──┬───┴──┬───┴──────┼──────┼──────┼──────┼──────┼──────┨
+ ┃ RGUI │ LGUI │ RCtrl │ Space │ LAlt │ RAlt │ Space │ PgUp │ PgDn │ Left │ Down │ Right┃
+ ┗━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━┷━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━┷━━━━━━┷━━━━━━┷━━━━━━┷━━━━━━┛
diff --git a/keyboards/mntre/mntre.c b/keyboards/mntre/mntre.c
new file mode 100644
index 0000000000..c21070b23b
--- /dev/null
+++ b/keyboards/mntre/mntre.c
@@ -0,0 +1,19 @@
+// Copyright 2021 Cedric Vincent (@cdc-mkb)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "mntre.h"
+
+#ifdef OLED_ENABLE
+bool oled_task_kb(void) {
+ if (!oled_task_user()) { return false; }
+
+ static const char PROGMEM qmk_logo[] = {
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
+ 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
+ 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
+ };
+
+ oled_write_P(qmk_logo, false);
+ return true;
+}
+#endif
diff --git a/keyboards/mntre/mntre.h b/keyboards/mntre/mntre.h
new file mode 100644
index 0000000000..8a48114423
--- /dev/null
+++ b/keyboards/mntre/mntre.h
@@ -0,0 +1,30 @@
+// Copyright 2021 Cedric Vincent (@cdc-mkb)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "quantum.h"
+
+/* This is a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
+ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, \
+ k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d }, \
+ { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, KC_NO, KC_NO } \
+}
diff --git a/keyboards/mntre/readme.md b/keyboards/mntre/readme.md
new file mode 100644
index 0000000000..4c827aeb25
--- /dev/null
+++ b/keyboards/mntre/readme.md
@@ -0,0 +1,27 @@
+# MNT Reform USB Keyboard (Standalone)
+
+![MNT Reform USB Keyboard (Standalone)](https://shop.mntmn.com/spree/products/117/large/reform-standalone-black-full.jpg)
+
+A compact and slim mechanical keyboard designed for comfort and portability.
+
+* Keyboard QMK port Maintainer: [cdc-mkb](https://github.com/cdc-mkb)
+* Hardware Supported: MNT Reform USB Keyboard (Standalone)
+* Hardware Availability: https://shop.mntmn.com/products/mnt-reform-usb-keyboard-standalone
+
+Make example for this keyboard (after setting up your build environment):
+
+ make mntre:default
+
+Flashing example for this keyboard:
+
+ make mntre:default:flash
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+
+## Bootloader
+
+Enter the bootloader in 3 ways:
+
+* **Bootmagic reset**: Hold down the "Esc" key and plug in the keyboard
+* **Keycode in layout**: Press the key mapped to `RESET` if it is available (default: "Circle" + "R")
+* **Physical reset button**: Remove the keyboard’s frame and toggle the programming DIP switch SW84 on the keyboard to “ON”. Then press the reset button SW83.
diff --git a/keyboards/mntre/rules.mk b/keyboards/mntre/rules.mk
new file mode 100644
index 0000000000..0159e4da7e
--- /dev/null
+++ b/keyboards/mntre/rules.mk
@@ -0,0 +1,21 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = no # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Enable N-Key Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+AUDIO_ENABLE = no # Audio output
+OLED_ENABLE = yes
+BACKLIGHT_DRIVER = pwm
+