From 6809f154c9b8a405444c1a32839e7e3687ddb8e2 Mon Sep 17 00:00:00 2001 From: Cao Thai Duong <57068549+KD-MM2@users.noreply.github.com> Date: Mon, 26 Sep 2022 14:42:04 +0900 Subject: [Keyboard] Add Handwired 87 keys (#17682) Co-authored-by: Drashna Jaelre Co-authored-by: Joel Challis --- keyboards/handwired/hwpm87/config.h | 29 ++++++ keyboards/handwired/hwpm87/hwpm87.c | 4 + keyboards/handwired/hwpm87/hwpm87.h | 24 +++++ keyboards/handwired/hwpm87/info.json | 105 +++++++++++++++++++++ .../handwired/hwpm87/keymaps/default/keymap.c | 26 +++++ keyboards/handwired/hwpm87/readme.md | 35 +++++++ keyboards/handwired/hwpm87/rules.mk | 20 ++++ 7 files changed, 243 insertions(+) create mode 100644 keyboards/handwired/hwpm87/config.h create mode 100644 keyboards/handwired/hwpm87/hwpm87.c create mode 100644 keyboards/handwired/hwpm87/hwpm87.h create mode 100644 keyboards/handwired/hwpm87/info.json create mode 100644 keyboards/handwired/hwpm87/keymaps/default/keymap.c create mode 100644 keyboards/handwired/hwpm87/readme.md create mode 100644 keyboards/handwired/hwpm87/rules.mk (limited to 'keyboards') diff --git a/keyboards/handwired/hwpm87/config.h b/keyboards/handwired/hwpm87/config.h new file mode 100644 index 0000000000..60ef15ab44 --- /dev/null +++ b/keyboards/handwired/hwpm87/config.h @@ -0,0 +1,29 @@ +// Copyright 2022 CAO THAI DUONG (@KD-MM2) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "config_common.h" + + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +/* + * 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 DIODE_DIRECTION ROW2COL + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } +#define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B7, F0, F1, D6, C7, B6, F7, F6, F5, F4 } + +#define LED_CAPS_LOCK_PIN D5 +#define LED_PIN_ON_STATE 0 diff --git a/keyboards/handwired/hwpm87/hwpm87.c b/keyboards/handwired/hwpm87/hwpm87.c new file mode 100644 index 0000000000..9edc09c971 --- /dev/null +++ b/keyboards/handwired/hwpm87/hwpm87.c @@ -0,0 +1,4 @@ +// Copyright 2022 CAO THAI DUONG (@KD-MM2) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "hwpm87.h" diff --git a/keyboards/handwired/hwpm87/hwpm87.h b/keyboards/handwired/hwpm87/hwpm87.h new file mode 100644 index 0000000000..7de32eaa8c --- /dev/null +++ b/keyboards/handwired/hwpm87/hwpm87.h @@ -0,0 +1,24 @@ +// Copyright 2022 CAO THAI DUONG (@KD-MM2) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT( \ + K00, K02, K03, K04, K05, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, K1G, K1H, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4G, \ + K50, K51, K53, K56, K5A, K5B, K5D, K5E, K5F, K5G, K5H \ +) { \ + { K00, XXX, K02, K03, K04, K05, XXX, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F, K1G, K1H }, \ + { K20, XXX, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, XXX, XXX, XXX, XXX }, \ + { XXX, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, XXX, XXX, K4G, XXX }, \ + { K50, K51, XXX, K53, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, XXX, K5D, K5E, K5F, K5G, K5H }, \ +} diff --git a/keyboards/handwired/hwpm87/info.json b/keyboards/handwired/hwpm87/info.json new file mode 100644 index 0000000000..90d8ad397c --- /dev/null +++ b/keyboards/handwired/hwpm87/info.json @@ -0,0 +1,105 @@ +{ + "manufacturer": "KD-MM2", + "keyboard_name": "hwpm87", + "maintainer": "KD-MM2", + "url": "", + "usb": { + "vid": "0xFEED", + "pid": "0x0001", + "device_version": "0.0.1" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "K00 (B0,D3)", "x": 0, "y": 0 }, + { "label": "K02 (B0,D1)", "x": 2, "y": 0 }, + { "label": "K03 (B0,D0)", "x": 3, "y": 0 }, + { "label": "K04 (B0,D4)", "x": 4, "y": 0 }, + { "label": "K05 (B0,C6)", "x": 5, "y": 0 }, + { "label": "K07 (B0,E6)", "x": 6.5, "y": 0 }, + { "label": "K08 (B0,B7)", "x": 7.5, "y": 0 }, + { "label": "K09 (B0,F0)", "x": 8.5, "y": 0 }, + { "label": "K0A (B0,F1)", "x": 9.5, "y": 0 }, + { "label": "K0B (B0,D5)", "x": 11, "y": 0 }, + { "label": "K0C (B0,D6)", "x": 12, "y": 0 }, + { "label": "K0D (B0,C7)", "x": 13, "y": 0 }, + { "label": "K0E (B0,E2)", "x": 14, "y": 0 }, + { "label": "K0F (B0,B6)", "x": 15.25, "y": 0 }, + { "label": "K0G (B0,F7)", "x": 16.25, "y": 0 }, + { "label": "K0H (B0,F6)", "x": 17.25, "y": 0 }, + { "label": "K10 (B1,D3)", "x": 0, "y": 1 }, + { "label": "K11 (B1,D2)", "x": 1, "y": 1 }, + { "label": "K12 (B1,D1)", "x": 2, "y": 1 }, + { "label": "K13 (B1,D0)", "x": 3, "y": 1 }, + { "label": "K14 (B1,D4)", "x": 4, "y": 1 }, + { "label": "K15 (B1,C6)", "x": 5, "y": 1 }, + { "label": "K16 (B1,D7)", "x": 6, "y": 1 }, + { "label": "K17 (B1,E6)", "x": 7, "y": 1 }, + { "label": "K18 (B1,B7)", "x": 8, "y": 1 }, + { "label": "K19 (B1,F0)", "x": 9, "y": 1 }, + { "label": "K1A (B1,F1)", "x": 10, "y": 1 }, + { "label": "K1B (B1,D5)", "x": 11, "y": 1 }, + { "label": "K1C (B1,D6)", "x": 12, "y": 1 }, + { "label": "K1E (B1,E2)", "x": 13, "y": 1, "w": 2 }, + { "label": "K1F (B1,B6)", "x": 15.25, "y": 1 }, + { "label": "K1G (B1,F7)", "x": 16.25, "y": 1 }, + { "label": "K1H (B1,F6)", "x": 17.25, "y": 1 }, + { "label": "K20 (B2,D3)", "x": 0, "y": 2, "w": 1.5 }, + { "label": "K22 (B2,D1)", "x": 1.5, "y": 2 }, + { "label": "K23 (B2,D0)", "x": 2.5, "y": 2 }, + { "label": "K24 (B2,D4)", "x": 3.5, "y": 2 }, + { "label": "K25 (B2,C6)", "x": 4.5, "y": 2 }, + { "label": "K26 (B2,D7)", "x": 5.5, "y": 2 }, + { "label": "K27 (B2,E6)", "x": 6.5, "y": 2 }, + { "label": "K28 (B2,B7)", "x": 7.5, "y": 2 }, + { "label": "K29 (B2,F0)", "x": 8.5, "y": 2 }, + { "label": "K2A (B2,F1)", "x": 9.5, "y": 2 }, + { "label": "K2B (B2,D5)", "x": 10.5, "y": 2 }, + { "label": "K2C (B2,D6)", "x": 11.5, "y": 2 }, + { "label": "K2D (B2,C7)", "x": 12.5, "y": 2 }, + { "label": "K2E (B2,E2)", "x": 13.5, "y": 2, "w": 1.5 }, + { "label": "K2F (B2,B6)", "x": 15.25, "y": 2 }, + { "label": "K2G (B2,F7)", "x": 16.25, "y": 2 }, + { "label": "K2H (B2,F6)", "x": 17.25, "y": 2 }, + { "label": "K30 (B3,D3)", "x": 0, "y": 3, "w": 1.75 }, + { "label": "K32 (B3,D1)", "x": 1.75, "y": 3 }, + { "label": "K33 (B3,D0)", "x": 2.75, "y": 3 }, + { "label": "K34 (B3,D4)", "x": 3.75, "y": 3 }, + { "label": "K35 (B3,C6)", "x": 4.75, "y": 3 }, + { "label": "K36 (B3,D7)", "x": 5.75, "y": 3 }, + { "label": "K37 (B3,E6)", "x": 6.75, "y": 3 }, + { "label": "K38 (B3,B7)", "x": 7.75, "y": 3 }, + { "label": "K39 (B3,F0)", "x": 8.75, "y": 3 }, + { "label": "K3A (B3,F1)", "x": 9.75, "y": 3 }, + { "label": "K3B (B3,D5)", "x": 10.75, "y": 3 }, + { "label": "K3C (B3,D6)", "x": 11.75, "y": 3 }, + { "label": "K3D (B3,C7)", "x": 12.75, "y": 3, "w": 2.25 }, + { "label": "K41 (B4,D2)", "x": 0, "y": 4, "w": 2.25 }, + { "label": "K42 (B4,D1)", "x": 2.25, "y": 4 }, + { "label": "K43 (B4,D0)", "x": 3.25, "y": 4 }, + { "label": "K44 (B4,D4)", "x": 4.25, "y": 4 }, + { "label": "K45 (B4,C6)", "x": 5.25, "y": 4 }, + { "label": "K46 (B4,D7)", "x": 6.25, "y": 4 }, + { "label": "K47 (B4,E6)", "x": 7.25, "y": 4 }, + { "label": "K48 (B4,B7)", "x": 8.25, "y": 4 }, + { "label": "K49 (B4,F0)", "x": 9.25, "y": 4 }, + { "label": "K4A (B4,F1)", "x": 10.25, "y": 4 }, + { "label": "K4B (B4,D5)", "x": 11.25, "y": 4 }, + { "label": "K4D (B4,C7)", "x": 12.25, "y": 4, "w": 2.75 }, + { "label": "K4G (B4,F7)", "x": 16.25, "y": 4 }, + { "label": "K50 (B5,D3)", "x": 0, "y": 5, "w": 1.25 }, + { "label": "K51 (B5,D2)", "x": 1.25, "y": 5, "w": 1.25 }, + { "label": "K53 (B5,D0)", "x": 2.5, "y": 5, "w": 1.25 }, + { "label": "K56 (B5,D7)", "x": 3.75, "y": 5, "w": 6.25 }, + { "label": "K5A (B5,F1)", "x": 10, "y": 5, "w": 1.25 }, + { "label": "K5B (B5,D5)", "x": 11.25, "y": 5, "w": 1.25 }, + { "label": "K5D (B5,C7)", "x": 12.5, "y": 5, "w": 1.25 }, + { "label": "K5E (B5,E2)", "x": 13.75, "y": 5, "w": 1.25 }, + { "label": "K5F (B5,B6)", "x": 15.25, "y": 5 }, + { "label": "K5G (B5,F7)", "x": 16.25, "y": 5 }, + { "label": "K5H (B5,F6)", "x": 17.25, "y": 5 } + ] + } + } + +} diff --git a/keyboards/handwired/hwpm87/keymaps/default/keymap.c b/keyboards/handwired/hwpm87/keymaps/default/keymap.c new file mode 100644 index 0000000000..850acd2025 --- /dev/null +++ b/keyboards/handwired/hwpm87/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +// Copyright 2022 CAO THAI DUONG (@KD-MM2) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( /* BASE Layer */ + 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_SLCK, KC_PAUS, + 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_INS, KC_HOME, KC_PGUP, + 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_DEL, KC_END, KC_PGDN, + 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( /* MO(Fn) Layer */ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_LNG2, KC_LNG1, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ) + +}; diff --git a/keyboards/handwired/hwpm87/readme.md b/keyboards/handwired/hwpm87/readme.md new file mode 100644 index 0000000000..f0f4b3db2e --- /dev/null +++ b/keyboards/handwired/hwpm87/readme.md @@ -0,0 +1,35 @@ +# Handwired 87 keys + +![hwpm87](https://i.imgur.com/DLqdtAWh.jpeg) + +Repaired from 87 keys keyboard using a Pro Micro + +* Keyboard Maintainer: [KD-MM2](https://github.com/KD-MM2) +* Hardware Supported: Pro Micro(need to solder more pins) or any board with ATMega32u4 +* Hardware Availability: N/A (private board, might open source) + +First, if you have Pro Micro + Checkout these image for more: ![Pin map](https://i.imgur.com/SvZ9rGQ.jpeg) ![Usabled Pins](https://i.imgur.com/Nr4cWP5.jpeg) + Keymaps/Handwiring: ![Handwiring](https://i.imgur.com/G1izHd6.png) +If you have 25 GPIOs board, there is nothing to do. + +Second, if you are using a Capslock LED, define LED pin in: [config.h#34](https://github.com/KD-MM2/qmk_firmware/blob/hwpm87/keyboards/hwpm87/config.h#L34), +and check the LED_PIN_ON_STATE if you get reversed led state: [config.h#35](https://github.com/KD-MM2/qmk_firmware/blob/hwpm87/keyboards/hwpm87/config.h#L35) + +Make example for this keyboard (after setting up your build environment): + + make handwired/hwpm87:default + +Flashing example for this keyboard: + + make handwired/hwpm87: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 (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Plug cable, open QMK Toolbox and short RST pin and GND pin, then you will see it in flashmode +* **Keycode in layout**: Press the key mapped to `RESET` if it is available diff --git a/keyboards/handwired/hwpm87/rules.mk b/keyboards/handwired/hwpm87/rules.mk new file mode 100644 index 0000000000..7f42dae592 --- /dev/null +++ b/keyboards/handwired/hwpm87/rules.mk @@ -0,0 +1,20 @@ +# 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 = yes # 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + + -- cgit v1.2.3