Add MutePad keyboard (Handwired) (#16590)
* Add MutePad keyboard * Update info.json and readme * Move mutepad to handwired folder * Address PR comments
This commit is contained in:
		
							parent
							
								
									2f095b8925
								
							
						
					
					
						commit
						6125f7bf4d
					
				
					 8 changed files with 224 additions and 0 deletions
				
			
		
							
								
								
									
										90
									
								
								keyboards/handwired/mutepad/config.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										90
									
								
								keyboards/handwired/mutepad/config.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,90 @@
 | 
				
			||||||
 | 
					// Copyright 2022 JoshwJB (@JoshwJB)
 | 
				
			||||||
 | 
					// 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 0x0000
 | 
				
			||||||
 | 
					#define DEVICE_VER 0x0001
 | 
				
			||||||
 | 
					#define MANUFACTURER JoshwJB
 | 
				
			||||||
 | 
					#define PRODUCT MutePad
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* key matrix size */
 | 
				
			||||||
 | 
					#define MATRIX_ROWS 1
 | 
				
			||||||
 | 
					#define MATRIX_COLS 4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * 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 \
 | 
				
			||||||
 | 
					    { F6 }
 | 
				
			||||||
 | 
					#define MATRIX_COL_PINS \
 | 
				
			||||||
 | 
					    { B1, B3, B2, B6 }
 | 
				
			||||||
 | 
					#define UNUSED_PINS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* encoder support */
 | 
				
			||||||
 | 
					#define ENCODERS_PAD_A \
 | 
				
			||||||
 | 
					    { F4 }
 | 
				
			||||||
 | 
					#define ENCODERS_PAD_B \
 | 
				
			||||||
 | 
					    { F5 }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define ENCODER_RESOLUTION 2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define TAP_CODE_DELAY 10
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* COL2ROW, ROW2COL */
 | 
				
			||||||
 | 
					#define DIODE_DIRECTION COL2ROW
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
 | 
				
			||||||
 | 
					#define DEBOUNCE 5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* 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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * 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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Bootmagic Lite key configuration */
 | 
				
			||||||
 | 
					#define BOOTMAGIC_LITE_ROW 0
 | 
				
			||||||
 | 
					#define BOOTMAGIC_LITE_COLUMN 0
 | 
				
			||||||
							
								
								
									
										15
									
								
								keyboards/handwired/mutepad/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								keyboards/handwired/mutepad/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,15 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    "keyboard_name": "MutePad",
 | 
				
			||||||
 | 
					    "url": "https://github.com/JoshwJB/MutePad",
 | 
				
			||||||
 | 
					    "maintainer": "JoshwJB",
 | 
				
			||||||
 | 
					    "layouts": {
 | 
				
			||||||
 | 
					        "LAYOUT": {
 | 
				
			||||||
 | 
					            "layout": [
 | 
				
			||||||
 | 
					                {"label": "k00", "x": 0, "y": 0},
 | 
				
			||||||
 | 
					                {"label": "k01", "x": 1, "y": 0},
 | 
				
			||||||
 | 
					                {"label": "k02", "x": 2, "y": 0},
 | 
				
			||||||
 | 
					                {"label": "k03", "x": 3, "y": 0},
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										43
									
								
								keyboards/handwired/mutepad/keymaps/default/keymap.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								keyboards/handwired/mutepad/keymaps/default/keymap.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,43 @@
 | 
				
			||||||
 | 
					// Copyright 2022 Joshua Barber (@JoshwJB)
 | 
				
			||||||
 | 
					// 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 };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					enum custom_keycodes { MUTE_GOOGLE_MEET = 0, MUTE_TEAMS = 1 };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
				
			||||||
 | 
					    switch (keycode) {
 | 
				
			||||||
 | 
					        case MUTE_GOOGLE_MEET:
 | 
				
			||||||
 | 
					            if (record->event.pressed) {
 | 
				
			||||||
 | 
					                tap_code16(G(KC_D));
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					        case MUTE_TEAMS:
 | 
				
			||||||
 | 
					            if (record->event.pressed) {
 | 
				
			||||||
 | 
					                tap_code16(C(S(KC_M)));
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return true;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
				
			||||||
 | 
					    /* Base */
 | 
				
			||||||
 | 
					    [_BASE] = LAYOUT(MUTE_TEAMS, KC_F23, KC_F24, KC_MPLY)};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef ENCODER_ENABLE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool encoder_update_user(uint8_t index, bool clockwise) {
 | 
				
			||||||
 | 
					    if (clockwise) {
 | 
				
			||||||
 | 
					        tap_code(KC_VOLU);
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					        tap_code(KC_VOLD);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    return true;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
							
								
								
									
										1
									
								
								keyboards/handwired/mutepad/keymaps/default/readme.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								keyboards/handwired/mutepad/keymaps/default/readme.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					# The default keymap for MutePad
 | 
				
			||||||
							
								
								
									
										4
									
								
								keyboards/handwired/mutepad/mutepad.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								keyboards/handwired/mutepad/mutepad.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,4 @@
 | 
				
			||||||
 | 
					// Copyright 2022 JoshwJB (@JoshwJB)
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0-or-later
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "mutepad.h"
 | 
				
			||||||
							
								
								
									
										19
									
								
								keyboards/handwired/mutepad/mutepad.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								keyboards/handwired/mutepad/mutepad.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					// Copyright 2022 JoshwJB (@JoshwJB)
 | 
				
			||||||
 | 
					// 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) \
 | 
				
			||||||
 | 
					    {                              \
 | 
				
			||||||
 | 
					        { K00, K01, K02, K03 }     \
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
							
								
								
									
										33
									
								
								keyboards/handwired/mutepad/readme.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								keyboards/handwired/mutepad/readme.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,33 @@
 | 
				
			||||||
 | 
					# MutePad
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[MutePad Repo](https://github.com/JoshwJB/MutePad)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					A 3D printed under desk mounted keypad with rotary encoder, for muting applications (discord, zoom etc.) and adjusting volume.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Keyboard Maintainer: [JoshwJB](https://github.com/JoshwJB)
 | 
				
			||||||
 | 
					* Hardware Supported: ProMicro
 | 
				
			||||||
 | 
					* Hardware Availability: Handwired - see [MutePad Repo](https://github.com/JoshwJB/MutePad)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Make example for this keyboard (after setting up your build environment):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    make handwired/mutepad:default
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Flashing example for this keyboard:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    make handwired/mutepad: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 2 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**: Briefly short the ground and reset on the ProMicro
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Images
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Wiring
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										19
									
								
								keyboards/handwired/mutepad/rules.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								keyboards/handwired/mutepad/rules.mk
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					# MCU name
 | 
				
			||||||
 | 
					MCU = atmega32u4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Bootloader selection
 | 
				
			||||||
 | 
					BOOTLOADER = caterina
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Build Options
 | 
				
			||||||
 | 
					#   change yes to no to disable
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					BOOTMAGIC_ENABLE = yes      # Enable Bootmagic Lite
 | 
				
			||||||
 | 
					MOUSEKEY_ENABLE = yes       # 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 = yes           # Enable N-Key Rollover
 | 
				
			||||||
 | 
					BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
 | 
				
			||||||
 | 
					RGBLIGHT_ENABLE = no        # Enable keyboard RGB underglow
 | 
				
			||||||
 | 
					AUDIO_ENABLE = no           # Audio output
 | 
				
			||||||
 | 
					ENCODER_ENABLE = yes
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue