initial support for MisteRDeck macropad
This commit is contained in:
parent
3b9c66731b
commit
9deda2f68f
36
keyboards/misterdeck/config.h
Normal file
36
keyboards/misterdeck/config.h
Normal file
@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xEEEE
|
||||
#define PRODUCT_ID 0x2019
|
||||
#define DEVICE_VER 0x0002
|
||||
#define MANUFACTURER Michael Weber
|
||||
#define PRODUCT MisteRDeck
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 3
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { B4, E6, D7 }
|
||||
#define MATRIX_COL_PINS { C6, D4, D0, D1 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define TAPPING_TOGGLE 2
|
||||
|
||||
#define RGB_DI_PIN B5
|
||||
#define RGBLED_NUM 16
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_LAYERS
|
||||
// #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
#define VIAL_KEYBOARD_UID {0x2B, 0x5F, 0xA7, 0x6F, 0x0B, 0xF9, 0xC8, 0xC0}
|
||||
#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 }
|
||||
#define VIAL_UNLOCK_COMBO_COLS { 0, 3 }
|
47
keyboards/misterdeck/info.json
Normal file
47
keyboards/misterdeck/info.json
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"keyboard_name": "misterdeck",
|
||||
"keyboard": "misterdeck",
|
||||
"url": "https://github.com/michaelw/vial-qmk",
|
||||
"maintainer": "michaelw",
|
||||
"width": 3,
|
||||
"height": 4,
|
||||
"keymap": "default",
|
||||
"layouts": {
|
||||
"LAYOUT_horizontal": {
|
||||
"key_count": 12,
|
||||
"layout": [
|
||||
{ "x": 0, "y": 0 }, { "x": 1, "y": 0 }, { "x": 2, "y": 0 }, { "x": 3, "y": 0 },
|
||||
{ "x": 0, "y": 1 }, { "x": 1, "y": 1 }, { "x": 2, "y": 1 }, { "x": 3, "y": 1 },
|
||||
{ "x": 0, "y": 2 }, { "x": 1, "y": 2 }, { "x": 2, "y": 2 }, { "x": 3, "y": 2 }
|
||||
]
|
||||
},
|
||||
"LAYOUT_vertical_right": {
|
||||
"key_count": 12,
|
||||
"layout": [
|
||||
{ "x": 0, "y": 0 }, { "x": 1, "y": 0 }, { "x": 2, "y": 0 },
|
||||
{ "x": 0, "y": 1 }, { "x": 1, "y": 1 }, { "x": 2, "y": 1 },
|
||||
{ "x": 0, "y": 2 }, { "x": 1, "y": 2 }, { "x": 2, "y": 2 },
|
||||
{ "x": 0, "y": 3 }, { "x": 1, "y": 3 }, { "x": 2, "y": 3 }
|
||||
]
|
||||
},
|
||||
"LAYOUT_vertical_left": {
|
||||
"key_count": 12,
|
||||
"layout": [
|
||||
{ "x": 0, "y": 0 }, { "x": 1, "y": 0 }, { "x": 2, "y": 0 },
|
||||
{ "x": 0, "y": 1 }, { "x": 1, "y": 1 }, { "x": 2, "y": 1 },
|
||||
{ "x": 0, "y": 2 }, { "x": 1, "y": 2 }, { "x": 2, "y": 2 },
|
||||
{ "x": 0, "y": 3 }, { "x": 1, "y": 3 }, { "x": 2, "y": 3 }
|
||||
]
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
[
|
||||
"KC_F13",
|
||||
"KC_F14",
|
||||
"KC_F15",
|
||||
"KC_F16",
|
||||
"KC_F17",
|
||||
"KC_F18"
|
||||
]
|
||||
]
|
||||
}
|
71
keyboards/misterdeck/keymaps/via/keymap.c
Normal file
71
keyboards/misterdeck/keymaps/via/keymap.c
Normal file
@ -0,0 +1,71 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "quantum.h"
|
||||
|
||||
#define _______ KC_TRNS
|
||||
#define NUMPAD TO(_NUMPAD)
|
||||
enum layers {
|
||||
_NUMPAD = 0,
|
||||
_FUNC2,
|
||||
_MOUSE,
|
||||
_CTRL,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_NUMPAD] = LAYOUT(
|
||||
KC_P7, KC_P8, KC_P9, LT(_CTRL,KC_P0),
|
||||
KC_P4, KC_P5, KC_P6, TT(_MOUSE),
|
||||
KC_P1, KC_P2, KC_P3, TT(_FUNC2)
|
||||
),
|
||||
|
||||
[_FUNC2] = LAYOUT(
|
||||
KC_F17, KC_F18, KC_F19, NUMPAD,
|
||||
KC_F14, KC_F15, KC_F16, _______,
|
||||
KC_F11, KC_F12, KC_F13, _______
|
||||
),
|
||||
|
||||
[_MOUSE] = LAYOUT(
|
||||
_______, _______, KC_WH_D, NUMPAD,
|
||||
_______, _______, KC_BTN1, _______,
|
||||
_______, _______, KC_WH_U, _______
|
||||
),
|
||||
|
||||
[_CTRL] = LAYOUT(
|
||||
KC_MUTE, RGB_TOG, _______, _______,
|
||||
KC_VOLU, RGB_RMOD, _______, _______,
|
||||
KC_VOLD, RGB_MOD, _______, _______
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
static const rgblight_segment_t PROGMEM mrd_numpad_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 4, HSV_GREEN}
|
||||
);
|
||||
static const rgblight_segment_t PROGMEM mrd_mouse_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{4, 4, HSV_YELLOW}
|
||||
);
|
||||
static const rgblight_segment_t PROGMEM mrd_ctrl_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{8, 4, HSV_PURPLE}
|
||||
);
|
||||
static const rgblight_segment_t PROGMEM mrd_func2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{12, 4, HSV_BLUE}
|
||||
);
|
||||
|
||||
// Now define the array of layers. Later layers take precedence
|
||||
static const rgblight_segment_t* const PROGMEM mrd_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||
mrd_numpad_layer,
|
||||
mrd_func2_layer,
|
||||
mrd_mouse_layer,
|
||||
mrd_ctrl_layer
|
||||
);
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Enable the LED layers
|
||||
rgblight_layers = mrd_rgb_layers;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
rgblight_set_layer_state(1, layer_state_cmp(state, _FUNC2));
|
||||
rgblight_set_layer_state(2, layer_state_cmp(state, _MOUSE));
|
||||
rgblight_set_layer_state(3, layer_state_cmp(state, _CTRL));
|
||||
return state;
|
||||
}
|
2
keyboards/misterdeck/keymaps/via/rules.mk
Normal file
2
keyboards/misterdeck/keymaps/via/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
VIA_ENABLE = yes
|
||||
VIAL_ENABLE = yes
|
32
keyboards/misterdeck/keymaps/via/vial.json
Normal file
32
keyboards/misterdeck/keymaps/via/vial.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "MisteRDeck",
|
||||
"vendorId": "0xEEEE",
|
||||
"productId": "0x2019",
|
||||
"lighting": "none",
|
||||
"matrix": {
|
||||
"rows": 3,
|
||||
"cols": 4
|
||||
},
|
||||
"layouts": {
|
||||
"keymap": [
|
||||
[
|
||||
"0,0",
|
||||
"0,1",
|
||||
"0,2",
|
||||
"0,3"
|
||||
],
|
||||
[
|
||||
"1,0",
|
||||
"1,1",
|
||||
"1,2",
|
||||
"1,3"
|
||||
],
|
||||
[
|
||||
"2,0",
|
||||
"2,1",
|
||||
"2,2",
|
||||
"2,3"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
1
keyboards/misterdeck/misterdeck.c
Normal file
1
keyboards/misterdeck/misterdeck.c
Normal file
@ -0,0 +1 @@
|
||||
#include "misterdeck.h"
|
10
keyboards/misterdeck/misterdeck.h
Normal file
10
keyboards/misterdeck/misterdeck.h
Normal file
@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT_h( K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11 ) \
|
||||
{ { K00, K01, K02, K03 }, \
|
||||
{ K04, K05, K06, K07 }, \
|
||||
{ K08, K09, K10, K11 } \
|
||||
}
|
||||
#define LAYOUT LAYOUT_h
|
27
keyboards/misterdeck/readme.md
Normal file
27
keyboards/misterdeck/readme.md
Normal file
@ -0,0 +1,27 @@
|
||||
# misterdeck
|
||||
┌───┬───┬───┬───┐
|
||||
│K00│K01│K02│K03|
|
||||
├───┼───┼───┼───┤
|
||||
│K04│K05│K06│K07|
|
||||
├───┼───┼───┼───┤
|
||||
│K08│K09│K10│K11|
|
||||
└───┴───┴───┴───┘
|
||||
|
||||
A 12-key mechanical keypad: https://www.thingiverse.com/thing:4627779
|
||||
|
||||
Keyboard Maintainer: [michaelw](https://github.com/michaelw)
|
||||
|
||||
## Build
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make misterdeck:via
|
||||
|
||||
Only vial support for now.
|
||||
|
||||
|
||||
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).
|
||||
|
||||
## TODO
|
||||
|
||||
* support for 4 analog sliders
|
||||
* mixed MIDI mode
|
31
keyboards/misterdeck/rules.mk
Normal file
31
keyboards/misterdeck/rules.mk
Normal file
@ -0,0 +1,31 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
LTO_ENABLE = yes
|
||||
|
||||
BOOTMAGIC_ENABLE = lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
Loading…
Reference in New Issue
Block a user