1
0
Fork 0
forked from forks/qmk_firmware

Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
QMK Bot 2022-11-30 19:21:17 +00:00
commit 12e4a36db7
6 changed files with 320 additions and 0 deletions

View file

@ -0,0 +1,24 @@
// Copyright 2022 Commander1024 (@Commander1024)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
/* configure bootmagic lite trigger to ESC */
#define BOOTMAGIC_LITE_ROW 5
#define BOOTMAGIC_LITE_COLUMN 16
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT

View file

@ -0,0 +1,19 @@
// Copyright 2022 Commander1024 (@Commander1024)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
// rotary encoder
#ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) {
return false;
}
// Volume control
if (clockwise) {
tap_code(KC_VOLD);
} else {
tap_code(KC_VOLU);
}
return true;
};
#endif

View file

@ -0,0 +1,158 @@
{
"manufacturer": "Metadot",
"keyboard_name": "daskeyboard4",
"maintainer": "Commander1024",
"url": "https://www.daskeyboard.com/de/daskeyboard-4-professional/",
"bootloader": "tinyuf2",
"bootloader_instructions": "Hold ESC while plugging USB in",
"diode_direction": "ROW2COL",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"encoder": true
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A2", "A4", "A5", "A6", "A7", "B0", "B1", "B10", "B9", "B7", "B6", "B5", "B4", "A8"],
"rows": ["A13", "A14", "A1", "A3", "B8", "B3", "A15", "B15"]
},
"board": "BLACKPILL_STM32_F411",
"processor": "STM32F411",
"usb": {
"device_version": "1.0.0",
"vid": "0xFEED",
"pid": "0x0140"
},
"indicators": {
"num_lock": "C13",
"caps_lock": "B14",
"scroll_lock": "B2",
"on_state": 1
},
"encoder": {
"rotary": [
{
"pin_a": "B13",
"pin_b": "B12",
"resolution": 4
}
]
},
"tapping": {
"toggle": 2
},
"layouts": {
"LAYOUT_fullsize_iso": {
"layout": [
{ "label":"Esc", "matrix": [5, 16], "x": 0, "y": 0 },
{ "label":"F1", "matrix": [2, 4], "x": 2, "y": 0 },
{ "label":"F2", "matrix": [2, 5], "x": 3, "y": 0 },
{ "label":"F3", "matrix": [3, 5], "x": 4, "y": 0 },
{ "label":"F4", "matrix": [5, 5], "x": 5, "y": 0 },
{ "label":"F5", "matrix": [0, 1], "x": 6.5, "y": 0 },
{ "label":"F6", "matrix": [5, 8], "x": 7.5, "y": 0 },
{ "label":"F7", "matrix": [3, 3], "x": 8.5, "y": 0 },
{ "label":"F8", "matrix": [2, 3], "x": 9.5, "y": 0 },
{ "label":"F9", "matrix": [2, 2], "x": 11, "y": 0 },
{ "label":"F10", "matrix": [0, 2], "x": 12, "y": 0 },
{ "label":"F11", "matrix": [5, 2], "x": 13, "y": 0 },
{ "label":"F12", "matrix": [6, 2], "x": 14, "y": 0 },
{ "label":"Prt Sc", "matrix": [0, 0], "x": 15.25, "y": 0 },
{ "label":"Scr Lk", "matrix": [1, 0], "x": 16.25, "y": 0 },
{ "label":"Pause", "matrix": [1, 1], "x": 17.25, "y": 0 },
{ "label":"`", "matrix": [2, 16], "x": 0, "y": 1.25 },
{ "label":"1", "matrix": [0, 16], "x": 1, "y": 1.25 },
{ "label":"2", "matrix": [0, 4], "x": 2, "y": 1.25 },
{ "label":"3", "matrix": [0, 5], "x": 3, "y": 1.25 },
{ "label":"4", "matrix": [0, 6], "x": 4, "y": 1.25 },
{ "label":"5", "matrix": [2, 6], "x": 5, "y": 1.25 },
{ "label":"6", "matrix": [2, 7], "x": 6, "y": 1.25 },
{ "label":"7", "matrix": [0, 7], "x": 7, "y": 1.25 },
{ "label":"8", "matrix": [0, 8], "x": 8, "y": 1.25 },
{ "label":"9", "matrix": [0, 3], "x": 9, "y": 1.25 },
{ "label":"0", "matrix": [0, 9], "x": 10, "y": 1.25 },
{ "label":"-", "matrix": [2, 9], "x": 11, "y": 1.25 },
{ "label":"=", "matrix": [2, 8], "x": 12, "y": 1.25 },
{ "label":"Backspace", "matrix": [3, 2], "w": 2, "x": 13, "y": 1.25 },
{ "label":"Ins", "matrix": [2, 11], "x": 15.25, "y": 1.25 },
{ "label":"Home", "matrix": [2, 15], "x": 16.25, "y": 1.25 },
{ "label":"Page Up", "matrix": [2, 14], "x": 17.25, "y": 1.25 },
{ "label":"Num Lk", "matrix": [4, 10], "x": 18.5, "y": 1.25 },
{ "label":"/", "matrix": [4, 11], "x": 19.5, "y": 1.25 },
{ "label":"*", "matrix": [4, 14], "x": 20.5, "y": 1.25 },
{ "label":"-", "matrix": [6, 14], "x": 21.5, "y": 1.25 },
{ "label":"Tab", "matrix": [3, 16], "w": 1.5, "x": 0, "y": 2.25 },
{ "label":"Q", "matrix": [1, 16], "x": 1.5, "y": 2.25 },
{ "label":"W", "matrix": [1, 4], "x": 2.5, "y": 2.25 },
{ "label":"E", "matrix": [1, 5], "x": 3.5, "y": 2.25 },
{ "label":"R", "matrix": [1, 6], "x": 4.5, "y": 2.25 },
{ "label":"T", "matrix": [3, 6], "x": 5.5, "y": 2.25 },
{ "label":"Y", "matrix": [3, 7], "x": 6.5, "y": 2.25 },
{ "label":"U", "matrix": [1, 7], "x": 7.5, "y": 2.25 },
{ "label":"I", "matrix": [1, 8], "x": 8.5, "y": 2.25 },
{ "label":"O", "matrix": [1, 3], "x": 9.5, "y": 2.25 },
{ "label":"P", "matrix": [1, 9], "x": 10.5, "y": 2.25 },
{ "label":"[", "matrix": [3, 9], "x": 11.5, "y": 2.25 },
{ "label":"]", "matrix": [3, 8], "x": 12.5, "y": 2.25 },
{ "label":"Del", "matrix": [2, 10], "x": 15.25, "y": 2.25 },
{ "label":"End", "matrix": [0, 15], "x": 16.25, "y": 2.25 },
{ "label":"Page Down", "matrix": [0, 14], "x": 17.25, "y": 2.25 },
{ "label":"7", "matrix": [1, 10], "x": 18.5, "y": 2.25 },
{ "label":"8", "matrix": [1, 11], "x": 19.5, "y": 2.25 },
{ "label":"9", "matrix": [1, 14], "x": 20.5, "y": 2.25 },
{ "label":"+", "h": 2, "matrix": [1, 15], "x": 21.5, "y": 2.25 },
{ "label":"Caps Lock", "matrix": [3, 4], "w": 1.75, "x": 0, "y": 3.25 },
{ "label":"A", "matrix": [7, 16], "x": 1.75, "y": 3.25 },
{ "label":"S", "matrix": [7, 4], "x": 2.75, "y": 3.25 },
{ "label":"D", "matrix": [7, 5], "x": 3.75, "y": 3.25 },
{ "label":"F", "matrix": [7, 6], "x": 4.75, "y": 3.25 },
{ "label":"G", "matrix": [5, 6], "x": 5.75, "y": 3.25 },
{ "label":"H", "matrix": [5, 7], "x": 6.75, "y": 3.25 },
{ "label":"J", "matrix": [7, 7], "x": 7.75, "y": 3.25 },
{ "label":"K", "matrix": [7, 8], "x": 8.75, "y": 3.25 },
{ "label":"L", "matrix": [7, 3], "x": 9.75, "y": 3.25 },
{ "label":";", "matrix": [7, 9], "x": 10.75, "y": 3.25 },
{ "label":"'", "matrix": [5, 9], "x": 11.75, "y": 3.25 },
{ "label":"#", "matrix": [1, 2], "x": 12.75, "y": 3.25 },
{ "label":"Return", "h": 2, "matrix": [4, 2], "w": 1.25, "x": 13.75, "y": 2.25 },
{ "label":"4", "matrix": [3, 10], "x": 18.5, "y": 3.25 },
{ "label":"5", "matrix": [3, 11], "x": 19.5, "y": 3.25 },
{ "label":"6", "matrix": [3, 14], "x": 20.5, "y": 3.25 },
{ "label":"Shift L", "matrix": [3, 13], "w": 1.25, "x": 0, "y": 4.25 },
{ "label":"\\", "matrix": [5, 4], "x": 1.25, "y": 4.25 },
{ "label":"Z", "matrix": [4, 16], "x": 2.25, "y": 4.25 },
{ "label":"X", "matrix": [4, 4], "x": 3.25, "y": 4.25 },
{ "label":"C", "matrix": [4, 5], "x": 4.25, "y": 4.25 },
{ "label":"V", "matrix": [4, 6], "x": 5.25, "y": 4.25 },
{ "label":"B", "matrix": [6, 6], "x": 6.25, "y": 4.25 },
{ "label":"N", "matrix": [6, 7], "x": 7.25, "y": 4.25 },
{ "label":"M", "matrix": [4, 7], "x": 8.25, "y": 4.25 },
{ "label":",", "matrix": [4, 8], "x": 9.25, "y": 4.25 },
{ "label":".", "matrix": [4, 3], "x": 10.25, "y": 4.25 },
{ "label":"/", "matrix": [6, 9], "x": 11.25, "y": 4.25 },
{ "label":"Shift R", "matrix": [7, 13], "w": 2.75, "x": 12.25, "y": 4.25 },
{ "label":"Up", "matrix": [5, 15], "x": 16.25, "y": 4.25 },
{ "label":"1", "matrix": [7, 10], "x": 18.5, "y": 4.25 },
{ "label":"2", "matrix": [7, 11], "x": 19.5, "y": 4.25 },
{ "label":"3", "matrix": [7, 14], "x": 20.5, "y": 4.25 },
{ "label":"Enter", "h": 2, "matrix": [7, 15], "x": 21.5, "y": 4.25 },
{ "label":"Control L", "matrix": [2, 1], "w": 1.25, "x": 0, "y": 5.25 },
{ "label":"Super L", "matrix": [3, 12], "w": 1.25, "x": 1.25, "y": 5.25 },
{ "label":"Alt L", "matrix": [5, 0], "w": 1.25, "x": 2.5, "y": 5.25 },
{ "label":" ", "matrix": [5, 10], "w": 6.25, "x": 3.75, "y": 5.25 },
{ "label":"Alt R", "matrix": [6, 0], "w": 1.25, "x": 10, "y": 5.25 },
{ "label":"Super R", "matrix": [7, 12], "w": 1.25, "x": 11.25, "y": 5.25 },
{ "label":"Menu", "matrix": [6, 3], "w": 1.25, "x": 12.5, "y": 5.25 },
{ "label":"Control R", "matrix": [4, 1], "w": 1.25, "x": 13.75, "y": 5.25 },
{ "label":"Left", "matrix": [6, 15], "x": 15.25, "y": 5.25 },
{ "label":"Down", "matrix": [6, 10], "x": 16.25, "y": 5.25 },
{ "label":"Right", "matrix": [6, 11], "x": 17.25, "y": 5.25 },
{ "label":"0", "matrix": [5, 11], "w": 2, "x": 18.5, "y": 5.25 },
{ "label":"Del", "matrix": [5, 14], "x": 20.5, "y": 5.25 }
]
}
}
}

View file

@ -0,0 +1,45 @@
// Copyright 2022 Commander1024 (@Commander1024)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
enum custom_layer {
_BASE,
_MEDIA,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
*
* Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10F11F12 PScScrPse
*
*
* ` 1 2 3 4 5 6 7 8 9 0 - = Backsp InsHomPgU Num / * -
*
* Tab Q W E R T Y U I O P [ ] DelEndPgD 7 8 9
* Ent +
* Caps A S D F G H J K L ; ' # 4 5 6
*
* Shft \ Z X C V B N M , . / Shift 1 2 3
* Ent
* CtrlGUI Alt Alt GUIMenuCtrl 0 .
*
*/
[_BASE] = LAYOUT_fullsize_iso(
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_PSCR, KC_SCRL, KC_PAUS,
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_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
KC_LSFT, KC_NUBS, 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_P1, KC_P2, KC_P3, KC_PENT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, TT(_MEDIA), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
),
[_MEDIA] = LAYOUT_fullsize_iso(
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_SLEP,
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_MPRV, KC_MPLY, KC_MNXT, KC_MUTE,
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, 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
)
};

View file

@ -0,0 +1,73 @@
# daskeyboard4
![daskeyboard4pro](https://i.imgur.com/Y3xT9Zuh.jpeg)
![PCB](https://i.imgur.com/UfzVHcjh.jpeg)
Reverse engineered PCB definition of daskeyboard 4 (Professional)
* Keyboard Maintainer: [Commander1024](https://github.com/Commander1024)
* Hardware Supported: The PCB, rotary encoder, LEDs
* Hardware Availability: https://www.daskeyboard.com/de/daskeyboard-4-professional/
* Microcontroller used: https://stm32-base.org/boards/STM32F401CEU6-WeAct-Black-Pill-V3.0.html
I used a WeAct Black Pill V3.0 featuring the STM32F401CEU6 processor to replace the keyboard's destroyed controller. This keyboard definition can also be easily adopted to use any other microcontroller compatible with QMK and with sufficient I/O ports.
The layout definition in **info.json** contains the magic. The rows and columns appear in the pin definition in the order they appear on the 26 pads, where the original ribbon cable was connected. **Note**: Pad 25 is not connected.
It *should* work for ANSI as well as ISO variants, although I only tested the latter.
Rotary encoder and LEDs are handwired.
## Media key mapping
KC_RGUI (right super key) is used to switch or toggle (double tap) to media layer.
The rotary encoder is used for volume control.
![mediakeys](https://i.imgur.com/9g7tQzF.jpg)
Make example for this keyboard (after setting up your build environment):
make handwired/daskeyboard/daskeyboard4:default
Flashing example for this keyboard:
make handwired/daskeyboard/daskeyboard4: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 (5,16) 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
## PCB-Pinout
| PCB-pin | properties | STM32F411 |
|---------|-----------------------------|-------------|
| 1 | column, diode, 4 switches | C14 |
| 2 | row, no diode, 13 switches | A13 |
| 3 | row, no diode, 15 switches | A14 |
| 4 | column, diode, 3 switches | C15 |
| 5 | column, diode, 8 switches | A0 |
| 6 | row, no diode, 14 switches | A1 |
| 7 | column, diode, 7 switches | A2 |
| 8 | row, no diode, 13 switches | A3 |
| 9 | column, diode, 7 switches | A4 |
| 10 | column, diode, 7 switches | A5 |
| 11 | column, diode, 8 switches | A6 |
| 12 | column, diode, 8 switches | A7 |
| 13 | column, diode, 7 switches | B0 |
| 14 | column, diode, 7 switches | B1 |
| 15 | column, diode, 7 switches | B10 |
| 16 | column, diode, 7 switches | B9 |
| 17 | row, no diode, 12 switches | B8 |
| 18 | column, diode, 2 switches | B7 |
| 19 | column, diode, 2 switches | B6 |
| 20 | column, diode, 6 switches | B5 |
| 21 | column, diode, 6 switches | B4 |
| 22 | row, no diode, 12 switches | B3 |
| 23 | row, no diode, 10 switches | A15 |
| 24 | row, no diode, 15 switches | B15 |
| 25 | N/C | |
| 26 | column, diode, 7 switches | A8 |

View file

@ -0,0 +1 @@
# This file intentionally left blank