From 72dda1482f7a85d91c4bde3d5df21ceba98d9dfb Mon Sep 17 00:00:00 2001 From: Marco Pelegrini Date: Sat, 23 Nov 2024 17:08:52 -0800 Subject: [PATCH] Optional layout with backlit --- keyboards/marcopad/keyboard.json | 8 +------ keyboards/marcopad/keymaps/backlit/keymap.c | 26 +++++++++++++++++++++ keyboards/marcopad/keymaps/backlit/rules.mk | 5 ++++ keyboards/marcopad/keymaps/default/keymap.c | 5 ---- 4 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 keyboards/marcopad/keymaps/backlit/keymap.c create mode 100644 keyboards/marcopad/keymaps/backlit/rules.mk diff --git a/keyboards/marcopad/keyboard.json b/keyboards/marcopad/keyboard.json index d8fe02f283fd..8f70ffd42fde 100644 --- a/keyboards/marcopad/keyboard.json +++ b/keyboards/marcopad/keyboard.json @@ -6,13 +6,7 @@ "diode_direction": "ROW2COL", "features": { "bootmagic": true, - "rgblight": true, - "combo": true, - "command": false, - "console": false, - "extrakey": false, - "mousekey": false, - "nkro": false + "rgblight": false }, "matrix_pins": { "cols": ["GP4", "GP26", "GP27"], diff --git a/keyboards/marcopad/keymaps/backlit/keymap.c b/keyboards/marcopad/keymaps/backlit/keymap.c new file mode 100644 index 000000000000..f3c0abf18f15 --- /dev/null +++ b/keyboards/marcopad/keymaps/backlit/keymap.c @@ -0,0 +1,26 @@ +// Copyright (c) 2022 Marco Pelegrini +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┐ + * │ 7 │ 8 │ 9 │ + * ├───┼───┼───┤ + * │ 4 │ 5 │ 6 │ + * ├───┼───┼───┤ + * │ 1 │ 2 │ 3 │ + * └───┴───┴───┘ + */ + [0] = LAYOUT_ortho_3x3( + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3 + ) +}; + +const uint16_t PROGMEM backlight_combo[] = {KC_P7, KC_P8, COMBO_END}; +combo_t key_combos[] = { + COMBO(backlight_combo, UG_NEXT) +}; \ No newline at end of file diff --git a/keyboards/marcopad/keymaps/backlit/rules.mk b/keyboards/marcopad/keymaps/backlit/rules.mk new file mode 100644 index 000000000000..8d55028b7fc5 --- /dev/null +++ b/keyboards/marcopad/keymaps/backlit/rules.mk @@ -0,0 +1,5 @@ +# Copyright (c) 2022 Marco Pelegrini +# SPDX-License-Identifier: GPL-2.0-or-later + +RGBLIGHT_ENABLE = yes +COMBO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/marcopad/keymaps/default/keymap.c b/keyboards/marcopad/keymaps/default/keymap.c index f3c0abf18f15..bfbc091eaf2b 100644 --- a/keyboards/marcopad/keymaps/default/keymap.c +++ b/keyboards/marcopad/keymaps/default/keymap.c @@ -18,9 +18,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_P4, KC_P5, KC_P6, KC_P1, KC_P2, KC_P3 ) -}; - -const uint16_t PROGMEM backlight_combo[] = {KC_P7, KC_P8, COMBO_END}; -combo_t key_combos[] = { - COMBO(backlight_combo, UG_NEXT) }; \ No newline at end of file