From 8b62218cb5606caacd85d869e3d13272b9d76811 Mon Sep 17 00:00:00 2001 From: Farshad Dashti Date: Sun, 25 May 2025 00:09:16 +0100 Subject: [PATCH 1/2] - Updated the RGB Matrix to include missing LEDs - Added CAPS and NUM RGB indicators to the Galaxy100.c - Also Includes fixes for VIA support and knob mapping support in VIA --- .gitignore | 1 + config.h | 3 +- galaxy100.c | 18 +- keyboard.json | 22 +- keyboard_via.json | 338 ++++++++++++++++++++++ keymap.c => keymaps/default/keymap.c | 2 +- keymaps/default/rules.mk | 2 + readme.md | 12 +- rgb_record.c => rgb_record/rgb_record.c | 0 rgb_record.h => rgb_record/rgb_record.h | 0 rgb_record.mk => rgb_record/rgb_record.mk | 0 rules.mk | 2 + 12 files changed, 388 insertions(+), 12 deletions(-) create mode 100644 .gitignore create mode 100644 keyboard_via.json rename keymap.c => keymaps/default/keymap.c (99%) create mode 100644 keymaps/default/rules.mk rename rgb_record.c => rgb_record/rgb_record.c (100%) rename rgb_record.h => rgb_record/rgb_record.h (100%) rename rgb_record.mk => rgb_record/rgb_record.mk (100%) create mode 100644 rules.mk diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85e7c1d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.idea/ diff --git a/config.h b/config.h index 82783ca..cabbc7a 100644 --- a/config.h +++ b/config.h @@ -17,7 +17,8 @@ /* Status Indicator Lamp */ #define HS_RGB_INDEX_CAPS 47 -#define HS_RGB_INDEX_WIN_LOCK 70 +#define HS_RGB_INDEX_NUM 70 +//#define HS_RGB_INDEX_WIN_LOCK 71 #define HS_RGB_BLINK_INDEX_VAI 5 #define HS_RGB_BLINK_INDEX_VAD 6 #define HS_RGB_BLINK_INDEX_SPI 7 diff --git a/galaxy100.c b/galaxy100.c index b35a6ac..8971267 100644 --- a/galaxy100.c +++ b/galaxy100.c @@ -806,14 +806,18 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { ee_clr_timer = 0; } - if (host_keyboard_led_state().caps_lock) + if (host_keyboard_led_state().caps_lock){ rgb_matrix_set_color(HS_RGB_INDEX_CAPS, 0x20, 0x20, 0x20); - else - rgb_matrix_set_color(HS_RGB_INDEX_CAPS, RGB_BLACK); - if (!keymap_is_mac_system() && keymap_config.no_gui) - rgb_matrix_set_color(HS_RGB_INDEX_WIN_LOCK, 0x20, 0x20, 0x20); - else - rgb_matrix_set_color(HS_RGB_INDEX_WIN_LOCK, RGB_BLACK); + } + + if (host_keyboard_led_state().num_lock){ + rgb_matrix_set_color(HS_RGB_INDEX_NUM, 0x20, 0x20, 0x20); + } + + // if (!keymap_is_mac_system() && keymap_config.no_gui) + // rgb_matrix_set_color(HS_RGB_INDEX_WIN_LOCK, 0x20, 0x20, 0x20); + // else + // rgb_matrix_set_color(HS_RGB_INDEX_WIN_LOCK, RGB_BLACK); rgb_matrix_hs_indicator(); diff --git a/keyboard.json b/keyboard.json index 5296eda..9e86e5b 100644 --- a/keyboard.json +++ b/keyboard.json @@ -108,17 +108,26 @@ }, "driver": "ws2812", "layout": [ + {"matrix": [5, 18], "x": 64, "y": 223, "flags": 4}, {"matrix": [5, 17], "x": 64, "y": 211, "flags": 4}, {"matrix": [5, 16], "x": 64, "y": 198, "flags": 4}, + {"matrix": [5, 15], "x": 64, "y": 186, "flags": 4}, {"matrix": [5, 14], "x": 64, "y": 174, "flags": 4}, + {"matrix": [5, 13], "x": 64, "y": 161, "flags": 4}, {"matrix": [5, 12], "x": 64, "y": 149, "flags": 4}, {"matrix": [5, 11], "x": 64, "y": 136, "flags": 4}, {"matrix": [5, 10], "x": 64, "y": 124, "flags": 4}, {"matrix": [5, 9], "x": 64, "y": 112, "flags": 4}, + {"matrix": [5, 8], "x": 64, "y": 99, "flags": 4}, + {"matrix": [5, 7], "x": 64, "y": 87, "flags": 4}, + {"matrix": [5, 6], "x": 64, "y": 74, "flags": 4}, {"matrix": [5, 5], "x": 64, "y": 62, "flags": 4}, + {"matrix": [5, 4], "x": 64, "y": 50, "flags": 4}, + {"matrix": [5, 3], "x": 64, "y": 37, "flags": 4}, {"matrix": [5, 2], "x": 64, "y": 25, "flags": 4}, {"matrix": [5, 1], "x": 64, "y": 12, "flags": 4}, {"matrix": [5, 0], "x": 64, "y": 0, "flags": 4}, + {"matrix": [4, 0], "x": 51, "y": 0, "flags": 4}, {"matrix": [4, 1], "x": 51, "y": 12, "flags": 4}, {"matrix": [4, 2], "x": 51, "y": 25, "flags": 4}, @@ -132,14 +141,19 @@ {"matrix": [4, 10], "x": 51, "y": 124, "flags": 4}, {"matrix": [4, 11], "x": 51, "y": 136, "flags": 4}, {"matrix": [4, 12], "x": 51, "y": 149, "flags": 4}, + {"matrix": [4, 13], "x": 51, "y": 161, "flags": 4}, + {"matrix": [4, 14], "x": 51, "y": 174, "flags": 4}, {"matrix": [4, 15], "x": 51, "y": 186, "flags": 4}, {"matrix": [4, 16], "x": 51, "y": 198, "flags": 4}, {"matrix": [4, 17], "x": 51, "y": 211, "flags": 4}, {"matrix": [4, 18], "x": 51, "y": 223, "flags": 4}, + + {"matrix": [3, 18], "x": 38, "y": 223, "flags": 4}, {"matrix": [3, 17], "x": 38, "y": 211, "flags": 4}, {"matrix": [3, 16], "x": 38, "y": 198, "flags": 4}, {"matrix": [3, 15], "x": 38, "y": 186, "flags": 4}, {"matrix": [3, 14], "x": 38, "y": 174, "flags": 4}, + {"matrix": [3, 13], "x": 38, "y": 161, "flags": 4}, {"matrix": [3, 12], "x": 38, "y": 149, "flags": 4}, {"matrix": [3, 11], "x": 38, "y": 136, "flags": 4}, {"matrix": [3, 10], "x": 38, "y": 124, "flags": 4}, @@ -153,6 +167,7 @@ {"matrix": [3, 2], "x": 38, "y": 25, "flags": 4}, {"matrix": [3, 1], "x": 38, "y": 12, "flags": 4}, {"matrix": [3, 0], "x": 38, "y": 0, "flags": 4}, + {"matrix": [2, 0], "x": 26, "y": 0, "flags": 4}, {"matrix": [2, 1], "x": 26, "y": 12, "flags": 4}, {"matrix": [2, 2], "x": 26, "y": 25, "flags": 4}, @@ -172,6 +187,7 @@ {"matrix": [2, 16], "x": 26, "y": 198, "flags": 4}, {"matrix": [2, 17], "x": 26, "y": 211, "flags": 4}, {"matrix": [2, 18], "x": 26, "y": 223, "flags": 4}, + {"matrix": [1, 18], "x": 13, "y": 223, "flags": 4}, {"matrix": [1, 17], "x": 13, "y": 211, "flags": 4}, {"matrix": [1, 16], "x": 13, "y": 198, "flags": 4}, @@ -191,7 +207,9 @@ {"matrix": [1, 2], "x": 13, "y": 25, "flags": 4}, {"matrix": [1, 1], "x": 13, "y": 12, "flags": 4}, {"matrix": [1, 0], "x": 13, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 0, "y": 12, "flags": 4}, {"matrix": [0, 2], "x": 0, "y": 25, "flags": 4}, {"matrix": [0, 3], "x": 0, "y": 37, "flags": 4}, {"matrix": [0, 4], "x": 0, "y": 50, "flags": 4}, @@ -208,7 +226,7 @@ {"matrix": [0, 15], "x": 0, "y": 186, "flags": 4}, {"matrix": [0, 16], "x": 0, "y": 198, "flags": 4}, {"matrix": [0, 17], "x": 0, "y": 211, "flags": 4}, - {"matrix": [0, 18], "x": 0, "y": 223, "flags": 4}, + {"matrix": [0, 18], "x": 0, "y": 223, "flags": 4} ], "max_brightness": 150, "val_steps": 30, @@ -340,4 +358,4 @@ ] } } -} +} \ No newline at end of file diff --git a/keyboard_via.json b/keyboard_via.json new file mode 100644 index 0000000..d23e95c --- /dev/null +++ b/keyboard_via.json @@ -0,0 +1,338 @@ +{ + "name": "galaxy 100", + "vendorId": "0x342d", + "productId": "0xe489", + "keycodes": ["qmk_lighting"], + "menus": [ + { + "label": "Lighting", + "content": [ + { + "label": "Backlight", + "content": [ + { + "label": "Brightness", + "type": "range", + "options": [0, 255], + "content": ["id_qmk_rgb_matrix_brightness", 3, 1] + }, + { + "label": "Effect", + "type": "dropdown", + "content": ["id_qmk_rgb_matrix_effect", 3, 2], + "options": [ + ["All Off", 0], + ["Alphas Mods", 1], + ["Band Pinwheel Sat", 2], + ["Band Pinwheel Val", 3], + ["Band Sat", 4], + ["Band Spiral Sat", 5], + ["Band Spiral Val", 6], + ["Band Val", 7], + ["Breathing", 8], + ["Cycle All", 9], + ["Cycle Left Right", 10], + ["Cycle Out In", 11], + ["Cycle Out In Dual", 12], + ["Cycle Pinwheel", 13], + ["Cycle Spiral", 14], + ["Cycle Up Down", 15], + ["Digital Rain", 16], + ["Dual Beacon", 17], + ["Gradient Left Right", 18], + ["Gradient Up Down", 19], + ["Hue Breathing", 20], + ["Hue Pendulum", 21], + ["Hue Wave", 22], + ["Jellybean Raindrops", 23], + ["Multisplash", 24], + ["Pixel Flow", 25], + ["Pixel Fractal", 26], + ["Pixel Rain", 27], + ["Rainbow Beacon", 28], + ["Rainbow Moving Chevron", 29], + ["Rainbow Pinwheels", 30], + ["Raindrops", 31], + ["Solid Color", 32], + ["Solid Multisplash", 33], + ["Solid Reactive", 34], + ["Solid Reactive Cross", 35], + ["Solid Reactive Multicross", 36], + ["Solid Reactive Multinexus", 37], + ["Solid Reactive Multiwide", 38], + ["Solid Reactive Nexus", 39], + ["Solid Reactive Simple", 40], + ["Solid Reactive Wide", 41], + ["Solid Splash", 42], + ["Splash", 43], + ["Typing Heatmap", 44] + ] + }, + { + "showIf": "{id_qmk_rgb_matrix_effect} != 0", + "label": "Effect Speed", + "type": "range", + "options": [0, 255], + "content": ["id_qmk_rgb_matrix_effect_speed", 3, 3] + }, + { + "showIf": "{id_qmk_rgb_matrix_effect} != 0 && {id_qmk_rgb_matrix_effect} != 24 && {id_qmk_rgb_matrix_effect} != 28 && {id_qmk_rgb_matrix_effect} != 29 && {id_qmk_rgb_matrix_effect} != 32", + "label": "Color", + "type": "color", + "content": ["id_qmk_rgb_matrix_color", 3, 4] + } + ] + } + ] + } + ], + "matrix": {"rows": 6, "cols": 19}, + "customKeycodes": [ + {"name": "BT DEV1","title": "BT Device 1","shortName": "DEV1"}, + {"name": "BT DEV2","title": "BT Device 2","shortName": "DEV2"}, + {"name": "BT DEV3","title": "BT Device 3","shortName": "DEV3"}, + {"name": "2.4G","title": "2.4G","shortName": "DEV 2.4G"}, + {"name": "USB","title": "USB","shortName": "DEV USB"} + ], + "layouts": { + "keymap":[ + [ + { + "y": 0.25, + "c": "#777777" + }, + "0,0", + { + "x": 1, + "c": "#cccccc" + }, + "0,2", + "0,3", + "0,4", + "0,5", + { + "x": 0.5 + }, + "0,6", + "0,7", + "0,8", + "0,9", + { + "x": 0.5 + }, + "0,10", + "0,11", + "0,12", + "0,13", + { + "x": 0.25 + }, + "0,14", + { + "x": 0.25 + }, + "0,15", + "0,16", + "0,17", + "0,18\n\n\n\n\n\n\n\n\ne0" + ], + [ + { + "y": 0.25, + "c": "#777777" + }, + "1,0", + { + "c": "#cccccc" + }, + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + "1,11", + "1,12", + { + "c": "#aaaaaa", + "w": 2 + }, + "1,13", + { + "x": 0.25, + "c": "#cccccc" + }, + "1,14", + { + "x": 0.25 + }, + "1,15", + "1,16", + "1,17", + "1,18" + ], + [ + { + "c": "#aaaaaa", + "w": 1.5 + }, + "2,0", + { + "c": "#cccccc" + }, + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11", + "2,12", + { + "w": 1.5 + }, + "2,13", + { + "x": 0.25 + }, + "2,14", + { + "x": 0.25 + }, + "2,15", + "2,16", + "2,17", + { + "h": 2 + }, + "2,18" + ], + [ + { + "c": "#aaaaaa", + "w": 1.75 + }, + "3,0", + { + "c": "#cccccc" + }, + "3,1", + "3,2", + "3,3", + "3,4", + "3,5", + "3,6", + "3,7", + "3,8", + "3,9", + "3,10", + "3,11", + { + "c": "#777777", + "w": 2.25 + }, + "3,12", + { + "x": 0.25, + "c": "#cccccc" + }, + "3,14", + { + "x": 0.25 + }, + "3,15", + "3,16", + "3,17" + ], + [ + { + "c": "#aaaaaa", + "w": 2.25 + }, + "4,0", + { + "c": "#cccccc" + }, + "4,1", + "4,2", + "4,3", + "4,4", + "4,5", + "4,6", + "4,7", + "4,8", + "4,9", + "4,10", + { + "c": "#aaaaaa", + "w": 1.75 + }, + "4,11", + { + "c": "#cccccc" + }, + "4,12", + { + "x": 1.5 + }, + "4,15", + "4,16", + "4,17", + { + "h": 2 + }, + "4,18" + ], + [ + { + "c": "#aaaaaa", + "w": 1.25 + }, + "5,0", + { + "w": 1.25 + }, + "5,1", + { + "w": 1.25 + }, + "5,2", + { + "c": "#cccccc", + "w": 6.25 + }, + "5,5", + { + "c": "#aaaaaa", + "w": 1.25 + }, + "5,9", + { + "w": 1.25 + }, + "5,10", + { + "x": 0.5, + "c": "#cccccc" + }, + "5,11", + "5,12", + "5,14", + { + "x": 0.5, + "w": 2 + }, + "5,16", + "5,17" + ] + ] + } +} diff --git a/keymap.c b/keymaps/default/keymap.c similarity index 99% rename from keymap.c rename to keymaps/default/keymap.c index ef86887..722a0c7 100644 --- a/keymap.c +++ b/keymaps/default/keymap.c @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, TO(_BL), KC_NO, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, MO(_FBL), KC_SCLN, KC_QUOT, RGB_MOD, KC_PGDN, KC_P4, KC_P5, KC_P6, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, _______, RGB_SPD, RGB_VAD, RGB_SPI, KC_P0, KC_PDOT ), - [_FBL] = LAYOUT( /* Base */ + [_FBL] = LAYOUT( /* Base */ QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keymaps/default/rules.mk b/keymaps/default/rules.mk new file mode 100644 index 0000000..715838e --- /dev/null +++ b/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +ENCODER_MAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/readme.md b/readme.md index af2f994..0da705c 100644 --- a/readme.md +++ b/readme.md @@ -16,6 +16,16 @@ To reset the board into bootloader mode, do one of the following: * Hold the Reset switch mounted on the bottom side of the PCB while connecting the USB cable * Hold the Escape key while connecting the USB cable (also erases persistent settings) -* Fn+R_Shift+Esc will reset the board to bootloader mode if you have flashed the default QMK keymap +* Fn+L+Esc will reset the board to bootloader mode if you have flashed the default QMK keymap +* Exit bootloader mode (if bootloader does not exit automatically in CLI): `wb32-dfu-updater_cli --reset` + 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). + +--- + +* Updated: 2025-04-27 +* Fixes: + - VIA compatibility added in `keymaps/default/rules.mk` + - Rotary encoder programming enabled in `keymaps/default/rules.mk` + - Provide correct key combination to enter bootloader mode after flashing QMK firmware diff --git a/rgb_record.c b/rgb_record/rgb_record.c similarity index 100% rename from rgb_record.c rename to rgb_record/rgb_record.c diff --git a/rgb_record.h b/rgb_record/rgb_record.h similarity index 100% rename from rgb_record.h rename to rgb_record/rgb_record.h diff --git a/rgb_record.mk b/rgb_record/rgb_record.mk similarity index 100% rename from rgb_record.mk rename to rgb_record/rgb_record.mk diff --git a/rules.mk b/rules.mk new file mode 100644 index 0000000..715838e --- /dev/null +++ b/rules.mk @@ -0,0 +1,2 @@ +ENCODER_MAP_ENABLE = yes +VIA_ENABLE = yes From 3fa5ced09886e6274849691f4dd1a12b31172b68 Mon Sep 17 00:00:00 2001 From: Farshad Dashti Date: Sun, 25 May 2025 00:19:29 +0100 Subject: [PATCH 2/2] Updated the documentation --- readme.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/readme.md b/readme.md index 0da705c..fd13784 100644 --- a/readme.md +++ b/readme.md @@ -29,3 +29,8 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to - VIA compatibility added in `keymaps/default/rules.mk` - Rotary encoder programming enabled in `keymaps/default/rules.mk` - Provide correct key combination to enter bootloader mode after flashing QMK firmware + +* Updated: 2025-05-25 +* Fixes: + - Added missing RGB Matrix mapping to the `keyboard.json` + - Added missing CAPS and NUM status indicator logic in `galaxy100.c`