forked from mirrors/qmk_firmware
[Keyboard] Add GTM Pad macropad (#7123)
* initial commit begin development of Grand Theft Macro Pad (2key2crawl clone) * Minor Changes Changes to readme.md Changes to config.h matrix pins Changes to gtm.h layout Changes to rules.mk * initial commit begin development of Grand Theft Macro Pad (2key2crawl clone) * Minor Changes Changes to readme.md Changes to config.h matrix pins Changes to gtm.h layout Changes to rules.mk * Update keyboards/sck/gtm/readme.md Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update keyboards/sck/gtm/readme.md Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark <fauxpark@gmail.com> * Changes to gtm.h Changes to layout to be correct for matrix_cols and matrix_col_pins * Minor Changes Removed rotary encoder index in keymaps per suggestion
This commit is contained in:
parent
9160405d39
commit
4da9d2ef6f
8 changed files with 171 additions and 0 deletions
44
keyboards/sck/gtm/config.h
Normal file
44
keyboards/sck/gtm/config.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6090
|
||||
#define DEVICE_VER 0x0002
|
||||
#define MANUFACTURER SpaceCityKeyboards
|
||||
#define PRODUCT GTM Pad
|
||||
#define DESCRIPTION Grand Theft Macro Pad
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 3
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { C4, C5, D1 }
|
||||
#define MATRIX_COL_PINS { B4, B5, B6, B7, C7, D0 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
|
||||
#define ENCODERS_PAD_A { D2 }
|
||||
#define ENCODERS_PAD_B { D3 }
|
||||
#define ENCODER_RESOLUTION 1
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Set 0 if debouncing isn't 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
|
||||
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGB_DI_PIN B0
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 4
|
||||
#endif
|
1
keyboards/sck/gtm/gtm.c
Normal file
1
keyboards/sck/gtm/gtm.c
Normal file
|
@ -0,0 +1 @@
|
|||
#include "gtm.h"
|
12
keyboards/sck/gtm/gtm.h
Normal file
12
keyboards/sck/gtm/gtm.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K00, K01, K02, K03, K04, \
|
||||
K10, K11, K12, K13, K14, K25 \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, KC_NO }, \
|
||||
{ K10, K11, K12, K13, K14, KC_NO }, \
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K25 }, \
|
||||
}
|
24
keyboards/sck/gtm/keymaps/default/keymap.c
Normal file
24
keyboards/sck/gtm/keymaps/default/keymap.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
LAYOUT(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5,
|
||||
KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER),
|
||||
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
debug_config.matrix = 1;
|
||||
debug_config.keyboard = 1;
|
||||
debug_config.enable = 1;
|
||||
}
|
||||
|
||||
void encoder_update_user(int8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGUP);
|
||||
} else {
|
||||
tap_code(KC_PGDN);
|
||||
}
|
||||
}
|
||||
|
24
keyboards/sck/gtm/keymaps/tabs/keymap.c
Normal file
24
keyboards/sck/gtm/keymaps/tabs/keymap.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
LAYOUT(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5,
|
||||
KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER),
|
||||
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
debug_config.matrix = 1;
|
||||
debug_config.keyboard = 1;
|
||||
debug_config.enable = 1;
|
||||
}
|
||||
|
||||
void encoder_update_user(int8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code16(C(KC_T));
|
||||
} else {
|
||||
tap_code16(C(KC_W));
|
||||
}
|
||||
}
|
||||
|
23
keyboards/sck/gtm/keymaps/vol/keymap.c
Normal file
23
keyboards/sck/gtm/keymaps/vol/keymap.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
LAYOUT(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5,
|
||||
KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER),
|
||||
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
debug_config.matrix = 1;
|
||||
debug_config.keyboard = 1;
|
||||
debug_config.enable = 1;
|
||||
}
|
||||
|
||||
void encoder_update_user(int8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
16
keyboards/sck/gtm/readme.md
Normal file
16
keyboards/sck/gtm/readme.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Grand Theft Macro Pad
|
||||
|
||||
![Grand Theft Macropad](https://i.imgur.com/ON7m7RI.jpg)
|
||||
|
||||
A 2x5 macropad/numpad with a rotary encoder, cloned from the 2Key2Crawl macropad that was exclusively available at Austin Keycrawl 2018 (12-01-2018).
|
||||
|
||||
Keyboard Maintainer: jrfhoutx
|
||||
Keyboard Designer: [jrfhoutx](https://github.com/jrfhoutx)
|
||||
Hardware Supported: GTM Pad
|
||||
Hardware Availability: Coming Soon
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make sck/gtm:default
|
||||
|
||||
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).
|
27
keyboards/sck/gtm/rules.mk
Normal file
27
keyboards/sck/gtm/rules.mk
Normal file
|
@ -0,0 +1,27 @@
|
|||
# MCU name
|
||||
MCU = atmega32u2
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # [Crawlpad] Custom backlighting code is used, so this should not be enabled
|
||||
AUDIO_ENABLE = no # [Crawlpad] This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below
|
||||
RGBLIGHT_ENABLE = yes # [Crawlpad] This can be enabled if a ws2812 strip is connected to the expansion port.
|
||||
ENCODER_ENABLE = yes # [2Key2crawl] Make the knobs turn
|
Loading…
Reference in a new issue