From 5ed0c6d629e33a8c70c18a7f6a168746dc7b81b4 Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 24 Oct 2024 00:42:10 +0530 Subject: [PATCH 1/7] added support for shorty KB --- keyboards/shorty/keyboard.json | 71 +++++++++++++++++++++++ keyboards/shorty/keymaps/default/keymap.c | 27 +++++++++ keyboards/shorty/readme.md | 35 +++++++++++ keyboards/shorty/rules.mk | 4 ++ 4 files changed, 137 insertions(+) create mode 100644 keyboards/shorty/keyboard.json create mode 100644 keyboards/shorty/keymaps/default/keymap.c create mode 100644 keyboards/shorty/readme.md create mode 100644 keyboards/shorty/rules.mk diff --git a/keyboards/shorty/keyboard.json b/keyboards/shorty/keyboard.json new file mode 100644 index 000000000000..2c43c9425cbf --- /dev/null +++ b/keyboards/shorty/keyboard.json @@ -0,0 +1,71 @@ +{ + "manufacturer": "Hawtkeys", + "keyboard_name": "shorty", + "maintainer": "hawtkeys", + "bootloader": "rp2040", + "diode_direction": "ROW2COL", + "features": { + "bootmagic": true, + "command": true, + "console": true, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "encoder": { + "rotary": [ + {"pin_a": "GP28", "pin_b": "GP27"}, + {"pin_a": "GP3", "pin_b": "GP4"} + ] + }, + "matrix_pins": { + "custom_lite":false, + "cols":[ + "GP14", + "GP13", + "GP12", + null, + null + ], + "rows":[ + "GP11", + "GP10", + "GP9", + "GP29", + "GP2" + ] + }, + "processor": "RP2040", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x5400", + "vid": "0x5453" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4}, + {"matrix": [4, 1], "x": 1, "y": 4}, + {"matrix": [4, 2], "x": 2, "y": 4} + + ] + } + } +} \ No newline at end of file diff --git a/keyboards/shorty/keymaps/default/keymap.c b/keyboards/shorty/keymaps/default/keymap.c new file mode 100644 index 000000000000..7b402ced58cb --- /dev/null +++ b/keyboards/shorty/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_DOWN,KC_MS_WH_UP) } + // Encoder 1 Encoder 2 +}; +#endif + +/* void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; +// debug_keyboard=true; +// debug_mouse=true; + +} */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3, + KC_A, KC_NO, KC_NO, // encoder button1 + KC_D, KC_NO, KC_NO // encoder button2 + ) +}; diff --git a/keyboards/shorty/readme.md b/keyboards/shorty/readme.md new file mode 100644 index 000000000000..32bfde377508 --- /dev/null +++ b/keyboards/shorty/readme.md @@ -0,0 +1,35 @@ +# shorty + +![shorty](imgur.com image replace me!) + +*A short description of the keyboard/project* + +* Keyboard Maintainer: [Hawtkeys](https://github.com/hawtkeys) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make shorty:default + +Flashing example for this keyboard: + + make shorty: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 + + + "encoder": { + "rotary": [ + {"pin_a": "GP28", "pin_b": "GP27"}, + {"pin_a": "GP3", "pin_b": "GP4"} + ] + }, \ No newline at end of file diff --git a/keyboards/shorty/rules.mk b/keyboards/shorty/rules.mk new file mode 100644 index 000000000000..a2fe82f8e167 --- /dev/null +++ b/keyboards/shorty/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +ENCODER_ENABLE = yes + +# ENCODER_MAP_ENABLE = yes \ No newline at end of file From e7ea9c4c05ad24665cfc3982a57a67cf0f2c6e4c Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 31 Oct 2024 20:25:58 +0530 Subject: [PATCH 2/7] suggested changes shorty0 --- keyboards/shorty/keyboard.json | 73 +++++++++-------------- keyboards/shorty/keymaps/default/keymap.c | 9 --- keyboards/shorty/readme.md | 20 ++----- keyboards/shorty/rules.mk | 4 -- 4 files changed, 34 insertions(+), 72 deletions(-) delete mode 100644 keyboards/shorty/rules.mk diff --git a/keyboards/shorty/keyboard.json b/keyboards/shorty/keyboard.json index 2c43c9425cbf..46c68aa0428d 100644 --- a/keyboards/shorty/keyboard.json +++ b/keyboards/shorty/keyboard.json @@ -4,36 +4,24 @@ "maintainer": "hawtkeys", "bootloader": "rp2040", "diode_direction": "ROW2COL", + "encoder": { + "rotary": [ + {"pin_a": "GP28", "pin_b": "GP27"}, + {"pin_a": "GP3", "pin_b": "GP4"} + ] + }, "features": { "bootmagic": true, - "command": true, - "console": true, + "command": false, + "console": false, + "encoder": true, "extrakey": true, "mousekey": true, "nkro": true - }, - "encoder": { - "rotary": [ - {"pin_a": "GP28", "pin_b": "GP27"}, - {"pin_a": "GP3", "pin_b": "GP4"} - ] }, "matrix_pins": { - "custom_lite":false, - "cols":[ - "GP14", - "GP13", - "GP12", - null, - null - ], - "rows":[ - "GP11", - "GP10", - "GP9", - "GP29", - "GP2" - ] + "cols": ["GP14", "GP13", "GP12", null, null], + "rows": ["GP11", "GP10", "GP9", "GP29", "GP2"] }, "processor": "RP2040", "url": "", @@ -45,27 +33,22 @@ "layouts": { "LAYOUT": { "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0}, - {"matrix": [0, 1], "x": 1, "y": 0}, - {"matrix": [0, 2], "x": 2, "y": 0}, - - {"matrix": [1, 0], "x": 0, "y": 1}, - {"matrix": [1, 1], "x": 1, "y": 1}, - {"matrix": [1, 2], "x": 2, "y": 1}, - - {"matrix": [2, 0], "x": 0, "y": 2}, - {"matrix": [2, 1], "x": 1, "y": 2}, - {"matrix": [2, 2], "x": 2, "y": 2}, - - {"matrix": [3, 0], "x": 0, "y": 3}, - {"matrix": [3, 1], "x": 1, "y": 3}, - {"matrix": [3, 2], "x": 2, "y": 3}, - - {"matrix": [4, 0], "x": 0, "y": 4}, - {"matrix": [4, 1], "x": 1, "y": 4}, - {"matrix": [4, 2], "x": 2, "y": 4} - - ] + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4}, + {"matrix": [4, 1], "x": 1, "y": 4}, + {"matrix": [4, 2], "x": 2, "y": 4} + ] } } -} \ No newline at end of file +} diff --git a/keyboards/shorty/keymaps/default/keymap.c b/keyboards/shorty/keymaps/default/keymap.c index 7b402ced58cb..efdf56864255 100644 --- a/keyboards/shorty/keymaps/default/keymap.c +++ b/keyboards/shorty/keymaps/default/keymap.c @@ -7,15 +7,6 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { // Encoder 1 Encoder 2 }; #endif - -/* void keyboard_post_init_user(void) { - // Customise these values to desired behaviour - debug_enable=true; - debug_matrix=true; -// debug_keyboard=true; -// debug_mouse=true; - -} */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( KC_P7, KC_P8, KC_P9, diff --git a/keyboards/shorty/readme.md b/keyboards/shorty/readme.md index 32bfde377508..23f023b92ced 100644 --- a/keyboards/shorty/readme.md +++ b/keyboards/shorty/readme.md @@ -1,12 +1,12 @@ -# shorty +# Shorty Zero -![shorty](imgur.com image replace me!) +![Shorty Zero by hawtkeys.com](https://i.imgur.com/hoMHYLW.png) -*A short description of the keyboard/project* +The Shorty Zero is a 3x3 customizable macropad designed for productivity, gaming, and creative workflows, featuring programmable keys and rotary knobs. * Keyboard Maintainer: [Hawtkeys](https://github.com/hawtkeys) -* Hardware Supported: *The PCBs, controllers supported* -* Hardware Availability: *Links to where you can find this hardware* +* Hardware Supported: Raspberry Pi Pico, Hawtkeys Shorty Zero PCB +* Hardware Availability: [Available @ hawtkeys.com](https://hawtkeys.com) Make example for this keyboard (after setting up your build environment): @@ -24,12 +24,4 @@ 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 - - - "encoder": { - "rotary": [ - {"pin_a": "GP28", "pin_b": "GP27"}, - {"pin_a": "GP3", "pin_b": "GP4"} - ] - }, \ No newline at end of file +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available \ No newline at end of file diff --git a/keyboards/shorty/rules.mk b/keyboards/shorty/rules.mk deleted file mode 100644 index a2fe82f8e167..000000000000 --- a/keyboards/shorty/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -VIA_ENABLE = yes -ENCODER_ENABLE = yes - -# ENCODER_MAP_ENABLE = yes \ No newline at end of file From 3c75854da0ef3c71255cf052d92f2b9b4a8b8271 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 1 Nov 2024 15:38:31 +0530 Subject: [PATCH 3/7] fixed matrix pins and layout --- keyboards/shorty/keyboard.json | 10 +++------- keyboards/shorty/keymaps/default/keymap.c | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/keyboards/shorty/keyboard.json b/keyboards/shorty/keyboard.json index 46c68aa0428d..3cfd728a4765 100644 --- a/keyboards/shorty/keyboard.json +++ b/keyboards/shorty/keyboard.json @@ -20,7 +20,7 @@ "nkro": true }, "matrix_pins": { - "cols": ["GP14", "GP13", "GP12", null, null], + "cols": ["GP14", "GP13", "GP12", null], "rows": ["GP11", "GP10", "GP9", "GP29", "GP2"] }, "processor": "RP2040", @@ -42,12 +42,8 @@ {"matrix": [2, 0], "x": 0, "y": 2}, {"matrix": [2, 1], "x": 1, "y": 2}, {"matrix": [2, 2], "x": 2, "y": 2}, - {"matrix": [3, 0], "x": 0, "y": 3}, - {"matrix": [3, 1], "x": 1, "y": 3}, - {"matrix": [3, 2], "x": 2, "y": 3}, - {"matrix": [4, 0], "x": 0, "y": 4}, - {"matrix": [4, 1], "x": 1, "y": 4}, - {"matrix": [4, 2], "x": 2, "y": 4} + {"matrix": [3, 3], "x": 0, "y": 3}, + {"matrix": [4, 3], "x": 1, "y": 3} ] } } diff --git a/keyboards/shorty/keymaps/default/keymap.c b/keyboards/shorty/keymaps/default/keymap.c index efdf56864255..9cbf1ccb0d71 100644 --- a/keyboards/shorty/keymaps/default/keymap.c +++ b/keyboards/shorty/keymaps/default/keymap.c @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_P7, KC_P8, KC_P9, KC_P4, KC_P5, KC_P6, KC_P1, KC_P2, KC_P3, - KC_A, KC_NO, KC_NO, // encoder button1 - KC_D, KC_NO, KC_NO // encoder button2 + KC_A, // encoder button1 + KC_D // encoder button2 ) }; From 8e10697d65b4f071ea4c1717d5a3e838119c73ff Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 3 Nov 2024 23:07:50 +0530 Subject: [PATCH 4/7] updated keymap with fixing PCB issues --- keyboards/shorty/keyboard.json | 24 +++++++++++------------ keyboards/shorty/keymaps/default/keymap.c | 6 ++---- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/keyboards/shorty/keyboard.json b/keyboards/shorty/keyboard.json index 3cfd728a4765..d14493409472 100644 --- a/keyboards/shorty/keyboard.json +++ b/keyboards/shorty/keyboard.json @@ -20,7 +20,7 @@ "nkro": true }, "matrix_pins": { - "cols": ["GP14", "GP13", "GP12", null], + "cols": ["GP14", "GP13", "GP12"], "rows": ["GP11", "GP10", "GP9", "GP29", "GP2"] }, "processor": "RP2040", @@ -33,17 +33,17 @@ "layouts": { "LAYOUT": { "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0}, - {"matrix": [0, 1], "x": 1, "y": 0}, - {"matrix": [0, 2], "x": 2, "y": 0}, - {"matrix": [1, 0], "x": 0, "y": 1}, - {"matrix": [1, 1], "x": 1, "y": 1}, - {"matrix": [1, 2], "x": 2, "y": 1}, - {"matrix": [2, 0], "x": 0, "y": 2}, - {"matrix": [2, 1], "x": 1, "y": 2}, - {"matrix": [2, 2], "x": 2, "y": 2}, - {"matrix": [3, 3], "x": 0, "y": 3}, - {"matrix": [4, 3], "x": 1, "y": 3} + {"matrix": [3, 0], "x": 0, "y": 0}, + {"matrix": [4, 0], "x": 1, "y": 1}, + {"matrix": [0, 0], "x": 0, "y": 2}, + {"matrix": [0, 1], "x": 1, "y": 2}, + {"matrix": [0, 2], "x": 2, "y": 2}, + {"matrix": [1, 0], "x": 0, "y": 3}, + {"matrix": [1, 1], "x": 1, "y": 3}, + {"matrix": [1, 2], "x": 2, "y": 3}, + {"matrix": [2, 0], "x": 0, "y": 4}, + {"matrix": [2, 1], "x": 1, "y": 4}, + {"matrix": [2, 2], "x": 2, "y": 4} ] } } diff --git a/keyboards/shorty/keymaps/default/keymap.c b/keyboards/shorty/keymaps/default/keymap.c index 9cbf1ccb0d71..42d5cdf5ed11 100644 --- a/keyboards/shorty/keymaps/default/keymap.c +++ b/keyboards/shorty/keymaps/default/keymap.c @@ -4,15 +4,13 @@ #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_DOWN,KC_MS_WH_UP) } - // Encoder 1 Encoder 2 }; #endif const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( + KC_A, KC_D, KC_P7, KC_P8, KC_P9, KC_P4, KC_P5, KC_P6, - KC_P1, KC_P2, KC_P3, - KC_A, // encoder button1 - KC_D // encoder button2 + KC_P1, KC_P2, KC_P3 ) }; From 5514907a971e5d2f32eb21349293ab452e07ee81 Mon Sep 17 00:00:00 2001 From: Akshay <32840608+axshae@users.noreply.github.com> Date: Mon, 4 Nov 2024 03:43:51 +0530 Subject: [PATCH 5/7] Update keyboards/shorty/keyboard.json Co-authored-by: Joel Challis --- keyboards/shorty/keyboard.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/keyboards/shorty/keyboard.json b/keyboards/shorty/keyboard.json index d14493409472..568f667b5558 100644 --- a/keyboards/shorty/keyboard.json +++ b/keyboards/shorty/keyboard.json @@ -34,16 +34,16 @@ "LAYOUT": { "layout": [ {"matrix": [3, 0], "x": 0, "y": 0}, - {"matrix": [4, 0], "x": 1, "y": 1}, - {"matrix": [0, 0], "x": 0, "y": 2}, - {"matrix": [0, 1], "x": 1, "y": 2}, - {"matrix": [0, 2], "x": 2, "y": 2}, - {"matrix": [1, 0], "x": 0, "y": 3}, - {"matrix": [1, 1], "x": 1, "y": 3}, - {"matrix": [1, 2], "x": 2, "y": 3}, - {"matrix": [2, 0], "x": 0, "y": 4}, - {"matrix": [2, 1], "x": 1, "y": 4}, - {"matrix": [2, 2], "x": 2, "y": 4} + {"matrix": [4, 0], "x": 2, "y": 0}, + {"matrix": [0, 0], "x": 0, "y": 1}, + {"matrix": [0, 1], "x": 1, "y": 1}, + {"matrix": [0, 2], "x": 2, "y": 1}, + {"matrix": [1, 0], "x": 0, "y": 2}, + {"matrix": [1, 1], "x": 1, "y": 2}, + {"matrix": [1, 2], "x": 2, "y": 2}, + {"matrix": [2, 0], "x": 0, "y": 3}, + {"matrix": [2, 1], "x": 1, "y": 3}, + {"matrix": [2, 2], "x": 2, "y": 3} ] } } From 86f64c66e355c4ae5e315671fe4219a9708e6324 Mon Sep 17 00:00:00 2001 From: Akshay <32840608+axshae@users.noreply.github.com> Date: Mon, 4 Nov 2024 04:02:40 +0530 Subject: [PATCH 6/7] Update keyboards/shorty/keyboard.json Co-authored-by: Joel Challis --- keyboards/shorty/keyboard.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/keyboards/shorty/keyboard.json b/keyboards/shorty/keyboard.json index 568f667b5558..158648badd42 100644 --- a/keyboards/shorty/keyboard.json +++ b/keyboards/shorty/keyboard.json @@ -12,8 +12,6 @@ }, "features": { "bootmagic": true, - "command": false, - "console": false, "encoder": true, "extrakey": true, "mousekey": true, From f64ee87458d58cd882cfc5ee6a63b7cc034a2dfb Mon Sep 17 00:00:00 2001 From: Akshay <32840608+axshae@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:13:30 +0530 Subject: [PATCH 7/7] Update keyboards/shorty/keymaps/default/keymap.c Co-authored-by: Ryan --- keyboards/shorty/keymaps/default/keymap.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/keyboards/shorty/keymaps/default/keymap.c b/keyboards/shorty/keymaps/default/keymap.c index 42d5cdf5ed11..ef4bbba7ef01 100644 --- a/keyboards/shorty/keymaps/default/keymap.c +++ b/keyboards/shorty/keymaps/default/keymap.c @@ -1,11 +1,7 @@ // Copyright 2023 QMK // SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H -#if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_DOWN,KC_MS_WH_UP) } -}; -#endif + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( KC_A, KC_D, @@ -14,3 +10,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_P1, KC_P2, KC_P3 ) }; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(MS_WHLD, MS_WHLU) } +}; +#endif