Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Milk Truck board definition and Vial keymap #16

Open
wants to merge 2 commits into
base: vial
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions keyboards/milk_truck/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#pragma once

#include "config_common.h"

#define VENDOR_ID 0x646D // dm
#define PRODUCT_ID 0x4D54 // MT
#define DEVICE_VER 0x0001
#define MANUFACTURER drmmr
#define PRODUCT Milk Truck

#define MATRIX_ROWS 4
#define MATRIX_COLS 15

#define MATRIX_ROW_PINS { F1, C7, C6, B6 }
#define MATRIX_COL_PINS { F4, F5, F6, B3, B2, B1, B0, B5, B4, D7, D5, D3, D2, D1, D0 }
#define UNUSED_PINS
#define DIODE_DIRECTION COL2ROW

#define DEBOUNCE 5

#define LOCKING_SUPPORT_ENABLE
#define LOCKING_RESYNC_ENABLE

#define RGB_DI_PIN F0
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 3
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
12 changes: 12 additions & 0 deletions keyboards/milk_truck/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"keyboard_name": "milk_truck",
"url": "",
"maintainer": "rjboone",
"width": 16.75,
"height": 4,
"layouts": {
"LAYOUT": {
"layout": [{"label":"7", "x":0, "y":0}, {"label":"8", "x":1, "y":0}, {"label":"9", "x":2, "y":0}, {"label":"Esc", "x":4, "y":0}, {"label":"Q", "x":5, "y":0}, {"label":"W", "x":6, "y":0}, {"label":"E", "x":7, "y":0}, {"label":"R", "x":8, "y":0}, {"label":"T", "x":9, "y":0}, {"label":"Y", "x":10, "y":0}, {"label":"U", "x":11, "y":0}, {"label":"I", "x":12, "y":0}, {"label":"O", "x":13, "y":0}, {"label":"P", "x":14, "y":0}, {"label":"Backspace", "x":15, "y":0, "w":1.75}, {"label":"4", "x":0, "y":1}, {"label":"5", "x":1, "y":1}, {"label":"6", "x":2, "y":1}, {"label":"Tab", "x":4, "y":1, "w":1.25}, {"label":"A", "x":5.25, "y":1}, {"label":"S", "x":6.25, "y":1}, {"label":"D", "x":7.25, "y":1}, {"label":"F", "x":8.25, "y":1}, {"label":"G", "x":9.25, "y":1}, {"label":"H", "x":10.25, "y":1}, {"label":"J", "x":11.25, "y":1}, {"label":"K", "x":12.25, "y":1}, {"label":"L", "x":13.25, "y":1}, {"label":";", "x":14.25, "y":1}, {"label":"Enter", "x":15.25, "y":1, "w":1.5}, {"label":"1", "x":0, "y":2}, {"label":"2", "x":1, "y":2}, {"label":"3", "x":2, "y":2}, {"label":"Up", "x":3, "y":2}, {"label":"Shift", "x":4, "y":2, "w":1.75}, {"label":"Z", "x":5.75, "y":2}, {"label":"X", "x":6.75, "y":2}, {"label":"C", "x":7.75, "y":2}, {"label":"V", "x":8.75, "y":2}, {"label":"B", "x":9.75, "y":2}, {"label":"N", "x":10.75, "y":2}, {"label":"M", "x":11.75, "y":2}, {"label":",", "x":12.75, "y":2}, {"label":".", "x":13.75, "y":2}, {"label":"?", "x":14.75, "y":2}, {"label":"Fn", "x":15.75, "y":2}, {"label":"Enter", "x":0, "y":3}, {"label":"0", "x":1, "y":3}, {"label":"Left", "x":2, "y":3}, {"label":"Down", "x":3, "y":3}, {"label":"Right", "x":4, "y":3}, {"label":"Ctrl", "x":5.5, "y":3, "w":1.5}, {"label":"Alt", "x":7, "y":3}, {"x":8, "y":3, "w":2.25}, {"x":10.25, "y":3, "w":2}, {"label":"Alt", "x":12.25, "y":3}, {"label":"Fn", "x":13.25, "y":3, "w":1.25}, {"label":"Win", "x":14.5, "y":3}, {"label":"Ctrl", "x":15.5, "y":3, "w":1.25}]
}
}
}
31 changes: 31 additions & 0 deletions keyboards/milk_truck/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include QMK_KEYBOARD_H

enum layers{
_BASE,
_NUM_SYM,
_FKEY_RGB,
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
KC_P7, KC_P8, KC_P9, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_P4, KC_P5, KC_P6, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_P1, KC_P2, KC_P3, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_FKEY_RGB),
KC_PENT, KC_P0, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LCTL, KC_LALT, MO(_NUM_SYM), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_BSLS
),

[_NUM_SYM] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_MINS, KC_EQL, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_QUOT,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),

[_FKEY_RGB] = LAYOUT(
RGB_TOG, RGB_RMOD, RGB_MOD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};

24 changes: 24 additions & 0 deletions keyboards/milk_truck/keymaps/vial/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#define VIAL_KEYBOARD_UID {0x46, 0x9D, 0xA0, 0x72, 0xCC, 0x0C, 0x53, 0xEC}

#define VIAL_UNLOCK_COMBO_ROWS { 0, 1 }
#define VIAL_UNLOCK_COMBO_COLS { 0, 1 }

#define DYNAMIC_KEYMAP_LAYER_COUNT 4
#define LAYER_STATE_8BIT
// #define VIAL_COMBO_ENTRIES 8
// #define VIAL_TAP_DANCE_ENTRIES 8

/* WS2812 RGB LEDs */
#ifdef RGBLIGHT_ENABLE
#undef RGBLIGHT_ANIMATIONS
// #define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
#define RGBLIGHT_EFFECT_TWINKLE
#endif
31 changes: 31 additions & 0 deletions keyboards/milk_truck/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_P7, KC_P8, KC_P9, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_P4, KC_P5, KC_P6, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_P1, KC_P2, KC_P3, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(2),
KC_PENT, KC_P0, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LCTL, KC_LALT, MO(1), KC_SPC, MO(3) , KC_RGUI, KC_RCTL, KC_BSLS
),

[1] = LAYOUT(
_______, _______, _______, KC_GRV, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______,
_______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_MINS, KC_EQL, KC_RBRC, _______, _______, _______, KC_QUOT,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),

[2] = LAYOUT(
RGB_TOG, RGB_RMOD,RGB_MOD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[3] = LAYOUT(
RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};

5 changes: 5 additions & 0 deletions keyboards/milk_truck/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes
LTO_ENABLE = yes

VIAL_INSECURE = yes
15 changes: 15 additions & 0 deletions keyboards/milk_truck/keymaps/vial/vial.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Milk Truck",
"vendorId": "0x646D",
"productId": "0x4D54",
"lighting": "qmk_rgblight",
"matrix": {"rows": 4, "cols": 15},
"layouts": {
"keymap": [
["0,0","0,1","0,2",{"x":1},"0,3","0,4","0,5","0,6","0,7","0,8","0,9","0,10","0,11","0,12","0,13",{"w":1.75},"0,14"],
["1,0","1,1","1,2",{"x":1,"w":1.25},"1,3","1,4","1,5","1,6","1,7","1,8","1,9","1,10","1,11","1,12","1,13",{"w":1.5},"1,14"],
["2,0","2,1","2,2","3,3",{"w":1.75},"2,3","2,4","2,5","2,6","2,7","2,8","2,9","2,10","2,11","2,12","2,13","2,14"],
["3,0","3,1","3,2","3,4","3,5",{"x":0.5,"w":1.5},"3,6","3,7",{"w":2.25},"3,8",{"w":2},"3,9","3,10",{"w":1.25},"3,11","3,12",{"w":1.25},"3,13"]
]
}
}
1 change: 1 addition & 0 deletions keyboards/milk_truck/milk_truck.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "milk_truck.h"
17 changes: 17 additions & 0 deletions keyboards/milk_truck/milk_truck.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once

#include "quantum.h"

#define XXX KC_NO

#define LAYOUT( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e, \
K20, K21, K22, K33, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, \
K30, K31, K32, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d }, \
}
3 changes: 3 additions & 0 deletions keyboards/milk_truck/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Milk Truck

TODO: Add alternate layouts in Vial
22 changes: 22 additions & 0 deletions keyboards/milk_truck/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# MCU name
MCU = atmega32u4

# Bootloader selection
BOOTLOADER = atmel-dfu

# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
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
# 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