diff --git a/keyboards/misterdeck/config.h b/keyboards/misterdeck/config.h new file mode 100644 index 0000000000..2780b7c689 --- /dev/null +++ b/keyboards/misterdeck/config.h @@ -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 } diff --git a/keyboards/misterdeck/info.json b/keyboards/misterdeck/info.json new file mode 100644 index 0000000000..523abd9bd3 --- /dev/null +++ b/keyboards/misterdeck/info.json @@ -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" + ] + ] +} diff --git a/keyboards/misterdeck/keymaps/via/keymap.c b/keyboards/misterdeck/keymaps/via/keymap.c new file mode 100644 index 0000000000..100afc3935 --- /dev/null +++ b/keyboards/misterdeck/keymaps/via/keymap.c @@ -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; +} diff --git a/keyboards/misterdeck/keymaps/via/rules.mk b/keyboards/misterdeck/keymaps/via/rules.mk new file mode 100644 index 0000000000..79b8374ce5 --- /dev/null +++ b/keyboards/misterdeck/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes diff --git a/keyboards/misterdeck/keymaps/via/vial.json b/keyboards/misterdeck/keymaps/via/vial.json new file mode 100644 index 0000000000..1f62a30954 --- /dev/null +++ b/keyboards/misterdeck/keymaps/via/vial.json @@ -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" + ] + ] + } +} diff --git a/keyboards/misterdeck/misterdeck.c b/keyboards/misterdeck/misterdeck.c new file mode 100644 index 0000000000..b3aca2f0ea --- /dev/null +++ b/keyboards/misterdeck/misterdeck.c @@ -0,0 +1 @@ +#include "misterdeck.h" diff --git a/keyboards/misterdeck/misterdeck.h b/keyboards/misterdeck/misterdeck.h new file mode 100644 index 0000000000..aae45b7f8e --- /dev/null +++ b/keyboards/misterdeck/misterdeck.h @@ -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 diff --git a/keyboards/misterdeck/readme.md b/keyboards/misterdeck/readme.md new file mode 100644 index 0000000000..ff08fb2da1 --- /dev/null +++ b/keyboards/misterdeck/readme.md @@ -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 diff --git a/keyboards/misterdeck/rules.mk b/keyboards/misterdeck/rules.mk new file mode 100644 index 0000000000..7a0120fddf --- /dev/null +++ b/keyboards/misterdeck/rules.mk @@ -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