mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-25 04:43:02 +00:00
Compare commits
88 Commits
e27ba5af21
...
0411ad4ce9
Author | SHA1 | Date | |
---|---|---|---|
|
0411ad4ce9 | ||
|
9bea332a21 | ||
|
8cbcdcac62 | ||
|
95878423fe | ||
|
0926a8d988 | ||
|
785afeab76 | ||
|
23a98c75b5 | ||
|
654f50785b | ||
|
c81487cd56 | ||
|
cb54da6861 | ||
|
cdf87c05b0 | ||
|
f2831a0aee | ||
|
4c606fe417 | ||
|
b696d78df5 | ||
|
ead296f238 | ||
|
f51e8816e6 | ||
|
739ff79006 | ||
|
3f06af21c9 | ||
|
1e9e69faa9 | ||
|
e4aad107cd | ||
|
99ae294473 | ||
|
586836b7c2 | ||
|
f38ca58467 | ||
|
4c18c8885b | ||
|
59d28ad8c8 | ||
|
50919d86f5 | ||
|
22777112e2 | ||
|
34fdc5814d | ||
|
09ba0009e0 | ||
|
c6d1aa0ec9 | ||
|
0238181180 | ||
|
953d6caa52 | ||
|
a520b48f33 | ||
|
b95c4eda02 | ||
|
d9063a6341 | ||
|
50be79cf72 | ||
|
8930af70f2 | ||
|
58c2102013 | ||
|
03d66d929d | ||
|
5c70850397 | ||
|
d1c29a4f6b | ||
|
2144302a73 | ||
|
1f93dbc446 | ||
|
d230e717d6 | ||
|
842cf93f3a | ||
|
71dd1932e6 | ||
|
6898fb09ca | ||
|
0cae39f3f3 | ||
|
e5ce704208 | ||
|
27eefb3875 | ||
|
3ba5b88cd1 | ||
|
fe38f5f1c4 | ||
|
3506a4c453 | ||
|
8a47fba0f1 | ||
|
a2194380c3 | ||
|
e4feb53897 | ||
|
0fcde68665 | ||
|
7ea5d711bc | ||
|
4bc3045011 | ||
|
78aa8b7382 | ||
|
bb827d718c | ||
|
af874df740 | ||
|
d84ba683ab | ||
|
bfa809ef71 | ||
|
254090ec74 | ||
|
c1290ce863 | ||
|
d799a26a99 | ||
|
db98afd081 | ||
|
cd1514dc42 | ||
|
e0651ba501 | ||
|
d01884f27c | ||
|
0053e8cabb | ||
|
79cc1e568b | ||
|
5a46bdeacf | ||
|
858add1769 | ||
|
1bb1f563a5 | ||
|
c6ed373dbf | ||
|
c3fdc6508b | ||
|
f312c68c13 | ||
|
84d8ce04e8 | ||
|
f9b30e93cb | ||
|
c73284dac2 | ||
|
0fc220b8ee | ||
|
a0e599e511 | ||
|
7f756448ba | ||
|
ab22f12df3 | ||
|
45364e26d1 | ||
|
d226b651f3 |
11
keyboards/protokeeb/info.json
Normal file
11
keyboards/protokeeb/info.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"keyboard_name": "Protokeeb",
|
||||
"manufacturer": "A-Tech Officials",
|
||||
"maintainer": "atechofficials",
|
||||
"url": "https://github.com/atechofficials/protokeeb",
|
||||
"bootloader_instructions": "Press and hold the FN Key (row-4, column-1) then press the key mapped to `QK_BOOT` i.e ENTER Key (row-4, column-4) to enter the bootloader mode.",
|
||||
"tags": ["rgb", "4x4"],
|
||||
"usb": {
|
||||
"vid": "0x419A"
|
||||
}
|
||||
}
|
58
keyboards/protokeeb/keymaps/default/keymap.c
Normal file
58
keyboards/protokeeb/keymaps/default/keymap.c
Normal file
@ -0,0 +1,58 @@
|
||||
/* Protokeeb Copyright 2024 A-Tech Officials (@atechofficials)
|
||||
* 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 3 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 <https://www.gnu.org/licenses/gpl-3.0.html>.
|
||||
*/
|
||||
|
||||
/* Protokeeb v1.0
|
||||
* Keymap: Default
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum protokeeb_keymap_layers {
|
||||
LAYER_BASE,
|
||||
LAYER_LOWER,
|
||||
LAYER_RAISE,
|
||||
LAYER_ADJUST,
|
||||
};
|
||||
|
||||
#define LOWER LT(LAYER_LOWER, KC_P0)
|
||||
#define RAISE LT(LAYER_RAISE, KC_PENT)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[LAYER_BASE] = LAYOUT(/* Base: Numpad without Num Lock*/
|
||||
KC_P7, KC_P8, KC_P9, KC_PSLS, KC_MUTE, KC_P4, KC_P5, KC_P6, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PMNS, LOWER, KC_PDOT, RAISE, KC_PPLS),
|
||||
|
||||
[LAYER_LOWER] = LAYOUT(/* RGB Control */
|
||||
UG_TOGG, UG_NEXT, UG_PREV, DB_TOGG, KC_TRNS, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_VALU, UG_VALD, UG_SPDU, UG_SPDD, KC_TRNS, KC_NO, KC_TRNS, QK_BOOT),
|
||||
|
||||
[LAYER_RAISE] = LAYOUT(/* Media Control and Quick Launch*/
|
||||
KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, KC_TRNS, KC_CALC, KC_MYCM, KC_CPNL, KC_PWR, KC_PSCR, KC_HOME, KC_INS, KC_DEL, KC_TRNS, KC_NO, KC_TRNS, QK_RBT),
|
||||
|
||||
[LAYER_ADJUST] = LAYOUT(/* Function Keys */
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_NO, KC_TRNS, KC_NO),
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
[LAYER_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
|
||||
[LAYER_LOWER] = {ENCODER_CCW_CW(KC_BRID, KC_BRIU)},
|
||||
[LAYER_RAISE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
|
||||
[LAYER_ADJUST] = {ENCODER_CCW_CW(KC_TRNS, KC_TRNS)},
|
||||
};
|
||||
#endif
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST);
|
||||
}
|
2
keyboards/protokeeb/keymaps/default/rules.mk
Normal file
2
keyboards/protokeeb/keymaps/default/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
ENCODER_MAP_ENABLE = yes
|
||||
TRI_LAYER_ENABLE = yes
|
19
keyboards/protokeeb/keymaps/midi/config.h
Normal file
19
keyboards/protokeeb/keymaps/midi/config.h
Normal file
@ -0,0 +1,19 @@
|
||||
/* Protokeeb Copyright 2024 A-Tech Officials (@atechofficials)
|
||||
* 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 3 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 <https://www.gnu.org/licenses/gpl-3.0.html>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define MIDI_BASIC
|
56
keyboards/protokeeb/keymaps/midi/keymap.c
Normal file
56
keyboards/protokeeb/keymaps/midi/keymap.c
Normal file
@ -0,0 +1,56 @@
|
||||
/* Protokeeb Copyright 2024 A-Tech Officials (@atechofficials)
|
||||
* 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 3 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 <https://www.gnu.org/licenses/gpl-3.0.html>.
|
||||
*/
|
||||
|
||||
/* Protokeeb v1.0
|
||||
* Keymap: MIDI
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum protokeeb_keymap_layers {
|
||||
LAYER_NOTES_SET_1,
|
||||
LAYER_NOTES_SET_2,
|
||||
LAYER_NOTES_SET_3,
|
||||
LAYER_RGB_CONTROL,
|
||||
};
|
||||
|
||||
#define NOTES_SET_1 TG(LAYER_NOTES_SET_1)
|
||||
#define NOTES_SET_2 TG(LAYER_NOTES_SET_2)
|
||||
#define NOTES_SET_3 TG(LAYER_NOTES_SET_3)
|
||||
#define RGB_CTRL MO(LAYER_RGB_CONTROL)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[LAYER_NOTES_SET_1] = LAYOUT(/* Notes Set-1 */
|
||||
MI_C, MI_Cs, MI_D, MI_Ds, KC_MUTE, MI_E, MI_F, MI_Fs, MI_G, MI_Gs, MI_A, MI_As, MI_B, RGB_CTRL, NOTES_SET_2, NOTES_SET_3, MI_TOGG),
|
||||
|
||||
[LAYER_NOTES_SET_2] = LAYOUT(/* Notes Set-2 */
|
||||
MI_C1, MI_Cs1, MI_D1, MI_Ds1, KC_MUTE, MI_E1, MI_F1, MI_Fs1, MI_G1, MI_Gs1, MI_A1, MI_As1, MI_B1, NOTES_SET_1, KC_TRNS, NOTES_SET_3, KC_TRNS),
|
||||
|
||||
[LAYER_NOTES_SET_3] = LAYOUT(/* Notes Set-3 */
|
||||
MI_C2, MI_Cs2, MI_D2, MI_Ds2, KC_MUTE, MI_E2, MI_F2, MI_Fs2, MI_G2, MI_Gs2, MI_A2, MI_As2, MI_B2, NOTES_SET_1, NOTES_SET_2, KC_TRNS, KC_TRNS),
|
||||
|
||||
[LAYER_RGB_CONTROL] = LAYOUT(/* RGB Control */
|
||||
UG_TOGG, UG_NEXT, UG_PREV, DB_TOGG, KC_MUTE, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_VALU, UG_VALD, UG_SPDU, UG_SPDD, KC_TRNS, KC_NO, KC_NO, QK_BOOT),
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
[LAYER_NOTES_SET_1] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
|
||||
[LAYER_NOTES_SET_2] = {ENCODER_CCW_CW(MI_OCTD, MI_OCTU)},
|
||||
[LAYER_NOTES_SET_3] = {ENCODER_CCW_CW(MI_TRSD, MI_TRSU)},
|
||||
[LAYER_RGB_CONTROL] = {ENCODER_CCW_CW(UG_HUED, UG_HUEU)},
|
||||
};
|
||||
#endif
|
2
keyboards/protokeeb/keymaps/midi/rules.mk
Normal file
2
keyboards/protokeeb/keymaps/midi/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
MIDI_ENABLE = yes
|
||||
ENCODER_MAP_ENABLE = yes
|
40
keyboards/protokeeb/keymaps/via/keymap.c
Normal file
40
keyboards/protokeeb/keymaps/via/keymap.c
Normal file
@ -0,0 +1,40 @@
|
||||
/* Protokeeb Copyright 2024 A-Tech Officials (@atechofficials)
|
||||
* 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 3 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 <https://www.gnu.org/licenses/gpl-3.0.html>.
|
||||
*/
|
||||
|
||||
/* Protokeeb v1.0
|
||||
* Keymap: Via
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum protokeeb_keymap_layers {
|
||||
LAYER_BASE,
|
||||
LAYER_LOWER,
|
||||
};
|
||||
|
||||
#define LOWER LT(LAYER_LOWER, KC_P0)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[LAYER_BASE] = LAYOUT(/* Base */
|
||||
KC_P7, KC_P8, KC_P9, KC_PSLS, KC_MUTE, KC_P4, KC_P5, KC_P6, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PMNS, LOWER, KC_PDOT, KC_PENT, KC_PPLS),
|
||||
|
||||
[LAYER_LOWER] = LAYOUT(/* RGB Control */
|
||||
UG_TOGG, UG_NEXT, UG_PREV, DB_TOGG, KC_TRNS, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_VALU, UG_VALD, UG_SPDU, UG_SPDD, KC_TRNS, KC_NO, KC_NO, QK_BOOT),
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {[LAYER_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, [LAYER_LOWER] = {ENCODER_CCW_CW(KC_BRID, KC_BRIU)}};
|
||||
#endif
|
2
keyboards/protokeeb/keymaps/via/rules.mk
Normal file
2
keyboards/protokeeb/keymaps/via/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
VIA_ENABLE = yes
|
||||
ENCODER_MAP_ENABLE = yes
|
50
keyboards/protokeeb/rev1/config.h
Normal file
50
keyboards/protokeeb/rev1/config.h
Normal file
@ -0,0 +1,50 @@
|
||||
/* Protokeeb Copyright 2024 A-Tech Officials (@atechofficials)
|
||||
* 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 3 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 <https://www.gnu.org/licenses/gpl-3.0.html>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// Define the pin connected to the encoder push button
|
||||
#define ENCODER_BUTTON_PIN GP14
|
||||
|
||||
// Define the row and column for the encoder button
|
||||
#define ENCODER_BUTTON_ROW 0
|
||||
#define ENCODER_BUTTON_COL 4
|
||||
|
||||
/* Peripheral used */
|
||||
#define WS2812_PIO_USE_PIO1
|
||||
|
||||
/* RGB lighting effects and animations settings */
|
||||
#define RGBLIGHT_EFFECT_BREATHE_MAX 127
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 40
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 4
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0
|
||||
#define RGBLIGHT_EFFECT_SWIRL_RANGE 255
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4
|
||||
#define RGBLIGHT_EFFECT_TWINKLE_LIFE 200
|
||||
#define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY (1/127)
|
||||
|
||||
/* Double tap reset bootloader entry */
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
|
||||
|
||||
/* Bootloader timeout window in milli-seconds */
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U
|
||||
|
||||
/* LED to blink when entering bootloader mode */
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP25
|
||||
|
||||
#define ENCODER_MAP_KEY_DELAY 10
|
83
keyboards/protokeeb/rev1/keyboard.json
Normal file
83
keyboards/protokeeb/rev1/keyboard.json
Normal file
@ -0,0 +1,83 @@
|
||||
{
|
||||
"audio": {
|
||||
"default": {
|
||||
"on": false
|
||||
},
|
||||
"pins": ["GP22"]
|
||||
},
|
||||
"board": "GENERIC_RP_RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"debounce": 20,
|
||||
"diode_direction": "COL2ROW",
|
||||
"encoder": {
|
||||
"rotary": [
|
||||
{"pin_a": "GP12", "pin_b": "GP13", "resolution": 2}
|
||||
]
|
||||
},
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"encoder": true,
|
||||
"extrakey": true,
|
||||
"nkro": true,
|
||||
"rgblight": true
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["GP6", "GP7", "GP8", "GP9", "GP14"],
|
||||
"rows": ["GP2", "GP3", "GP4", "GP5"]
|
||||
},
|
||||
"processor": "RP2040",
|
||||
"rgblight": {
|
||||
"animations": {
|
||||
"alternating": true,
|
||||
"breathing": true,
|
||||
"christmas": true,
|
||||
"knight": true,
|
||||
"rainbow_mood": true,
|
||||
"rainbow_swirl": true,
|
||||
"snake": true,
|
||||
"static_gradient": true,
|
||||
"twinkle": true
|
||||
},
|
||||
"brightness_steps": 15,
|
||||
"default": {
|
||||
"val": 50
|
||||
},
|
||||
"hue_steps": 15,
|
||||
"led_count": 4,
|
||||
"led_map": [3, 2, 1, 0],
|
||||
"max_brightness": 127,
|
||||
"saturation_steps": 15,
|
||||
"sleep": true
|
||||
},
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x1717"
|
||||
},
|
||||
"ws2812": {
|
||||
"driver": "vendor",
|
||||
"pin": "GP10"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label": "7", "matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"label": "8", "matrix": [0, 1], "x": 1, "y": 0},
|
||||
{"label": "9", "matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"label": "/", "matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"label": "MUTE", "matrix": [0, 4], "x": 4, "y": 0},
|
||||
{"label": "4", "matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"label": "5", "matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"label": "6", "matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"label": "*", "matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"label": "1", "matrix": [2, 0], "x": 0, "y": 2},
|
||||
{"label": "2", "matrix": [2, 1], "x": 1, "y": 2},
|
||||
{"label": "3", "matrix": [2, 2], "x": 2, "y": 2},
|
||||
{"label": "-", "matrix": [2, 3], "x": 3, "y": 2},
|
||||
{"label": "0", "matrix": [3, 0], "x": 0, "y": 3},
|
||||
{"label": ".", "matrix": [3, 1], "x": 1, "y": 3},
|
||||
{"label": "ENTER", "matrix": [3, 2], "x": 2, "y": 3},
|
||||
{"label": "+", "matrix": [3, 3], "x": 3, "y": 3}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
26
keyboards/protokeeb/rev1/mcuconf.h
Normal file
26
keyboards/protokeeb/rev1/mcuconf.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* Protokeeb Copyright 2024 A-Tech Officials (@atechofficials)
|
||||
* 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 3 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 <https://www.gnu.org/licenses/gpl-3.0.html>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
/* RP2040 I2C Driver Selection */
|
||||
#undef RP_I2C_USE_I2C0
|
||||
#define RP_I2C_USE_I2C0 TRUE
|
||||
|
||||
#undef RP_I2C_USE_I2C1
|
||||
#define RP_I2C_USE_I2C1 FALSE
|
42
keyboards/protokeeb/rev1/readme.md
Normal file
42
keyboards/protokeeb/rev1/readme.md
Normal file
@ -0,0 +1,42 @@
|
||||
# Protokeeb Rev1
|
||||
|
||||
![Protokeeb](https://i.imgur.com/RsSBoJg.jpg)
|
||||
|
||||
The Protokeeb is a versatile 16-key (4 x 4) Numpad/Macropad/MIDI device designed by A-Tech Officials. It is perfect for anyone looking to get started with custom keyboards. This open-source hardware project is based on a Raspberry Pi Pico development board, making it easy to learn, build, and modify. Designed for developers and enthusiasts alike, the Protokeeb features per-key south-facing ARGB LEDs and much more.
|
||||
|
||||
For more information, visit the [Protokeeb GitHub page](https://github.com/atechofficials/protokeeb).
|
||||
|
||||
- **Keyboard Maintainer:** [A-Tech Officials](https://github.com/atechofficials)
|
||||
- **Hardware Supported:** Protokeeb Keyboard PCB v1.x, Raspberry Pi Pico, Raspberry Pi Pico W, Waveshare RP2040-Plus
|
||||
- **Hardware Availability:** [ProtoKeeb](https://github.com/atechofficials/protokeeb)
|
||||
|
||||
## Default Protokeeb Layout
|
||||
|
||||
![Protokeeb Layout Image](https://i.imgur.com/e0RlllX.png)
|
||||
|
||||
The default layout comes pre-flashed on every Protokeeb and consists of two layers:
|
||||
|
||||
- Layer 1: 16-key numpad, excluding the `NUM LOCK` key.
|
||||
- Layer 2: RGB LED control and keyboard boot options.
|
||||
- Layer 3: Media control, quick launch application and other options.
|
||||
- Layer 4: Function Keys.
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make protokeeb/rev1:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make protokeeb/rev1: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:** Press and hold the top left key (row-0, column-0) before plugging-in the keyboard into your PC/Laptop.
|
||||
|
||||
- **Physical reset buttons:** Briefly press and hold both the left (Bootsel) and right (Reset) tactile push buttons located on the top left side of the Protokeeb rev1 PCB. Keep holding the left (Bootsel) button, release the right (Reset) button, then release the left (Bootsel) button after 3-5 seconds to enter bootloader mode.
|
||||
|
||||
- **Keycode in Layout:** Press and hold the 0-key (row-4, column-1) then press the key mapped to `QK_BOOT` (Plus + key, row-4, column-4) to enter bootloader mode.
|
28
keyboards/protokeeb/rev1/rev1.c
Normal file
28
keyboards/protokeeb/rev1/rev1.c
Normal file
@ -0,0 +1,28 @@
|
||||
/* Protokeeb Copyright 2024 A-Tech Officials (@atechofficials)
|
||||
* 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 3 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 <https://www.gnu.org/licenses/gpl-3.0.html>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
extern matrix_row_t matrix[]; // Declare the matrix array
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// Read the encoder button state and update the matrix
|
||||
if (gpio_read_pin(ENCODER_BUTTON_PIN) == 0) {
|
||||
matrix[ENCODER_BUTTON_ROW] |= (1 << ENCODER_BUTTON_COL);
|
||||
} else {
|
||||
matrix[ENCODER_BUTTON_ROW] &= ~(1 << ENCODER_BUTTON_COL);
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
"""This script automates the copying of the default keymap into your own keymap.
|
||||
"""
|
||||
import re
|
||||
import shutil
|
||||
|
||||
from milc import cli
|
||||
@ -13,6 +14,13 @@ from qmk.keyboard import keyboard_completer, keyboard_folder
|
||||
from qmk.userspace import UserspaceDefs
|
||||
|
||||
|
||||
def validate_keymap_name(name):
|
||||
"""Returns True if the given keymap name contains only a-z, 0-9 and underscore characters.
|
||||
"""
|
||||
regex = re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_]+$')
|
||||
return bool(regex.match(name))
|
||||
|
||||
|
||||
def prompt_keyboard():
|
||||
prompt = """{fg_yellow}Select Keyboard{style_reset_all}
|
||||
If you`re unsure you can view a full list of supported keyboards with {fg_yellow}qmk list-keyboards{style_reset_all}.
|
||||
@ -60,6 +68,10 @@ def new_keymap(cli):
|
||||
cli.log.error(f'Default keymap {{fg_cyan}}{keymap_path_default}{{fg_reset}} does not exist!')
|
||||
return False
|
||||
|
||||
if not validate_keymap_name(user_name):
|
||||
cli.log.error('Keymap names must contain only {fg_cyan}a-z{fg_reset}, {fg_cyan}0-9{fg_reset} and {fg_cyan}_{fg_reset}! Please choose a different name.')
|
||||
return False
|
||||
|
||||
if keymap_path_new.exists():
|
||||
cli.log.error(f'Keymap {{fg_cyan}}{user_name}{{fg_reset}} already exists! Please choose a different name.')
|
||||
return False
|
||||
|
@ -29,6 +29,7 @@ def _convert_macros(via_macros):
|
||||
if len(via_macros) == 0:
|
||||
return list()
|
||||
split_regex = re.compile(r'(}\,)|(\,{)')
|
||||
macro_group_regex = re.compile(r'({.+?})')
|
||||
macros = list()
|
||||
for via_macro in via_macros:
|
||||
# Split VIA macro to its elements
|
||||
@ -38,13 +39,28 @@ def _convert_macros(via_macros):
|
||||
macro_data = list()
|
||||
for m in macro:
|
||||
if '{' in m or '}' in m:
|
||||
# Found keycode(s)
|
||||
keycodes = m.split(',')
|
||||
# Remove whitespaces and curly braces from around keycodes
|
||||
keycodes = list(map(lambda s: s.strip(' {}'), keycodes))
|
||||
# Remove the KC prefix
|
||||
keycodes = list(map(lambda s: s.replace('KC_', ''), keycodes))
|
||||
macro_data.append({"action": "tap", "keycodes": keycodes})
|
||||
# Split macro groups
|
||||
macro_groups = macro_group_regex.findall(m)
|
||||
for macro_group in macro_groups:
|
||||
# Remove whitespaces and curly braces from around group
|
||||
macro_group = macro_group.strip(' {}')
|
||||
|
||||
macro_action = 'tap'
|
||||
macro_keycodes = []
|
||||
|
||||
if macro_group[0] == '+':
|
||||
macro_action = 'down'
|
||||
macro_keycodes.append(macro_group[1:])
|
||||
elif macro_group[0] == '-':
|
||||
macro_action = 'up'
|
||||
macro_keycodes.append(macro_group[1:])
|
||||
else:
|
||||
macro_keycodes.extend(macro_group.split(',') if ',' in macro_group else [macro_group])
|
||||
|
||||
# Remove the KC prefixes
|
||||
macro_keycodes = list(map(lambda s: s.replace('KC_', ''), macro_keycodes))
|
||||
|
||||
macro_data.append({"action": macro_action, "keycodes": macro_keycodes})
|
||||
else:
|
||||
# Found text
|
||||
macro_data.append(m)
|
||||
@ -54,13 +70,13 @@ def _convert_macros(via_macros):
|
||||
|
||||
|
||||
def _fix_macro_keys(keymap_data):
|
||||
macro_no = re.compile(r'MACRO0?([0-9]{1,2})')
|
||||
macro_no = re.compile(r'MACRO0?\(([0-9]{1,2})\)')
|
||||
for i in range(0, len(keymap_data)):
|
||||
for j in range(0, len(keymap_data[i])):
|
||||
kc = keymap_data[i][j]
|
||||
m = macro_no.match(kc)
|
||||
if m:
|
||||
keymap_data[i][j] = f'MACRO_{m.group(1)}'
|
||||
keymap_data[i][j] = f'MC_{m.group(1)}'
|
||||
return keymap_data
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user