Skip to content

Commit 6cdf230

Browse files
authored
[Keyboard] handwired/m40/5x5_macropad (qmk#16288)
* Adding the custom handwired 5x5 macropad. * Update keyboards/handwired/m40/5x5_macropad/readme.md * Update keyboards/handwired/m40/5x5_macropad/rules.mk * Update keyboards/handwired/m40/5x5_macropad/readme.md * Update readme.md fixed the github link to my profile * Update keyboards/handwired/m40/5x5_macropad/5x5_macropad.c * Update keyboards/handwired/m40/5x5_macropad/5x5_macropad.h * Update keyboards/handwired/m40/5x5_macropad/5x5_macropad.h * Update keyboards/handwired/m40/5x5_macropad/config.h * Update keyboards/handwired/m40/5x5_macropad/readme.md * Update keyboards/handwired/m40/5x5_macropad/config.h * Update keyboards/handwired/m40/5x5_macropad/readme.md * Update keyboards/handwired/m40/5x5_macropad/keymaps/default/keymap.c * Apply suggestions from code review * added discord Id for maintainer contact * Update keyboards/handwired/m40/5x5_macropad/readme.md * Update keyboards/handwired/m40/5x5_macropad/info.json
1 parent 9b24abf commit 6cdf230

File tree

8 files changed

+235
-0
lines changed

8 files changed

+235
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Copyright 2022 Tomek (@m40-dev)
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#include "5x5_macropad.h"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright 2022 Tomek (@m40-dev)
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#pragma once
5+
6+
#include "quantum.h"
7+
8+
/* This is a shortcut to help you visually see your layout.
9+
*
10+
* The first section contains all of the arguments representing the physical
11+
* layout of the board and position of the keys.
12+
*
13+
* The second converts the arguments into a two-dimensional array which
14+
* represents the switch matrix.
15+
*/
16+
#define LAYOUT_ortho_5x5( \
17+
K000, K001, K002, K003, K004, \
18+
K100, K101, K102, K103, K104, \
19+
K200, K201, K202, K203, K204, \
20+
K300, K301, K302, K303, K304, \
21+
K400, K401, K402, K403, K404 ) { \
22+
{ K000, K001, K002, K003, K004 }, \
23+
{ K100, K101, K102, K103, K104 }, \
24+
{ K200, K201, K202, K203, K204 }, \
25+
{ K300, K301, K302, K303, K304 }, \
26+
{ K400, K401, K402, K403, K404 } \
27+
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
// Copyright 2022 Tomek (@m40-dev)
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#pragma once
5+
6+
#include "config_common.h"
7+
8+
/* USB Device descriptor parameter */
9+
#define VENDOR_ID 0xFEED
10+
#define PRODUCT_ID 0x0000
11+
#define DEVICE_VER 0x0001
12+
#define MANUFACTURER m40
13+
#define PRODUCT macropad
14+
15+
/* key matrix size */
16+
#define MATRIX_ROWS 5
17+
#define MATRIX_COLS 5
18+
19+
/*
20+
* Keyboard Matrix Assignments
21+
*
22+
* Change this to how you wired your keyboard
23+
* COLS: AVR pins used for columns, left to right
24+
* ROWS: AVR pins used for rows, top to bottom
25+
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
26+
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
27+
*
28+
*/
29+
#define MATRIX_ROW_PINS { B5, B4, E6, D7, C6 }
30+
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7 }
31+
#define UNUSED_PINS
32+
33+
/* COL2ROW, ROW2COL */
34+
#define DIODE_DIRECTION COL2ROW
35+
36+
37+
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
38+
#define DEBOUNCE 5
39+
40+
/* define if matrix has ghost (lacks anti-ghosting diodes) */
41+
//#define MATRIX_HAS_GHOST
42+
43+
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
44+
#define LOCKING_SUPPORT_ENABLE
45+
/* Locking resynchronize hack */
46+
#define LOCKING_RESYNC_ENABLE
47+
48+
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
49+
* This is useful for the Windows task manager shortcut (ctrl+shift+esc).
50+
*/
51+
//#define GRAVE_ESC_CTRL_OVERRIDE
52+
53+
/*
54+
* Force NKRO
55+
*
56+
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
57+
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
58+
* makefile for this to work.)
59+
*
60+
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
61+
* until the next keyboard reset.
62+
*
63+
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
64+
* fully operational during normal computer usage.
65+
*
66+
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
67+
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
68+
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
69+
* power-up.
70+
*
71+
*/
72+
//#define FORCE_NKRO
73+
74+
/*
75+
* Feature disable options
76+
* These options are also useful to firmware size reduction.
77+
*/
78+
79+
/* disable debug print */
80+
//#define NO_DEBUG
81+
82+
/* disable print */
83+
//#define NO_PRINT
84+
85+
/* disable action features */
86+
//#define NO_ACTION_LAYER
87+
//#define NO_ACTION_TAPPING
88+
//#define NO_ACTION_ONESHOT
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"keyboard_name": "5x5_macropad",
3+
"url": "https://www.thingiverse.com/thing:5239739",
4+
"maintainer": "m40-dev",
5+
"layouts": {
6+
"LAYOUT_ortho_5x5": {
7+
"layout": [
8+
{"label":"K000", "x":0, "y":0},
9+
{"label":"K001", "x":1, "y":0},
10+
{"label":"K002", "x":2, "y":0},
11+
{"label":"K003", "x":3, "y":0},
12+
{"label":"K004", "x":4, "y":0},
13+
14+
{"label":"K100", "x":0, "y":1},
15+
{"label":"K101", "x":1, "y":1},
16+
{"label":"K102", "x":2, "y":1},
17+
{"label":"K103", "x":3, "y":1},
18+
{"label":"K104", "x":4, "y":1},
19+
20+
{"label":"K200", "x":0, "y":2},
21+
{"label":"K201", "x":1, "y":2},
22+
{"label":"K202", "x":2, "y":2},
23+
{"label":"K203", "x":3, "y":2},
24+
{"label":"K204", "x":4, "y":2},
25+
26+
{"label":"K300", "x":0, "y":3},
27+
{"label":"K301", "x":1, "y":3},
28+
{"label":"K302", "x":2, "y":3},
29+
{"label":"K303", "x":3, "y":3},
30+
{"label":"K304", "x":4, "y":3},
31+
32+
{"label":"K400", "x":0, "y":4},
33+
{"label":"K401", "x":1, "y":4},
34+
{"label":"K402", "x":2, "y":4},
35+
{"label":"K403", "x":3, "y":4},
36+
{"label":"K404", "x":4, "y":4}
37+
38+
]
39+
}
40+
}
41+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright 2022 Tomek (@m40-dev)
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#include QMK_KEYBOARD_H
5+
6+
// Defines names for use in layer keycodes and the keymap
7+
enum layer_names {
8+
_BASE,
9+
_FN
10+
};
11+
12+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
13+
/* Base */
14+
[_BASE] = LAYOUT_ortho_5x5(
15+
//┌────────┬────────┬────────┬────────┬────────┐
16+
KC_ESC, KC_1, KC_2, KC_3, RESET,
17+
//├────────┼────────┼────────┼────────┬────────┤
18+
KC_1, KC_2, KC_3, KC_4, KC_5,
19+
//├────────┼────────┼────────┼────────┼────────┤
20+
KC_1, KC_2, KC_3, KC_4, KC_5,
21+
//├────────┼────────┼────────┼────────┼────────┤
22+
KC_1, KC_2, KC_3, KC_4, KC_5,
23+
//├────────┼────────┼────────┼────────┼────────┤
24+
KC_1, KC_2, KC_3, KC_4, KC_5 )
25+
//└────────┴────────┴────────┴─────────────────┘
26+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# The default keymap for 5x5_macropad
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# 5x5_macropad
2+
3+
![m40](https://i.imgur.com/bWXH3FVl.jpeg)
4+
5+
This is very simple 5x5 macropad for general use. It does not come with any particular layout, it is assumed that layouts will be built on the qmk configurator site. Row and column pins start on the edge of Arduino, if smaller board is required, you can simply connect only first x row/column pairs to the board and get the size of the board you need.
6+
7+
* Keyboard Maintainer: [Tomek](https://github.com/m40-dev) (discord: m40#4792)
8+
* Hardware Supported: 3D Printed, handwired, using Arduino Pro-Micro (Atmega32U4) for controller
9+
* Hardware Availability: https://www.thingiverse.com/thing:5239739
10+
11+
Make example for this keyboard (after setting up your build environment):
12+
13+
make handwired/m40/5x5_macropad:default
14+
15+
Flashing example for this keyboard:
16+
17+
make handwired/m40/5x5_macropad:default:flash
18+
19+
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).
20+
21+
## Bootloader
22+
23+
Enter the bootloader in 2 ways:
24+
25+
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
26+
* **Keycode in layout**: Press the key mapped to `RESET` if it is available. In default layout (if you flashed it already once) it is the top-right button.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# MCU name
2+
MCU = atmega32u4
3+
4+
# Bootloader selection
5+
BOOTLOADER = caterina
6+
7+
# Build Options
8+
# change yes to no to disable
9+
#
10+
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
11+
MOUSEKEY_ENABLE = yes # Mouse keys
12+
EXTRAKEY_ENABLE = yes # Audio control and System control
13+
CONSOLE_ENABLE = no # Console for debug
14+
COMMAND_ENABLE = yes # Commands for debug and configuration
15+
NKRO_ENABLE = no # Enable N-Key Rollover
16+
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
17+
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
18+
AUDIO_ENABLE = no # Audio output
19+
20+
# Disable unsupported hardware
21+
AUDIO_SUPPORTED = no
22+
BACKLIGHT_SUPPORTED = no

0 commit comments

Comments
 (0)