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

Add H50 keyboard from huytbt #18752

Merged
merged 4 commits into from
Oct 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
31 changes: 31 additions & 0 deletions keyboards/huytbt/h50/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
Copyright 2022 huytbt <[email protected]>
SPDX-License-Identifier: GPL-2.0-or-later
*/

#pragma once

#include "config_common.h"

/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 14

/*
* Keyboard Matrix Assignments
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
*/
#define MATRIX_ROW_PINS { D1, D0, D4, C6 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D7, E6, B4, B5, D2, D3 }

#define LED_CAPS_LOCK_PIN D5

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

/* define if matrix has ghost */
// #define MATRIX_HAS_GHOST

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
6 changes: 6 additions & 0 deletions keyboards/huytbt/h50/h50.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
Copyright 2022 huytbt <[email protected]>
SPDX-License-Identifier: GPL-2.0-or-later
*/

#include "h50.h"
24 changes: 24 additions & 0 deletions keyboards/huytbt/h50/h50.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2022 huytbt <[email protected]>
SPDX-License-Identifier: GPL-2.0-or-later
*/

#pragma once

#include "quantum.h"

#define XXX KC_NO

/* h50 keymap definition macro
*/
#define LAYOUT( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \
k30, k31, k32, k33, k35, k37, k39, k3A, k3B, k3C, k3D \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \
{ k30, k31, k32, k33, XXX, k35, XXX, k37, XXX, k39, k3A, k3B, k3C, k3D } \
huytbt marked this conversation as resolved.
Show resolved Hide resolved
}
72 changes: 72 additions & 0 deletions keyboards/huytbt/h50/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"keyboard_name": "H50",
"url": "https://github.com/huytbt/h50-keyboard",
"maintainer": "huytbt",
"usb": {
"vid": "0x4859",
"pid": "0x0002",
"device_version": "0.0.1"
},
"layouts": {
"LAYOUT": {
"layout": [
{ "label": "Tab", "x": 0, "y": 0 },
{ "label": "Q", "x": 1, "y": 0 },
{ "label": "W", "x": 2, "y": 0 },
{ "label": "E", "x": 3, "y": 0 },
{ "label": "R", "x": 4, "y": 0 },
{ "label": "T", "x": 5, "y": 0 },
{ "label": "Y", "x": 6, "y": 0 },
{ "label": "U", "x": 7, "y": 0 },
{ "label": "I", "x": 8, "y": 0 },
{ "label": "O", "x": 9, "y": 0 },
{ "label": "P", "x": 10, "y": 0 },
{ "label": "[", "x": 11, "y": 0 },
{ "label": "]", "x": 12, "y": 0 },
{ "label": "Back<br>Space", "x": 13, "y": 0 },

{ "label": "Caps", "x": 0, "y": 1, "w": 1.25 },
{ "label": "A", "x": 1.25, "y": 1 },
{ "label": "S", "x": 2.25, "y": 1 },
{ "label": "D", "x": 3.25, "y": 1 },
{ "label": "F", "x": 4.25, "y": 1 },
{ "label": "G", "x": 5.25, "y": 1 },
{ "label": "H", "x": 6.25, "y": 1 },
{ "label": "J", "x": 7.25, "y": 1 },
{ "label": "K", "x": 8.25, "y": 1 },
{ "label": "L", "x": 9.25, "y": 1 },
{ "label": ";", "x": 10.25, "y": 1 },
{ "label": "'", "x": 11.25, "y": 1 },
{ "label": "Enter", "x": 12.25, "y": 1, "w": 1.75 },
{ "label": "PGUP", "x": 14, "y": 1 },

{ "label": "Shift", "x": 0, "y": 2, "w": 1.75 },
{ "label": "Z", "x": 1.75, "y": 2 },
{ "label": "X", "x": 2.75, "y": 2 },
{ "label": "C", "x": 3.75, "y": 2 },
{ "label": "V", "x": 4.75, "y": 2 },
{ "label": "B", "x": 5.75, "y": 2 },
{ "label": "N", "x": 6.75, "y": 2 },
{ "label": "M", "x": 7.75, "y": 2 },
{ "label": ",", "x": 8.75, "y": 2 },
{ "label": ".", "x": 9.75, "y": 2 },
{ "label": "/", "x": 10.75, "y": 2 },
{ "label": "Shift", "x": 11.75, "y": 2, "w": 1.25 },
{ "label": "Up", "x": 13, "y": 2 },
{ "label": "PGDN", "x": 14, "y": 2 },

{ "label": "Ctrl", "x": 0, "y": 3, "w": 1.25 },
{ "label": "Alt", "x": 1.25, "y": 3, "w": 1.25 },
{ "label": "Super", "x": 2.5, "y": 3, "w": 1.25 },
{ "x": 3.75, "y": 3, "w": 1.75 },
{ "x": 5.5, "y": 3, "w": 1.75 },
{ "label": "Fn1", "x": 7.25, "y": 3, "w": 1.75 },
{ "label": "Fn2", "x": 9, "y": 3, "w": 1.25 },
{ "label": "Fn3", "x": 10.25, "y": 3, "w": 1.25 },
{ "label": "Left", "x": 12, "y": 3 },
{ "label": "Down", "x": 13, "y": 3 },
{ "label": "Right", "x": 14, "y": 3 }
]
}
}
}
40 changes: 40 additions & 0 deletions keyboards/huytbt/h50/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
Copyright 2022 huytbt <[email protected]>
SPDX-License-Identifier: GPL-2.0-or-later
*/

#include QMK_KEYBOARD_H

/* this keymap is to provide a basic keyboard layout for testing the matrix
* for more practical and complicated keymap refer to other keymaps in the same folder
*/

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), MO(2), MO(3), KC_LEFT, KC_DOWN, KC_RGHT
),

[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_MINS, KC_EQL, KC_BSLS,
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_HOME,
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_END,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),

[2] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
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_HOME,
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_END,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),

[3] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, 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,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};
40 changes: 40 additions & 0 deletions keyboards/huytbt/h50/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
Copyright 2022 huytbt <[email protected]>
SPDX-License-Identifier: GPL-2.0-or-later
*/

#include QMK_KEYBOARD_H

/* this keymap is to provide a basic keyboard layout for testing the matrix
* for more practical and complicated keymap refer to other keymaps in the same folder
*/

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), MO(2), MO(3), KC_LEFT, KC_DOWN, KC_RGHT
),

[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_MINS, KC_EQL, KC_BSLS,
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_HOME,
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_END,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),

[2] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
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_HOME,
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_END,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),

[3] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, 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,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};
4 changes: 4 additions & 0 deletions keyboards/huytbt/h50/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
VIA_ENABLE = yes
LTO_ENABLE = yes

CONSOLE_ENABLE = no
huytbt marked this conversation as resolved.
Show resolved Hide resolved
19 changes: 19 additions & 0 deletions keyboards/huytbt/h50/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# H50

![h50](https://i.imgur.com/1dB2mfM.jpeg)

The H50 is a mini keyboard with a 50 percent layout. The keyboard consists of 53 keys.

* Keyboard Maintainer: [huytbt](https://github.com/huytbt)
* Hardware Supported: Handwired
* Hardware Availability: You can follow the build guide here <https://github.com/huytbt/h50-keyboard>

Make example for this keyboard (after setting up your build environment):

make huytbt/h50:default

Flashing example for this keyboard:

make huytbt/h50: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).
17 changes: 17 additions & 0 deletions keyboards/huytbt/h50/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# MCU name
MCU = atmega32u4

# Bootloader selection
BOOTLOADER = atmel-dfu

# 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 = yes # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
huytbt marked this conversation as resolved.
Show resolved Hide resolved
NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Disable keyboard backlight functionality
MIDI_ENABLE = no # MIDI support