diff --git a/keyboards/protokeeb/keymaps/debug/rules.mk b/keyboards/protokeeb/keymaps/debug/rules.mk index bdcd12d8061..bb1518d5152 100644 --- a/keyboards/protokeeb/keymaps/debug/rules.mk +++ b/keyboards/protokeeb/keymaps/debug/rules.mk @@ -1,8 +1,14 @@ # Build Options -# Change yes to no to diable feature +# Change yes to no to disable feature # Console for keyboard debug CONSOLE_ENABLE = yes # Commands for debug and configuration -COMMAND_ENABLE = yes \ No newline at end of file +COMMAND_ENABLE = yes + +# Rotary Encoder Keymap support +ENCODER_MAP_ENABLE = yes + +# DIP Switch Keymap support +DIP_SWITCH_MAP_ENABLE = no \ No newline at end of file diff --git a/keyboards/protokeeb/keymaps/default/keymap.c b/keyboards/protokeeb/keymaps/default/keymap.c index ac6028a8838..b644277c2b0 100644 --- a/keyboards/protokeeb/keymaps/default/keymap.c +++ b/keyboards/protokeeb/keymaps/default/keymap.c @@ -25,33 +25,56 @@ enum protokeeb_keymap_layers { LAYER_BASE = 0, LAYER_LOWER = 1, + LAYER_RAISE = 2, + LAYER_ADJUST = 3, }; #define LOWER MO(LAYER_LOWER) +#define RAISE LT(LAYER_RAISE, KC_KP_PLUS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_BASE] = LAYOUT( /* Base */ - KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, - KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK, - KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_MINUS, - LOWER, KC_KP_0, KC_KP_PLUS, KC_KP_ENTER + KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, + KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK, + KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_MINUS, + LOWER, KC_KP_0, RAISE, KC_KP_ENTER ), [LAYER_LOWER] = LAYOUT( /* RGB Control */ - RGB_MODE_PLAIN, RGB_MODE_FORWARD, RGB_MODE_REVERSE, RGB_TOG, - RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, - RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, - KC_TRNS, RGB_MODE_SWIRL, QK_DEBUG_TOGGLE, QK_BOOT + RGB_MODE_PLAIN, RGB_MODE_FORWARD, RGB_MODE_REVERSE, RGB_TOG, + RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, + RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, + KC_TRNS, RGB_MODE_SWIRL, KC_TRNS, QK_BOOT ), + + [LAYER_RAISE] = LAYOUT( /* Raise */ + KC_F1, KC_F2, KC_F3, KC_F4, + KC_F5, KC_F6, KC_F7, KC_F8, + KC_F9, KC_F10, KC_F11, KC_F12, + QK_REBOOT, QK_DEBUG_TOGGLE, KC_TRNS, QK_AUDIO_TOGGLE + ), + + [LAYER_ADJUST] = LAYOUT( /* Adjust */ + KC_MEDIA_PLAY_PAUSE, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_MEDIA_STOP, + KC_CALCULATOR, KC_MY_COMPUTER, KC_CONTROL_PANEL, KC_SYSTEM_POWER, + KC_NO, KC_NO, KC_NO, KC_NO, + 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_BRIGHTNESS_DOWN, KC_BRIGHTNESS_UP) }, + [LAYER_LOWER] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) }, + [LAYER_RAISE] = { ENCODER_CCW_CW(KC_BRIGHTNESS_DOWN, KC_BRIGHTNESS_UP) }, + [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); +} + /* #if defined(DIP_SWITCH_MAP_ENABLE) const uint16_t PROGMEM dip_switch_map[NUM_DIP_SWITCHES][NUM_DIP_STATES] = { diff --git a/keyboards/protokeeb/keymaps/default/rules.mk b/keyboards/protokeeb/keymaps/default/rules.mk index 5f850d00da3..a9287f803ad 100644 --- a/keyboards/protokeeb/keymaps/default/rules.mk +++ b/keyboards/protokeeb/keymaps/default/rules.mk @@ -1,8 +1,10 @@ # Build Options Protokeeb rev1 -# Change yes to no to diable features +# Change yes to no to disable features # Rotary Encoder Keymap support ENCODER_MAP_ENABLE = yes # DIP Switch Keymap support -DIP_SWITCH_MAP_ENABLE = no \ No newline at end of file +DIP_SWITCH_MAP_ENABLE = no + +TRI_LAYER_ENABLE = yes \ No newline at end of file diff --git a/keyboards/protokeeb/keymaps/midi/keymap.c b/keyboards/protokeeb/keymaps/midi/keymap.c index 4175d1c8566..d0cb2ab8ae2 100644 --- a/keyboards/protokeeb/keymaps/midi/keymap.c +++ b/keyboards/protokeeb/keymaps/midi/keymap.c @@ -23,31 +23,52 @@ #include "quantum.h" enum protokeeb_keymap_layers { - LAYER_BASE = 0, - LAYER_LOWER = 1, + LAYER_NOTES_SET_1 = 0, + LAYER_NOTES_SET_2 = 1, + LAYER_NOTES_SET_3 = 2, + LAYER_RGB_CONTROL = 3, }; -#define LOWER MO(LAYER_LOWER) +#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_BASE] = LAYOUT( /* MIDI Control */ + [LAYER_BASE] = LAYOUT( /* Notes Set-1 */ MI_C, MI_Cs, MI_D, MI_Ds, MI_E, MI_F, MI_Fs, MI_G, MI_Gs, MI_A, MI_As, MI_B, - LOWER, MI_C1, MI_Cs1, MI_D1 + RGB_CTRL, NOTES_SET_2, NOTES_SET_3, MI_TOGG ), - [LAYER_LOWER] = LAYOUT( /* RGB Control */ + [LAYER_NOTES_SET_2] = LAYOUT( /* Notes Set-2 */ + MI_C1, MI_Cs1, MI_D1, MI_Ds1, + 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, + 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 */ RGB_MODE_PLAIN, RGB_MODE_FORWARD, RGB_MODE_REVERSE, RGB_TOG, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, - KC_TRNS, RGB_MODE_SWIRL, QK_DEBUG_TOGGLE, QK_BOOT + KC_TRNS, KC_TRNS, KC_TRNS, 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_BRIGHTNESS_DOWN, KC_BRIGHTNESS_UP) }, + [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(RGB_HUD, RGB_HUI) }, }; #endif diff --git a/keyboards/protokeeb/keymaps/midi/rules.mk b/keyboards/protokeeb/keymaps/midi/rules.mk index b837918166f..62f7053f99e 100644 --- a/keyboards/protokeeb/keymaps/midi/rules.mk +++ b/keyboards/protokeeb/keymaps/midi/rules.mk @@ -1,5 +1,5 @@ # Build Options -# Change yes to no to diable feature +# Change yes to no to disable feature MIDI_ENABLE = yes diff --git a/keyboards/protokeeb/keymaps/via/keymap.c b/keyboards/protokeeb/keymaps/via/keymap.c index 7f9535564cd..eb75cb2db26 100644 --- a/keyboards/protokeeb/keymaps/via/keymap.c +++ b/keyboards/protokeeb/keymaps/via/keymap.c @@ -29,13 +29,14 @@ enum protokeeb_keymap_layers { }; #define LOWER MO(LAYER_LOWER) +#define RAISE LT(DYNAMIC_LAYER1, KC_KP_PLUS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_BASE] = LAYOUT( /* Base */ KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_MINUS, - LOWER, KC_KP_0, KC_KP_PLUS, KC_KP_ENTER + LOWER, KC_KP_0, RAISE, KC_KP_ENTER ), [LAYER_LOWER] = LAYOUT( /* RGB Control */ @@ -64,7 +65,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BRIGHTNESS_DOWN, KC_BRIGHTNESS_UP) }, - [DYNAMIC_LAYER1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [DYNAMIC_LAYER1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, [DYNAMIC_LAYER2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, }; -#endif \ No newline at end of file +#endif + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, LAYER_LOWER, DYNAMIC_LAYER1, DYNAMIC_LAYER2); +} \ No newline at end of file diff --git a/keyboards/protokeeb/keymaps/via/rules.mk b/keyboards/protokeeb/keymaps/via/rules.mk index a43d01ad113..54b828763cd 100644 --- a/keyboards/protokeeb/keymaps/via/rules.mk +++ b/keyboards/protokeeb/keymaps/via/rules.mk @@ -1,5 +1,5 @@ # Build Options Protokeeb rev1 -# Change yes to no to diable features +# Change yes to no to disable features # Enable Via support VIA_ENABLE = yes @@ -13,4 +13,6 @@ DIP_SWITCH_MAP_ENABLE = no # To reduce firmware size, consider turning on link time optimization # Note: This may have unexpected side effects on keyboards # using ARM processors, so test thoroughly with it enabled and disabled. -# LTO_ENABLE = yes \ No newline at end of file +# LTO_ENABLE = yes + +TRI_LAYER_ENABLE = yes \ No newline at end of file diff --git a/keyboards/protokeeb/rev1/config.h b/keyboards/protokeeb/rev1/config.h index 45deb3af8d6..76c43b6cb7d 100644 --- a/keyboards/protokeeb/rev1/config.h +++ b/keyboards/protokeeb/rev1/config.h @@ -183,4 +183,10 @@ #if defined(DIP_SWITCH_ENABLE) #define DIP_SWITCH_PINS { GP14 } #endif +*/ + +/* +#define TRI_LAYER_LOWER_LAYER 1 +#define TRI_LAYER_UPPER_LAYER 2 +#define TRI_LAYER_ADJUST_LAYER 3 */ \ No newline at end of file diff --git a/keyboards/protokeeb/rev1/info.json b/keyboards/protokeeb/rev1/keyboard.json similarity index 98% rename from keyboards/protokeeb/rev1/info.json rename to keyboards/protokeeb/rev1/keyboard.json index d2f6623b53d..1e802eeac52 100644 --- a/keyboards/protokeeb/rev1/info.json +++ b/keyboards/protokeeb/rev1/keyboard.json @@ -11,7 +11,7 @@ "mouse": false }, "suspend_wakeup_delay": 0, - "wait_for": false + "wait_for_enumeration": false }, "board": "GENERIC_RP_RP2040", "bootloader": "rp2040", @@ -161,7 +161,7 @@ "h": 1 }, { - "label": "+", + "label": "LT(2, +)", "matrix": [3, 2], "x": 2, "y": 3, diff --git a/keyboards/protokeeb/rev1/readme.md b/keyboards/protokeeb/rev1/readme.md index 813c0481b93..9e75e40ad92 100644 --- a/keyboards/protokeeb/rev1/readme.md +++ b/keyboards/protokeeb/rev1/readme.md @@ -2,42 +2,43 @@ ![Protokeeb](https://i.imgur.com/RsSBoJg.jpg) -A 16-key (4 x 4) Numpad/Macropad/Midi device designed by A-Tech Officials for easily getting started in the field of custom keyboards. -Learn, build, modify easily as the Protokeeb is an open-source hardware project. -The PCB is based on a Raspberry Pi Pico development board. -Designed for developers and enthusiasts who wants to begin their journey in custom keyboards and keyboard firmware. -Per key south facing ARGB LED and much more. -For more info visit https://github.com/atechofficials/protokeeb +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. -- 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: [atechofficials](https://github.com/atechofficials/protokeeb) +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) ![Protokeeb Layout Image](https://i.imgur.com/e0RlllX.png) ## Default Protokeeb Layout -This is the default layout that comes flashed on every Protokeeb. -The deafult layout consists of 2 layers. -1st layer for the 16-key numpad, excluding the NUM LOCK key. -2nd layer for RGB LED control and keyboard boot options. +The default layout comes pre-flashed on every Protokeeb and consists of two layers: -Make example of this keyboard (after setting up your build environment): +- Layer 1: 16-key numpad, excluding the NUM LOCK key. +- Layer 2: RGB LED control and keyboard boot options. - make protokeeb:default +To build the default layout, use the following command after setting up your build environment: -Flashing example for this keyboard: +```go +make protokeeb:default +``` - make protokeeb:default:flash +To flash the default layout, use: -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). +```go +make protokeeb:default:flash +``` + +For more information, 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). If you're new to QMK, start with the [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). ## Bootloader -Enter the bootloader in 3 ways: +You can enter the bootloader in three ways: -- **Bootmagic**: Press and hold the top left key (row-0, column-0) before plugging-in the keyboard to your PC/Laptop/host to enter the bootloader. +- **Bootmagic**: Press and hold the top left key (row-0, column-0) before plugging-in the keyboard to your PC/Laptop/host. -- **Physical pcb buttons**: Briefly press and hold both the left and right (Bootsel and Reset) tactile push button located on the top left side of the Protokeeb, then keep holding the left (Bootsel) push button and release/let go the right (Reset) push button and then after 3-5 seconds also release/let go the left (Bootsel) push button to enter the bootloader mode. +- **Physical PCB buttons**: Briefly press and hold both the left (Bootsel) and right (Reset) tactile push buttons located on the top left side of the Protokeeb. 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 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. +- **Keycode in Layout**: Press and hold the FN Key (row-4, column-1) then press the key mapped to `QK_BOOT` (ENTER Key, row-4, column-4) to enter bootloader mode. diff --git a/keyboards/protokeeb/rev1/rules.mk b/keyboards/protokeeb/rev1/rules.mk index c35911b2a2e..46dfcb0e7b6 100644 --- a/keyboards/protokeeb/rev1/rules.mk +++ b/keyboards/protokeeb/rev1/rules.mk @@ -1,5 +1,5 @@ # Build Options -# Change yes to no to diable feature +# Change yes to no to disable feature # Default keyboard folder DEFAULT_FOLDER = protokeeb/rev1