Browse Source

Merge remote-tracking branch 'origin/master' into develop

QMK Bot 9 months ago
parent
commit
5d26dcefa0

+ 11 - 0
keyboards/mectechpad/config.h

@@ -0,0 +1,11 @@
+// Copyright 2025 Jack Sachinidhs (@jacksaxi)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+/* LED pin definitions */
+#define LED_PIN_LAYER_0 GP12
+#define LED_PIN_LAYER_1 GP11
+#define LED_PIN_LAYER_2 GP10
+#define LED_PIN_LAYER_3 GP9
+
+/* matrix mask for direct pin switch */
+#define MATRIX_MASKED

+ 40 - 0
keyboards/mectechpad/keyboard.json

@@ -0,0 +1,40 @@
+{
+    "manufacturer": "Printronics",
+    "keyboard_name": "Mectechpad",
+    "maintainer": "jacksaxi",
+    "bootloader": "rp2040",
+    "debounce": 15,
+    "diode_direction": "ROW2COL",
+    "features": {
+        "bootmagic": true,
+        "extrakey": true,
+        "mousekey": true
+    },
+    "matrix_pins": {
+        "rows": ["GP13", "GP26", "GP15", "GP14"],
+        "cols": ["GP29", "GP28", "GP27"]
+    },
+    "processor": "RP2040",
+    "url": "printronics.gr",
+    "usb": {
+        "device_version": "1.0.0",
+        "pid": "0x1A2B",
+        "vid": "0x3C4D"
+    },
+    "layouts": {
+        "LAYOUT": {
+            "layout": [
+                {"matrix": [0, 0], "x": 0, "y": 0},
+                {"matrix": [1, 0], "x": 0, "y": 1}, 
+                {"matrix": [1, 1], "x": 1, "y": 1}, 
+                {"matrix": [1, 2], "x": 2, "y": 1},  
+                {"matrix": [2, 0], "x": 0, "y": 2}, 
+                {"matrix": [2, 1], "x": 1, "y": 2}, 
+                {"matrix": [2, 2], "x": 2, "y": 2},  
+                {"matrix": [3, 0], "x": 0, "y": 3}, 
+                {"matrix": [3, 1], "x": 1, "y": 3}, 
+                {"matrix": [3, 2], "x": 2, "y": 3}
+            ]
+        }
+    }
+}

+ 37 - 0
keyboards/mectechpad/keymaps/default/keymap.c

@@ -0,0 +1,37 @@
+// Copyright 2025 Jack Sachinidhs (@jacksaxi)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#include QMK_KEYBOARD_H
+
+enum layers {
+    _LAYER0,
+    _LAYER1,
+    _LAYER2,
+    _LAYER3
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    [_LAYER0] = LAYOUT(
+        TO(_LAYER1),
+        KC_1, KC_2, KC_3,
+        KC_4, KC_5, KC_6,
+        KC_7, KC_8, KC_9
+    ),
+    [_LAYER1] = LAYOUT(
+        TO(_LAYER2),
+        KC_Q, KC_W, KC_E,
+        KC_R, KC_T, KC_Y,
+        KC_U, KC_I, KC_O
+    ),
+    [_LAYER2] = LAYOUT(
+        TO(_LAYER3),
+        KC_A, KC_S, KC_D,
+        KC_F, KC_G, KC_H,
+        KC_J, KC_K, KC_L
+    ),
+    [_LAYER3] = LAYOUT(
+        TO(_LAYER0),
+        KC_Z, KC_X, KC_C,
+        KC_V, KC_B, KC_N,
+        KC_M, KC_COMM, KC_DOT
+    )
+};

+ 25 - 0
keyboards/mectechpad/mectechpad.c

@@ -0,0 +1,25 @@
+// Copyright 2025 Jack Sachinidhs (@jacksaxi)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#include "quantum.h"
+
+void keyboard_post_init_kb(void) {
+    // Initialize LED pins
+    gpio_set_pin_output(LED_PIN_LAYER_0);
+    gpio_write_pin_low(LED_PIN_LAYER_0);
+    gpio_set_pin_output(LED_PIN_LAYER_1);
+    gpio_write_pin_low(LED_PIN_LAYER_1);
+    gpio_set_pin_output(LED_PIN_LAYER_2);
+    gpio_write_pin_low(LED_PIN_LAYER_2);
+    gpio_set_pin_output(LED_PIN_LAYER_3);
+    gpio_write_pin_low(LED_PIN_LAYER_3);
+
+    keyboard_post_init_user();
+}
+
+// Update LEDs based on the current layer
+void housekeeping_task_kb(void) {
+    gpio_write_pin(LED_PIN_LAYER_0, (get_highest_layer(layer_state) == 0));
+    gpio_write_pin(LED_PIN_LAYER_1, (get_highest_layer(layer_state) == 1));
+    gpio_write_pin(LED_PIN_LAYER_2, (get_highest_layer(layer_state) == 2));
+    gpio_write_pin(LED_PIN_LAYER_3, (get_highest_layer(layer_state) == 3));
+}

+ 25 - 0
keyboards/mectechpad/readme.md

@@ -0,0 +1,25 @@
+# Mectechpad
+
+![Mectechpad](https://i.imgur.com/fNnLVLf.jpeg)
+
+* Keyboard Maintainer: [Jack Sachinidhs](https://github.com/jacksaxi)
+* Hardware Supported: rp2040
+* Hardware Availability: [Printronics Website](https://printronics.gr)
+
+Make example for this keyboard (after setting up your build environment):
+
+    make mectechpad:default
+
+Flashing example for this keyboard:
+
+    make mectechpad: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 key at (0,0) in the matrix (the top left key) and plug in the keyboard
+* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available