Skip to content

Commit

Permalink
Added VT-40 keyboard (qmk#24706)
Browse files Browse the repository at this point in the history
* Added VT-40 keyboard

* Remove commented out code. Oops

Co-authored-by: jack <jack@pngu.org>

* Change name of planck_layers to layers.

Co-authored-by: jack <jack@pngu.org>

* Update keyboards/vt40/keymaps/default/keymap.c

Co-authored-by: jack <jack@pngu.org>

* Removed unused features that I stole from the contra config

* Removed unused features that I stole from the contra config

* fixed lower/raise keys

* make adjust layer accessible

* Added adjust key for real this time

* Update keyboards/vt40/keyboard.json

Co-authored-by: Duncan Sutherland <dunk2k_2000@hotmail.com>

---------

Co-authored-by: jack <jack@pngu.org>
Co-authored-by: Duncan Sutherland <dunk2k_2000@hotmail.com>
  • Loading branch information
3 people authored Dec 12, 2024
1 parent d283e27 commit d589dbb
Show file tree
Hide file tree
Showing 4 changed files with 260 additions and 0 deletions.
91 changes: 91 additions & 0 deletions keyboards/vt40/keyboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"manufacturer": "vladantrhlik",
"keyboard_name": "vt40",
"maintainer": "vladantrhlik",
"bootloader": "rp2040",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"encoder": true,
"extrakey": true,
"mousekey": true,
"nkro": true
},
"matrix_pins": {
"cols": ["GP6", "GP7", "GP8", "GP9", "GP10", "GP11", "GP12", "GP13", "GP21", "GP20", "GP19", "GP18", "GP22"],
"rows": ["GP2", "GP3", "GP4", "GP5"]
},
"encoder": {
"rotary": [
{"pin_a": "GP26", "pin_b": "GP16"},
{"pin_a": "GP27", "pin_b": "GP17"},
]
},
"processor": "RP2040",
"url": "https://github.com/vladantrhlik/VT-40",
"usb": {
"device_version": "1.0.0",
"pid": "0x0000",
"vid": "0xFEED"
},
"community_layouts": ["ortho_4x12"],
"layouts": {
"LAYOUT_ortho_4x12": {
"layout": [
{"label": "Tab", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "Q", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "W", "matrix": [0, 2], "x": 2, "y": 0},
{"label": "E", "matrix": [0, 3], "x": 3, "y": 0},
{"label": "R", "matrix": [0, 4], "x": 4, "y": 0},
{"label": "T", "matrix": [0, 5], "x": 5, "y": 0},
{"label": "Y", "matrix": [0, 6], "x": 6, "y": 0},
{"label": "U", "matrix": [0, 7], "x": 7, "y": 0},
{"label": "I", "matrix": [0, 8], "x": 8, "y": 0},
{"label": "O", "matrix": [0, 9], "x": 9, "y": 0},
{"label": "P", "matrix": [0, 10], "x": 10, "y": 0},
{"label": "BackSpace", "matrix": [0, 11], "x": 11, "y": 0},

{"label": "Esc", "matrix": [1, 0], "x": 0, "y": 1},
{"label": "A", "matrix": [1, 1], "x": 1, "y": 1},
{"label": "S", "matrix": [1, 2], "x": 2, "y": 1},
{"label": "D", "matrix": [1, 3], "x": 3, "y": 1},
{"label": "F", "matrix": [1, 4], "x": 4, "y": 1},
{"label": "G", "matrix": [1, 5], "x": 5, "y": 1},
{"label": "H", "matrix": [1, 6], "x": 6, "y": 1},
{"label": "J", "matrix": [1, 7], "x": 7, "y": 1},
{"label": "K", "matrix": [1, 8], "x": 8, "y": 1},
{"label": "L", "matrix": [1, 9], "x": 9, "y": 1},
{"label": ";", "matrix": [1, 10], "x": 10, "y": 1},
{"label": "'", "matrix": [1, 11], "x": 11, "y": 1},

{"label": "Shift", "matrix": [2, 0], "x": 0, "y": 2},
{"label": "Z", "matrix": [2, 1], "x": 1, "y": 2},
{"label": "X", "matrix": [2, 2], "x": 2, "y": 2},
{"label": "C", "matrix": [2, 3], "x": 3, "y": 2},
{"label": "V", "matrix": [2, 4], "x": 4, "y": 2},
{"label": "B", "matrix": [2, 5], "x": 5, "y": 2},
{"label": "N", "matrix": [2, 6], "x": 6, "y": 2},
{"label": "M", "matrix": [2, 7], "x": 7, "y": 2},
{"label": ",", "matrix": [2, 8], "x": 8, "y": 2},
{"label": ".", "matrix": [2, 9], "x": 9, "y": 2},
{"label": "/", "matrix": [2, 10], "x": 10, "y": 2},
{"label": "Return", "matrix": [2, 11], "x": 11, "y": 2},

{"matrix": [3, 0], "x": 0, "y": 3},
{"label": "Ctrl", "matrix": [3, 1], "x": 1, "y": 3},
{"label": "Alt", "matrix": [3, 2], "x": 2, "y": 3},
{"label": "Super", "matrix": [3, 3], "x": 3, "y": 3},
{"label": "&dArr;", "matrix": [3, 4], "x": 4, "y": 3},
{"matrix": [3, 5], "x": 5, "y": 3},
{"matrix": [3, 6], "x": 6, "y": 3},
{"label": "&uArr;", "matrix": [3, 7], "x": 7, "y": 3},
{"label": "&larr;", "matrix": [3, 8], "x": 8, "y": 3},
{"label": "&darr;", "matrix": [3, 9], "x": 9, "y": 3},
{"label": "&uarr;", "matrix": [3, 10], "x": 10, "y": 3},
{"label": "&rarr;", "matrix": [3, 11], "x": 11, "y": 3}
]
}
}
}
144 changes: 144 additions & 0 deletions keyboards/vt40/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
// Copyright 2023 QMK
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H


enum layers {
_QWERTY,
_COLEMAK,
_DVORAK,
_LOWER,
_RAISE,
_ADJUST
};

#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define ADJUST MO(_ADJUST)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Caps | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_ortho_4x12(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),

/* Colemak
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Caps | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = LAYOUT_ortho_4x12(
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),

/* Dvorak
* ,-----------------------------------------------------------------------------------.
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Caps | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_DVORAK] = LAYOUT_ortho_4x12(
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT ,
KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),

/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_ortho_4x12(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),

/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |ADJUST| | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_ortho_4x12(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
ADJUST, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),

/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_ortho_4x12(
_______, QK_BOOT, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
_______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)

};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) },
[2] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) },
[3] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) },
[4] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) },
[5] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }
};
#endif
1 change: 1 addition & 0 deletions keyboards/vt40/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes
24 changes: 24 additions & 0 deletions keyboards/vt40/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# VT-40

* Keyboard Maintainer: [Guido Bartolucci](https://github.com/guidoism)
* Hardware Supported: Raspberry Pi Pico (RP2040)
* Hardware Availability: https://github.com/vladantrhlik/VT-40

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

make vt40:default

Flashing example for this keyboard:

make vt40: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).

## Bootloader

Enter the bootloader in 3 ways:

* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available

0 comments on commit d589dbb

Please sign in to comment.