NoPunIn10Did Kastenwagen touch-up (#15836)

This commit is contained in:
James Young
2022-01-12 14:08:37 -08:00
committed by GitHub
parent c4b0a06c79
commit ed15197967
15 changed files with 83 additions and 61 deletions

View File

@@ -2,9 +2,8 @@
"keyboard_name": "Kastenwagen 48",
"url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/nopunin10did/kastenwagen48",
"maintainer": "NoPunIn10Did",
"manufacturer": "NoPunIn10Did",
"layouts": {
"LAYOUT_48": {
"LAYOUT_all": {
"layout": [
{"x":0 , "y":0, "label":"Esc"},
{"x":1 , "y":0, "label":"Q"},

View File

@@ -18,7 +18,22 @@
#include "quantum.h"
#define LAYOUT_48( \
/*
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────┐ ┌───┐
* │100│101│110│111│120│121│130│131│140│141│150│151│160 │ │170│
* ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬─────┤ ├───┤
* │202 │203│212│213│222│223│232│233│242│243│252│253│262 │ │272│
* ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬──┘ ├───┤
* │304 │305│314│315│324│325│334│335│344│345│354│355 │┌───┐│374│
* ├────┬─┴──┬┴──┬┴───┴───┴─┬─┴───┴──┬┴──┬┴───┼───┴┬───┘│364│└───┘
* │406 │407 │416│417 │437 │446│447 │456 │┌───┼───┼───┐
* └────┴────┴───┴──────────┴────────┴───┴────┴────┘│457│467│476│
* ┌───────────────────────────┐ └───┴───┴───┘
* │417 │ 7u Space
* └───────────────────────────┘
*/
#define LAYOUT_all( \
K100 , K101 , K110 , K111 , K120 , K121 , K130 , K131 , K140 , K141 , K150 , K151 , K160 , K170 , \
K202 , K203 , K212 , K213 , K222 , K223 , K232 , K233 , K242 , K243 , K252 , K253 , K262 , K272 , \
K304 , K305 , K314 , K315 , K324 , K325 , K334 , K335 , K344 , K345 , K354 , K355 , K364 , K374 , \

View File

@@ -27,26 +27,26 @@ uint16_t alt_tab_timer = 0;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_48(
[0] = LAYOUT_all(
KC_ESC ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_LBRC,KC_BSPC , KC_DEL ,
KC_TAB ,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_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSPC ,KC_UP , KC_PGDN,
KC_LCTL ,KC_LALT ,MO(2) ,L2_SPC ,L3_SPC ,MO(3) ,RWINALT ,MO(1) ,KC_LEFT,KC_DOWN,KC_RGHT
),
[1] = LAYOUT_48(
[1] = LAYOUT_all(
RESET ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_RBRC,KC_DEL , KC_INS ,
KC_CAPS ,KC_F11 ,KC_F12 ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX , KC_HOME,
_______ ,XXXXXXX,XXXXXXX,KC_PSCR,KC_SLCK,KC_PAUS,KC_INS ,KC_APP ,KC_LGUI,KC_RGUI,XXXXXXX,_______ ,KC_PGUP,KC_END ,
KC_RCTL ,_______ ,_______,XXXXXXX ,XXXXXXX ,_______,_______ ,_______ ,KC_HOME,KC_PGDN,KC_END
),
[2] = LAYOUT_48(
[2] = LAYOUT_all(
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 , XXXXXXX,
KC_TILD ,KC_EXLM,KC_AT ,KC_HASH,KC_DLR ,KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_UNDS,KC_LBRC,KC_RBRC,KC_BSLS , XXXXXXX,
_______ ,ISO_LT ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______ ,XXXXXXX,XXXXXXX,
_______ ,_______ ,_______,XXXXXXX ,XXXXXXX ,_______,_______ ,_______ ,XXXXXXX,XXXXXXX,XXXXXXX
),
[3] = LAYOUT_48(
[3] = LAYOUT_all(
KC_TILD,KC_EXLM,KC_AT ,KC_HASH,KC_DLR ,KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_UNDS,KC_PLUS , XXXXXXX,
_______ ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_LCBR,KC_RCBR,KC_PIPE , XXXXXXX,
_______ ,ISO_GT ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______ ,XXXXXXX,XXXXXXX,

View File

@@ -0,0 +1,93 @@
/* Copyright 2022 W. Alex Ronke, a.k.a. NoPunIn10Did (w.alex.ronke@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#define L2_SPC LT(2,KC_SPC)
#define L3_SPC LT(3,KC_SPC)
#define RWINALT RALT_T(KC_RGUI)
#define ISO_LT KC_NUBS
#define ISO_GT LSFT(KC_NUBS)
bool is_alt_tab_active = false;
uint16_t alt_tab_timer = 0;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
KC_ESC ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_LBRC,KC_BSPC , KC_DEL ,
KC_TAB ,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_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSPC ,KC_UP , KC_PGDN,
KC_LCTL ,KC_LALT ,MO(2) ,L2_SPC ,L3_SPC ,MO(3) ,RWINALT ,MO(1) ,KC_LEFT,KC_DOWN,KC_RGHT
),
[1] = LAYOUT_all(
RESET ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_RBRC,KC_DEL , KC_INS ,
KC_CAPS ,KC_F11 ,KC_F12 ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX , KC_HOME,
_______ ,XXXXXXX,XXXXXXX,KC_PSCR,KC_SLCK,KC_PAUS,KC_INS ,KC_APP ,KC_LGUI,KC_RGUI,XXXXXXX,_______ ,KC_PGUP,KC_END ,
KC_RCTL ,_______ ,_______,XXXXXXX ,XXXXXXX ,_______,_______ ,_______ ,KC_HOME,KC_PGDN,KC_END
),
[2] = LAYOUT_all(
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 , XXXXXXX,
KC_TILD ,KC_EXLM,KC_AT ,KC_HASH,KC_DLR ,KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_UNDS,KC_LBRC,KC_RBRC,KC_BSLS , XXXXXXX,
_______ ,ISO_LT ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______ ,XXXXXXX,XXXXXXX,
_______ ,_______ ,_______,XXXXXXX ,XXXXXXX ,_______,_______ ,_______ ,XXXXXXX,XXXXXXX,XXXXXXX
),
[3] = LAYOUT_all(
KC_TILD,KC_EXLM,KC_AT ,KC_HASH,KC_DLR ,KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_UNDS,KC_PLUS , XXXXXXX,
_______ ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_LCBR,KC_RCBR,KC_PIPE , XXXXXXX,
_______ ,ISO_GT ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______ ,XXXXXXX,XXXXXXX,
_______ ,_______ ,_______,XXXXXXX ,XXXXXXX ,_______,_______ ,_______ ,XXXXXXX,XXXXXXX,XXXXXXX
)
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
}
else {
tap_code(KC_VOLD);
}
}
else if (index == 1) {
if (clockwise) {
if (!is_alt_tab_active) {
is_alt_tab_active = true;
register_code(KC_LALT);
}
alt_tab_timer = timer_read();
tap_code16(KC_TAB);
}
else {
alt_tab_timer = timer_read();
tap_code16(S(KC_TAB));
}
}
return false;
}
void matrix_scan_user(void) {
if (is_alt_tab_active) {
if (timer_elapsed(alt_tab_timer) > 1250) {
unregister_code(KC_LALT);
is_alt_tab_active = false;
}
}
}

View File

@@ -0,0 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes

View File

@@ -4,13 +4,9 @@
Kastenwagen 48 is a 40% keyboard with a macro column and dedicated arrows. The main alpha block is 13.75u long, allowing for more dedicated punctuation keys to be paired with common Minivan-like mod keys.
A second model of Kastenwagen, the [Kastenwagen 1840](https://github.com/qmk/qmk_firmware/tree/master/keyboards/nopunin10did/kastenwagen1840), is similar but replaces the macro column with a mini-numpad.
Please note that the Kastenwagen 1840 via-compatible keymap firmware is also compatible with the Kastenwagen 48. The Kastenwagen 48 does not have a dedicated via-compatible firmware.
For more information, join the [NoPunIn10Key Discord](https://discord.gg/sku2Y6w).
* Keyboard Maintainer: [Alex Ronke](diplomacyvariants.wordpress.com), also known as NoPunIn10Did.
* Keyboard Maintainer: [Alex Ronke](https://nopunin10did.com/), also known as [NoPunIn10Did](https://github.com/NoPunIn10Did)
* Hardware Supported: Kastenwagen 48 (2021 June)
* Hardware Availability: Currently by request only
@@ -18,11 +14,15 @@ To jump the bootloader, either:
* If loaded with the default layout, use Function-Escape *(the function button is the farthest righthand 1.25u on the bottom row)* **OR**
* Use the physical reset switch on the Elite C **OR**
* Briefly jump the Reset and Ground pins of the Elite C
Make example for the 48 model:
make nopunin10did/kastenwagen48:default48
Make example for this keyboard (after setting up your build environment):
make nopunin10did/kastenwagen48:default
Flashing example for this keyboard:
make nopunin10did/kastenwagen48: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).
![Kastenwagen Default Layouts](https://diplomacyvariants.files.wordpress.com/2022/01/kastenwagen-default-layouts.png)
![Kastenwagen Default Layouts](https://diplomacyvariants.files.wordpress.com/2022/01/kastenwagen-default-layouts.png)