From 5bb3ef83fc6a13c2b96d8aadd305e69be7f6216c Mon Sep 17 00:00:00 2001 From: villeramassana Date: Sun, 17 Sep 2023 14:27:06 +0200 Subject: [PATCH 1/9] 4x4 handwired new 4x4 hanwired keyboard --- keyboards/handwired/illera16/info.json | 48 +++++++ .../illera16/keymaps/default/keymap.c | 124 +++++++++++++++++ .../handwired/illera16/keymaps/vial/config.h | 40 ++++++ .../handwired/illera16/keymaps/vial/keymap.c | 131 ++++++++++++++++++ .../handwired/illera16/keymaps/vial/rules.mk | 10 ++ keyboards/handwired/illera16/readme.md | 27 ++++ keyboards/handwired/illera16/rules.mk | 3 + 7 files changed, 383 insertions(+) create mode 100644 keyboards/handwired/illera16/info.json create mode 100644 keyboards/handwired/illera16/keymaps/default/keymap.c create mode 100644 keyboards/handwired/illera16/keymaps/vial/config.h create mode 100644 keyboards/handwired/illera16/keymaps/vial/keymap.c create mode 100644 keyboards/handwired/illera16/keymaps/vial/rules.mk create mode 100644 keyboards/handwired/illera16/readme.md create mode 100644 keyboards/handwired/illera16/rules.mk diff --git a/keyboards/handwired/illera16/info.json b/keyboards/handwired/illera16/info.json new file mode 100644 index 000000000000..d56d5874143b --- /dev/null +++ b/keyboards/handwired/illera16/info.json @@ -0,0 +1,48 @@ +{ + "manufacturer": "victor_illera", + "keyboard_name": "illera16", + "maintainer": "villeramassana", + "bootloader": "caterina", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["D4", "C6", "D7", "E6"], + "rows": ["F4", "F5", "F6", "F7"] + }, + "processor": "atmega32u4", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_ortho_4x4": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [1, 0], "x": 0, "y": 1 }, + { "matrix": [1, 1], "x": 1, "y": 1 }, + { "matrix": [1, 2], "x": 2, "y": 1 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [2, 0], "x": 0, "y": 2 }, + { "matrix": [2, 1], "x": 1, "y": 2 }, + { "matrix": [2, 2], "x": 2, "y": 2 }, + { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [3, 0], "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 1, "y": 3 }, + { "matrix": [3, 2], "x": 2, "y": 3 }, + { "matrix": [3, 3], "x": 3, "y": 3 } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/illera16/keymaps/default/keymap.c b/keyboards/handwired/illera16/keymaps/default/keymap.c new file mode 100644 index 000000000000..f6358d795d32 --- /dev/null +++ b/keyboards/handwired/illera16/keymaps/default/keymap.c @@ -0,0 +1,124 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +#define _BASE 0 +#define _CAPA1 1 +#define _CAPA2 2 +#define _CAPA3 3 +#define _CAPA4 4 +#define _CAPA5 5 + +layer_state_t layer_state_set_user(layer_state_t state); + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + layer_state_set_user(layer_state); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t layer = biton32(state); + switch (layer) { + case _CAPA1: + rgblight_sethsv_noeeprom(HSV_YELLOW); + break; + + case _CAPA2: + rgblight_sethsv_noeeprom(HSV_RED); + break; + + case _CAPA3: + rgblight_sethsv_noeeprom(HSV_WHITE); + break; + + case _CAPA4: + rgblight_sethsv_noeeprom(HSV_PURPLE); + break; + + case _CAPA5: + rgblight_sethsv_noeeprom(HSV_CORAL); + break; + + default: + rgblight_sethsv_noeeprom(HSV_BLUE); // MI COLOR + break; + } + + return state; +} + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┐ + * │ 7 │ 8 │ 9 │ / │ + * ├───┼───┼───┼───┤ + * │ 4 │ 5 │ 6 │ * │ + * ├───┼───┼───┼───┤ + * │ 1 │ 2 │ 3 │ - │ + * ├───┼───┼───┼───┤ + * │ 0 │ . │Ent│ + │ + * └───┴───┴───┴───┘ + */ + [0] = LAYOUT_ortho_4x4( /* CAPAS BASE */ + LT(1, KC_7), KC_8, KC_9, KC_SLASH, + KC_4, KC_5, KC_6, KC_PAST, + KC_1, KC_2, KC_3, KC_PMNS, + KC_0, KC_PDOT, KC_PENT, KC_PPLS + ), + [1] = LAYOUT_ortho_4x4( /* CAPAS */ + _______, TG(5), _______, _______, + TG(2), _______, _______, _______, + TG(3), _______, _______, _______, + TG(4), _______, _______, _______ + ), + [2] = LAYOUT_ortho_4x4( /* CAPA2 */ + TG(2), KC_2, KC_2, KC_2, + KC_2, KC_2, KC_2, KC_2, + KC_2, KC_2, KC_2, KC_2, + KC_2, KC_2, KC_2, KC_2 + ), + [3] = LAYOUT_ortho_4x4( /* CAPA3 */ + TG(3), KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3 + ), + /* MOUSE + * ,-------------------------------------------------. + * | | | SCROLL UP | X | + * |-----------+-----------+------------+------------| + * | BUTTON 5 |LEFT CLICK | UP |RIGHT CLICK | + * |-----------+-----------+------------+------------| + * | BUTTON 4 | LEFT | DOWN | RIGHT | + * |-----------+-----------+------------+------=-----| + * | BUTTON 3 |SCROLL LEFT|SCROLL DOWN |SCROLL RIGHT| + * `-------------------------------------------------' + */ + [4] = LAYOUT_ortho_4x4( + TG(4), _______, KC_WH_U, _______, + KC_BTN5, KC_BTN1, KC_MS_U, KC_BTN2, + KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, + KC_BTN3, KC_WH_L, KC_WH_D, KC_WH_R + ), + /* NAV + * ,-----------------------. + * | INS |PGUP | TAB |PRSCR| + * |-----+-----+-----+-----| + * | DEL |PGDN |VOLD |VOLU | + * |-----+-----+-----+-----| + * |HOME | UP | END | | + * |-----+-----+-----+-----| + * |LEFT |DOWN |RIGHT|ENTER| + * `---------------------- ' + */ + [5] = LAYOUT_ortho_4x4( /* NAV CLUSTER */ + TG(5), KC_PGUP, KC_TAB, KC_PSCR, + KC_DEL, KC_PGDN, KC_VOLD, KC_VOLU, + KC_HOME, KC_UP, KC_END, _______, + KC_LEFT, KC_DOWN, KC_RGHT, KC_ENT + ), + +}; + diff --git a/keyboards/handwired/illera16/keymaps/vial/config.h b/keyboards/handwired/illera16/keymaps/vial/config.h new file mode 100644 index 000000000000..08aa6a560ac9 --- /dev/null +++ b/keyboards/handwired/illera16/keymaps/vial/config.h @@ -0,0 +1,40 @@ +// Copyright 2023 y (@villeramassana) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//Vial + +#define VIAL_KEYBOARD_UID {0xFD, 0XC4, 0xE0, 0x12, 0x93, 0x1C, 0x2B, 0x9A} +#define VIAL_UNLOCK_COMBO_ROWS { 0,0 } +#define VIAL_UNLOCK_COMBO_COLS { 0,1 } + + +#define RGB_DI_PIN D0 +#define RGBLED_NUM 6 +#define RGBLIGHT_LAYERS + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define ENCODERS_PAD_A { B5, B4} +#define ENCODERS_PAD_B { B6, B2} +#define ENCODER_RESOLUTION 2 + +#define MIDI_BASIC + diff --git a/keyboards/handwired/illera16/keymaps/vial/keymap.c b/keyboards/handwired/illera16/keymaps/vial/keymap.c new file mode 100644 index 000000000000..c181c41063c4 --- /dev/null +++ b/keyboards/handwired/illera16/keymaps/vial/keymap.c @@ -0,0 +1,131 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +#define _BASE 0 +#define _CAPA1 1 +#define _CAPA2 2 +#define _CAPA3 3 +#define _CAPA4 4 + + +layer_state_t layer_state_set_user(layer_state_t state); + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + layer_state_set_user(layer_state); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t layer = biton32(state); + switch (layer) { + case _CAPA1: + rgblight_sethsv_noeeprom(HSV_PURPLE); + break; + + case _CAPA2: + rgblight_sethsv_noeeprom(HSV_RED); + break; + + case _CAPA3: + rgblight_sethsv_noeeprom(HSV_GREEN); + break; + + case _CAPA4: + rgblight_sethsv_noeeprom(HSV_YELLOW); + break; + + default: + rgblight_sethsv_noeeprom(HSV_BLUE); // MI COLOR + break; + } + + return state; +} + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┐ + * │ 7 │ 8 │ 9 │ / │ + * ├───┼───┼───┼───┤ + * │ 4 │ 5 │ 6 │ * │ + * ├───┼───┼───┼───┤ + * │ 1 │ 2 │ 3 │ - │ + * ├───┼───┼───┼───┤ + * │ 0 │ . │Ent│ + │ + * └───┴───┴───┴───┘ + */ + [0] = LAYOUT_ortho_4x4( /* CAPAS BASE */ + LT(1, KC_7), KC_8, KC_9, KC_SLASH, + KC_4, KC_5, KC_6, KC_PAST, + KC_1, KC_2, KC_3, KC_PMNS, + KC_0, KC_PDOT, KC_PENT, KC_PPLS + ), + [1] = LAYOUT_ortho_4x4( /* CAPAS */ + _______, TG(5), _______, _______, + TG(2), _______, _______, _______, + TG(3), _______, _______, _______, + TG(4), _______, _______, _______ + ), + [2] = LAYOUT_ortho_4x4( /* CAPA2 */ + TG(2), KC_2, KC_2, KC_2, + KC_2, KC_2, KC_2, KC_2, + KC_2, KC_2, KC_2, KC_2, + KC_2, KC_2, KC_2, KC_2 + ), + [3] = LAYOUT_ortho_4x4( /* CAPA3 */ + TG(3), KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3 + ), + /* MOUSE + * ,-------------------------------------------------. + * | | | SCROLL UP | X | + * |-----------+-----------+------------+------------| + * | BUTTON 5 |LEFT CLICK | UP |RIGHT CLICK | + * |-----------+-----------+------------+------------| + * | BUTTON 4 | LEFT | DOWN | RIGHT | + * |-----------+-----------+------------+------=-----| + * | BUTTON 3 |SCROLL LEFT|SCROLL DOWN |SCROLL RIGHT| + * `-------------------------------------------------' + */ + [4] = LAYOUT_ortho_4x4( + TG(4), _______, KC_WH_U, _______, + KC_BTN5, KC_BTN1, KC_MS_U, KC_BTN2, + KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, + KC_BTN3, KC_WH_L, KC_WH_D, KC_WH_R + ), + +}; +/* + * ROTARY ENCODER + */ + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_BASE] = { + ENCODER_CCW_CW(KC_VOLD, KC_VOLU), + ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) + }, + [1] = { + ENCODER_CCW_CW(KC_WH_D, KC_WH_U), + ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) + }, + [2] = { + ENCODER_CCW_CW(RGB_VAD, RGB_VAI), + ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) + }, + [3] = { + ENCODER_CCW_CW(KC_VOLD, KC_VOLU), + ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) + }, + [4] = { + ENCODER_CCW_CW(KC_VOLD, KC_VOLU), + ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) + }, +}; +#endif + diff --git a/keyboards/handwired/illera16/keymaps/vial/rules.mk b/keyboards/handwired/illera16/keymaps/vial/rules.mk new file mode 100644 index 000000000000..d1f11e2a7f90 --- /dev/null +++ b/keyboards/handwired/illera16/keymaps/vial/rules.mk @@ -0,0 +1,10 @@ +LTO_ENABLE = yes +VIA_ENABLE = yes +VIAL_ENABLE = yes +TAP_DANCE_ENABLE = yes +KEY_OVERRIDE_ENABLE = no +COMBO_ENABLE = no +QMK_SETTINGS = no +ENCODER_ENABLE = yes +ENCODER_MAP_ENABLE = yes +MIDI_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/illera16/readme.md b/keyboards/handwired/illera16/readme.md new file mode 100644 index 000000000000..f39c95298128 --- /dev/null +++ b/keyboards/handwired/illera16/readme.md @@ -0,0 +1,27 @@ +# handwired/illera16 + +![handwired/illera16](imgur.com image replace me!) + +*hand wired 4x4 macro pad* + +* Keyboard Maintainer: [victor_illera](https://github.com/villeramassana) +* Hardware Supported: *Pro Micro* +* Hardware Availability: *Aliexpress or Amazon* + +Make example for this keyboard (after setting up your build environment): + + make handwired/illera16:default + +Flashing example for this keyboard: + + make handwired/illera16: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 diff --git a/keyboards/handwired/illera16/rules.mk b/keyboards/handwired/illera16/rules.mk new file mode 100644 index 000000000000..c0efbd2a9efa --- /dev/null +++ b/keyboards/handwired/illera16/rules.mk @@ -0,0 +1,3 @@ +# This file intentionally left blank + +RGBLIGHT_ENABLE = yes \ No newline at end of file From 7d88f484bc77aa9708ec440f35cb5fe141866daf Mon Sep 17 00:00:00 2001 From: villeramassana Date: Sun, 17 Sep 2023 16:50:11 +0200 Subject: [PATCH 2/9] Update keymap.c Updated color layers --- keyboards/handwired/illera16/keymaps/vial/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/illera16/keymaps/vial/keymap.c b/keyboards/handwired/illera16/keymaps/vial/keymap.c index c181c41063c4..a613e389da49 100644 --- a/keyboards/handwired/illera16/keymaps/vial/keymap.c +++ b/keyboards/handwired/illera16/keymaps/vial/keymap.c @@ -21,7 +21,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { uint8_t layer = biton32(state); switch (layer) { case _CAPA1: - rgblight_sethsv_noeeprom(HSV_PURPLE); + rgblight_sethsv_noeeprom(HSV_GREEN); break; case _CAPA2: @@ -29,7 +29,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { break; case _CAPA3: - rgblight_sethsv_noeeprom(HSV_GREEN); + rgblight_sethsv_noeeprom(HSV_PINK); break; case _CAPA4: From 874eb2d7e54c2313e93adaa84560291a61067658 Mon Sep 17 00:00:00 2001 From: villeramassana <132305075+villeramassana@users.noreply.github.com> Date: Thu, 28 Sep 2023 00:28:07 +0200 Subject: [PATCH 3/9] handwired macro pad first handwired macropad 16switch or 14switch + 2 enconders + rgb led strip for layer indication. --- keyboards/handwired/illera16/info.json | 48 +++++++ .../illera16/keymaps/default/keymap.c | 124 +++++++++++++++++ .../handwired/illera16/keymaps/vial/config.h | 40 ++++++ .../handwired/illera16/keymaps/vial/keymap.c | 131 ++++++++++++++++++ .../handwired/illera16/keymaps/vial/rules.mk | 10 ++ .../handwired/illera16/keymaps/vial/vial.json | 20 +++ keyboards/handwired/illera16/readme.md | 27 ++++ keyboards/handwired/illera16/rules.mk | 3 + 8 files changed, 403 insertions(+) create mode 100644 keyboards/handwired/illera16/info.json create mode 100644 keyboards/handwired/illera16/keymaps/default/keymap.c create mode 100644 keyboards/handwired/illera16/keymaps/vial/config.h create mode 100644 keyboards/handwired/illera16/keymaps/vial/keymap.c create mode 100644 keyboards/handwired/illera16/keymaps/vial/rules.mk create mode 100644 keyboards/handwired/illera16/keymaps/vial/vial.json create mode 100644 keyboards/handwired/illera16/readme.md create mode 100644 keyboards/handwired/illera16/rules.mk diff --git a/keyboards/handwired/illera16/info.json b/keyboards/handwired/illera16/info.json new file mode 100644 index 000000000000..d56d5874143b --- /dev/null +++ b/keyboards/handwired/illera16/info.json @@ -0,0 +1,48 @@ +{ + "manufacturer": "victor_illera", + "keyboard_name": "illera16", + "maintainer": "villeramassana", + "bootloader": "caterina", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["D4", "C6", "D7", "E6"], + "rows": ["F4", "F5", "F6", "F7"] + }, + "processor": "atmega32u4", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_ortho_4x4": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [1, 0], "x": 0, "y": 1 }, + { "matrix": [1, 1], "x": 1, "y": 1 }, + { "matrix": [1, 2], "x": 2, "y": 1 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [2, 0], "x": 0, "y": 2 }, + { "matrix": [2, 1], "x": 1, "y": 2 }, + { "matrix": [2, 2], "x": 2, "y": 2 }, + { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [3, 0], "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 1, "y": 3 }, + { "matrix": [3, 2], "x": 2, "y": 3 }, + { "matrix": [3, 3], "x": 3, "y": 3 } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/illera16/keymaps/default/keymap.c b/keyboards/handwired/illera16/keymaps/default/keymap.c new file mode 100644 index 000000000000..49a36bbf8610 --- /dev/null +++ b/keyboards/handwired/illera16/keymaps/default/keymap.c @@ -0,0 +1,124 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +#define _BASE 0 +#define _CAPA1 1 +#define _CAPA2 2 +#define _CAPA3 3 +#define _CAPA4 4 +#define _CAPA5 5 + +layer_state_t layer_state_set_user(layer_state_t state); + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + layer_state_set_user(layer_state); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t layer = biton32(state); + switch (layer) { + case _CAPA1: + rgblight_sethsv_noeeprom(HSV_GREEN); + break; + + case _CAPA2: + rgblight_sethsv_noeeprom(HSV_RED); + break; + + case _CAPA3: + rgblight_sethsv_noeeprom(HSV_PINK); + break; + + case _CAPA4: + rgblight_sethsv_noeeprom(HSV_PURPLE); + break; + + case _CAPA5: + rgblight_sethsv_noeeprom(HSV_CORAL); + break; + + default: + rgblight_sethsv_noeeprom(HSV_BLUE); // MI COLOR + break; + } + + return state; +} + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┐ + * │ 7 │c1 │ 9 │ / │ + * ├───┼───┼───┼───┤ + * │ 7 │ 8 │ 9 │ * │ + * ├───┼───┼───┼───┤ + * │ 4 │ 5 │ 6 │ - │ + * ├───┼───┼───┼───┤ + * │ 1 │ 2 │ 3 │ 0 │ + * └───┴───┴───┴───┘ + */ + [0] = LAYOUT_ortho_4x4( /* CAPAS BASE */ + KC_DEL, TG(1), ____, KC_SLASH, + KC_7, KC_8, KC_9, KC_PAST, + KC_4, KC_5, KC_6, KC_PMNS, + KC_1, KC_2, KC_3, KC_0 + ), + [1] = LAYOUT_ortho_4x4( /* CAPA1 */ + KC_1, TG(2), TG(1), KC_1, + KC_1, KC_1, KC_1, KC_1, + KC_1, KC_1, KC_1, KC_1, + KC_1, KC_1, KC_1, KC_1 + ), + [2] = LAYOUT_ortho_4x4( /* CAPA2 */ + KC_2, TG(3), TG(2), KC_2, + KC_2, KC_2, KC_2, KC_2, + KC_2, KC_2, KC_2, KC_2, + KC_2, KC_2, KC_2, KC_2 + ), + [3] = LAYOUT_ortho_4x4( /* CAPA3 */ + KC_3, TG(4), TG(3), KC_3, + KC_3, KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3 + ), + /* MOUSE + * ,-------------------------------------------------. + * | | | c3 | X | + * |-----------+-----------+------------+------------| + * | BUTTON 5 |LEFT CLICK | UP |RIGHT CLICK | + * |-----------+-----------+------------+------------| + * | BUTTON 4 | LEFT | DOWN | RIGHT | + * |-----------+-----------+------------+------=-----| + * | BUTTON 3 |SCROLL LEFT|SCROLL DOWN |SCROLL RIGHT| + * `-------------------------------------------------' + */ + [4] = LAYOUT_ortho_4x4( + _______, TG(5), TG(4), _______, + KC_BTN5, KC_BTN1, KC_MS_U, KC_BTN2, + KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, + KC_BTN3, KC_WH_L, KC_WH_D, KC_WH_R + ), + /* NAV + * ,-----------------------. + * | INS |PGUP | c4 |PRSCR| + * |-----+-----+-----+-----| + * | DEL |PGDN |VOLD |VOLU | + * |-----+-----+-----+-----| + * |HOME | UP | END | | + * |-----+-----+-----+-----| + * |LEFT |DOWN |RIGHT|ENTER| + * `---------------------- ' + */ + [5] = LAYOUT_ortho_4x4( /* NAV CLUSTER */ + KC_PGUP, _______, TG(5), KC_PSCR, + KC_DEL, KC_PGDN, KC_VOLD, KC_VOLU, + KC_HOME, KC_UP, KC_END, _______, + KC_LEFT, KC_DOWN, KC_RGHT, KC_ENT + ), + +}; + diff --git a/keyboards/handwired/illera16/keymaps/vial/config.h b/keyboards/handwired/illera16/keymaps/vial/config.h new file mode 100644 index 000000000000..4835d630bdf9 --- /dev/null +++ b/keyboards/handwired/illera16/keymaps/vial/config.h @@ -0,0 +1,40 @@ +// Copyright 2023 y (@villeramassana) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//Vial + +#define VIAL_KEYBOARD_UID {0xFD, 0XC4, 0xE0, 0x12, 0x93, 0x1C, 0x2B, 0x9A} +#define VIAL_UNLOCK_COMBO_ROWS { 0,0 } +#define VIAL_UNLOCK_COMBO_COLS { 0,1 } + + +#define RGB_DI_PIN D0 +#define RGBLED_NUM 6 /*es el pin on es conecta el din del RGB led strip*/ +#define RGBLIGHT_LAYERS + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define ENCODERS_PAD_A { B5, B4} +#define ENCODERS_PAD_B { B6, B2} +#define ENCODER_RESOLUTION 2 + +#define MIDI_BASIC + diff --git a/keyboards/handwired/illera16/keymaps/vial/keymap.c b/keyboards/handwired/illera16/keymaps/vial/keymap.c new file mode 100644 index 000000000000..3860e1736bcf --- /dev/null +++ b/keyboards/handwired/illera16/keymaps/vial/keymap.c @@ -0,0 +1,131 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +#define _BASE 0 +#define _CAPA1 1 +#define _CAPA2 2 +#define _CAPA3 3 +#define _CAPA4 4 + + +layer_state_t layer_state_set_user(layer_state_t state); + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + layer_state_set_user(layer_state); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t layer = biton32(state); + switch (layer) { + case _CAPA1: + rgblight_sethsv_noeeprom(HSV_GREEN); + break; + + case _CAPA2: + rgblight_sethsv_noeeprom(HSV_RED); + break; + + case _CAPA3: + rgblight_sethsv_noeeprom(HSV_PURPLE); + break; + + case _CAPA4: + rgblight_sethsv_noeeprom(HSV_WHITE); + break; + + default: + rgblight_sethsv_noeeprom(HSV_BLUE); // MI COLOR + break; + } + + return state; +} + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┐ + * │ 7 │c1 │ 9 │ / │ + * ├───┼───┼───┼───┤ + * │ 7 │ 8 │ 9 │ * │ + * ├───┼───┼───┼───┤ + * │ 4 │ 5 │ 6 │ - │ + * ├───┼───┼───┼───┤ + * │ 1 │ 2 │ 3 │ 0 │ + * └───┴───┴───┴───┘ + */ + [0] = LAYOUT_ortho_4x4( /* CAPAS BASE */ + KC_MUTE, TG(1), _______, KC_SLASH, + KC_7, KC_8, KC_9, KC_PAST, + KC_4, KC_5, KC_6, KC_PMNS, + KC_1, KC_2, KC_3, KC_0 + ), + [1] = LAYOUT_ortho_4x4( /* CAPA1 */ + KC_1, TG(2), TG(1), KC_1, + KC_1, KC_1, KC_1, KC_1, + KC_1, KC_1, KC_1, KC_1, + KC_1, KC_1, KC_1, KC_1 + ), + [2] = LAYOUT_ortho_4x4( /* CAPA2 */ + KC_2, TG(3), TG(2), KC_2, + KC_2, KC_2, KC_2, KC_2, + KC_2, KC_2, KC_2, KC_2, + KC_2, KC_2, KC_2, KC_2 + ), + [3] = LAYOUT_ortho_4x4( /* CAPA3 */ + KC_3, KC_NO, TG(3), KC_3, + KC_3, KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3 + ), + /* MOUSE + * ,-------------------------------------------------. + * | | | c3 | X | + * |-----------+-----------+------------+------------| + * | BUTTON 5 |LEFT CLICK | UP |RIGHT CLICK | + * |-----------+-----------+------------+------------| + * | BUTTON 4 | LEFT | DOWN | RIGHT | + * |-----------+-----------+------------+------=-----| + * | BUTTON 3 |SCROLL LEFT|SCROLL DOWN |SCROLL RIGHT| + * `-------------------------------------------------' + */ + [4] = LAYOUT_ortho_4x4( + _______, _______, _______, _______, + KC_BTN5, KC_BTN1, KC_MS_U, KC_BTN2, + KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, + KC_BTN3, KC_WH_L, KC_WH_D, KC_WH_R + ), + +}; +/* + * ROTARY ENCODER + */ + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_BASE] = { + ENCODER_CCW_CW(KC_VOLD, KC_VOLU), + ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) + }, + [1] = { + ENCODER_CCW_CW(KC_WH_D, KC_WH_U), + ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) + }, + [2] = { + ENCODER_CCW_CW(RGB_VAD, RGB_VAI), + ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) + }, + [3] = { + ENCODER_CCW_CW(KC_VOLD, KC_VOLU), + ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) + }, + [4] = { + ENCODER_CCW_CW(KC_VOLD, KC_VOLU), + ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) + }, +}; +#endif + diff --git a/keyboards/handwired/illera16/keymaps/vial/rules.mk b/keyboards/handwired/illera16/keymaps/vial/rules.mk new file mode 100644 index 000000000000..d1f11e2a7f90 --- /dev/null +++ b/keyboards/handwired/illera16/keymaps/vial/rules.mk @@ -0,0 +1,10 @@ +LTO_ENABLE = yes +VIA_ENABLE = yes +VIAL_ENABLE = yes +TAP_DANCE_ENABLE = yes +KEY_OVERRIDE_ENABLE = no +COMBO_ENABLE = no +QMK_SETTINGS = no +ENCODER_ENABLE = yes +ENCODER_MAP_ENABLE = yes +MIDI_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/illera16/keymaps/vial/vial.json b/keyboards/handwired/illera16/keymaps/vial/vial.json new file mode 100644 index 000000000000..c06c9f17f752 --- /dev/null +++ b/keyboards/handwired/illera16/keymaps/vial/vial.json @@ -0,0 +1,20 @@ +{ + "matrix": { + "rows": 4, + "cols": 4 + }, + "layouts": { + "labels": [ + ["Encoders", "None", "Upper Left"] + ], + "keymap": [ + ["0,0\n\n\n\n\n\n\n\n\ne","0,0","0,1","0,2","0,3","1,0\n\n\n\n\n\n\n\n\ne"], + ["0,1\n\n\n\n\n\n\n\n\ne","1,0","1,1","1,2","1,3","1,1\n\n\n\n\n\n\n\n\ne"], + ["","2,0","2,1","2,2","2,3"], + ["","3,0","3,1","3,2","3,3"] + ] + }, + "vial": { + "midi": "basic" + } +} diff --git a/keyboards/handwired/illera16/readme.md b/keyboards/handwired/illera16/readme.md new file mode 100644 index 000000000000..f39c95298128 --- /dev/null +++ b/keyboards/handwired/illera16/readme.md @@ -0,0 +1,27 @@ +# handwired/illera16 + +![handwired/illera16](imgur.com image replace me!) + +*hand wired 4x4 macro pad* + +* Keyboard Maintainer: [victor_illera](https://github.com/villeramassana) +* Hardware Supported: *Pro Micro* +* Hardware Availability: *Aliexpress or Amazon* + +Make example for this keyboard (after setting up your build environment): + + make handwired/illera16:default + +Flashing example for this keyboard: + + make handwired/illera16: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 diff --git a/keyboards/handwired/illera16/rules.mk b/keyboards/handwired/illera16/rules.mk new file mode 100644 index 000000000000..c0efbd2a9efa --- /dev/null +++ b/keyboards/handwired/illera16/rules.mk @@ -0,0 +1,3 @@ +# This file intentionally left blank + +RGBLIGHT_ENABLE = yes \ No newline at end of file From e68d007d17e0cc5ea84dc522d1f6bc132a9bb9f9 Mon Sep 17 00:00:00 2001 From: villeramassana <132305075+villeramassana@users.noreply.github.com> Date: Mon, 2 Oct 2023 00:51:47 +0200 Subject: [PATCH 4/9] 4x4 handwired keyboard --- keyboards/handwired/illera16/keymaps/vial/config.h | 2 +- keyboards/handwired/illera16/keymaps/vial/keymap.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/handwired/illera16/keymaps/vial/config.h b/keyboards/handwired/illera16/keymaps/vial/config.h index 4835d630bdf9..08aa6a560ac9 100644 --- a/keyboards/handwired/illera16/keymaps/vial/config.h +++ b/keyboards/handwired/illera16/keymaps/vial/config.h @@ -26,7 +26,7 @@ #define RGB_DI_PIN D0 -#define RGBLED_NUM 6 /*es el pin on es conecta el din del RGB led strip*/ +#define RGBLED_NUM 6 #define RGBLIGHT_LAYERS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/handwired/illera16/keymaps/vial/keymap.c b/keyboards/handwired/illera16/keymaps/vial/keymap.c index 3860e1736bcf..bb98c178589f 100644 --- a/keyboards/handwired/illera16/keymaps/vial/keymap.c +++ b/keyboards/handwired/illera16/keymaps/vial/keymap.c @@ -29,11 +29,11 @@ layer_state_t layer_state_set_user(layer_state_t state) { break; case _CAPA3: - rgblight_sethsv_noeeprom(HSV_PURPLE); + rgblight_sethsv_noeeprom(HSV_PINK); break; case _CAPA4: - rgblight_sethsv_noeeprom(HSV_WHITE); + rgblight_sethsv_noeeprom(HSV_PURPLE); break; default: @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └───┴───┴───┴───┘ */ [0] = LAYOUT_ortho_4x4( /* CAPAS BASE */ - KC_MUTE, TG(1), _______, KC_SLASH, + KC_DEL, TG(1), ____, KC_SLASH, KC_7, KC_8, KC_9, KC_PAST, KC_4, KC_5, KC_6, KC_PMNS, KC_1, KC_2, KC_3, KC_0 @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_2, KC_2, KC_2, KC_2 ), [3] = LAYOUT_ortho_4x4( /* CAPA3 */ - KC_3, KC_NO, TG(3), KC_3, + KC_3, TG(4), TG(3), KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3 @@ -93,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------' */ [4] = LAYOUT_ortho_4x4( - _______, _______, _______, _______, + _______, TG(5), TG(4), _______, KC_BTN5, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN3, KC_WH_L, KC_WH_D, KC_WH_R From 1d97ef06f7d3b43d2ef5519d17a02a30f39975b5 Mon Sep 17 00:00:00 2001 From: villeramassana Date: Tue, 3 Oct 2023 00:04:58 +0200 Subject: [PATCH 5/9] works --- .../handwired/illera16/keymaps/vial/config.h | 6 +-- .../handwired/illera16/keymaps/vial/keymap.c | 40 +++++++++---------- .../handwired/illera16/keymaps/vial/vial.json | 20 ---------- 3 files changed, 23 insertions(+), 43 deletions(-) delete mode 100644 keyboards/handwired/illera16/keymaps/vial/vial.json diff --git a/keyboards/handwired/illera16/keymaps/vial/config.h b/keyboards/handwired/illera16/keymaps/vial/config.h index 08aa6a560ac9..333eb9d8787a 100644 --- a/keyboards/handwired/illera16/keymaps/vial/config.h +++ b/keyboards/handwired/illera16/keymaps/vial/config.h @@ -1,4 +1,4 @@ -// Copyright 2023 y (@villeramassana) +// Copyright 2023 Victor Illera (@villeramassana) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -25,8 +25,8 @@ #define VIAL_UNLOCK_COMBO_COLS { 0,1 } -#define RGB_DI_PIN D0 -#define RGBLED_NUM 6 +#define RGB_DI_PIN D0 /*es al pin on es conecta el din de RGB strip*/ +#define RGBLED_NUM 6 #define RGBLIGHT_LAYERS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/handwired/illera16/keymaps/vial/keymap.c b/keyboards/handwired/illera16/keymaps/vial/keymap.c index bb98c178589f..c181c41063c4 100644 --- a/keyboards/handwired/illera16/keymaps/vial/keymap.c +++ b/keyboards/handwired/illera16/keymaps/vial/keymap.c @@ -21,7 +21,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { uint8_t layer = biton32(state); switch (layer) { case _CAPA1: - rgblight_sethsv_noeeprom(HSV_GREEN); + rgblight_sethsv_noeeprom(HSV_PURPLE); break; case _CAPA2: @@ -29,11 +29,11 @@ layer_state_t layer_state_set_user(layer_state_t state) { break; case _CAPA3: - rgblight_sethsv_noeeprom(HSV_PINK); + rgblight_sethsv_noeeprom(HSV_GREEN); break; case _CAPA4: - rgblight_sethsv_noeeprom(HSV_PURPLE); + rgblight_sethsv_noeeprom(HSV_YELLOW); break; default: @@ -48,42 +48,42 @@ layer_state_t layer_state_set_user(layer_state_t state) { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * ┌───┬───┬───┬───┐ - * │ 7 │c1 │ 9 │ / │ + * │ 7 │ 8 │ 9 │ / │ * ├───┼───┼───┼───┤ - * │ 7 │ 8 │ 9 │ * │ + * │ 4 │ 5 │ 6 │ * │ * ├───┼───┼───┼───┤ - * │ 4 │ 5 │ 6 │ - │ + * │ 1 │ 2 │ 3 │ - │ * ├───┼───┼───┼───┤ - * │ 1 │ 2 │ 3 │ 0 │ + * │ 0 │ . │Ent│ + │ * └───┴───┴───┴───┘ */ [0] = LAYOUT_ortho_4x4( /* CAPAS BASE */ - KC_DEL, TG(1), ____, KC_SLASH, - KC_7, KC_8, KC_9, KC_PAST, - KC_4, KC_5, KC_6, KC_PMNS, - KC_1, KC_2, KC_3, KC_0 + LT(1, KC_7), KC_8, KC_9, KC_SLASH, + KC_4, KC_5, KC_6, KC_PAST, + KC_1, KC_2, KC_3, KC_PMNS, + KC_0, KC_PDOT, KC_PENT, KC_PPLS ), - [1] = LAYOUT_ortho_4x4( /* CAPA1 */ - KC_1, TG(2), TG(1), KC_1, - KC_1, KC_1, KC_1, KC_1, - KC_1, KC_1, KC_1, KC_1, - KC_1, KC_1, KC_1, KC_1 + [1] = LAYOUT_ortho_4x4( /* CAPAS */ + _______, TG(5), _______, _______, + TG(2), _______, _______, _______, + TG(3), _______, _______, _______, + TG(4), _______, _______, _______ ), [2] = LAYOUT_ortho_4x4( /* CAPA2 */ - KC_2, TG(3), TG(2), KC_2, + TG(2), KC_2, KC_2, KC_2, KC_2, KC_2, KC_2, KC_2, KC_2, KC_2, KC_2, KC_2, KC_2, KC_2, KC_2, KC_2 ), [3] = LAYOUT_ortho_4x4( /* CAPA3 */ - KC_3, TG(4), TG(3), KC_3, + TG(3), KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3, KC_3 ), /* MOUSE * ,-------------------------------------------------. - * | | | c3 | X | + * | | | SCROLL UP | X | * |-----------+-----------+------------+------------| * | BUTTON 5 |LEFT CLICK | UP |RIGHT CLICK | * |-----------+-----------+------------+------------| @@ -93,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------' */ [4] = LAYOUT_ortho_4x4( - _______, TG(5), TG(4), _______, + TG(4), _______, KC_WH_U, _______, KC_BTN5, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN3, KC_WH_L, KC_WH_D, KC_WH_R diff --git a/keyboards/handwired/illera16/keymaps/vial/vial.json b/keyboards/handwired/illera16/keymaps/vial/vial.json deleted file mode 100644 index c06c9f17f752..000000000000 --- a/keyboards/handwired/illera16/keymaps/vial/vial.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "matrix": { - "rows": 4, - "cols": 4 - }, - "layouts": { - "labels": [ - ["Encoders", "None", "Upper Left"] - ], - "keymap": [ - ["0,0\n\n\n\n\n\n\n\n\ne","0,0","0,1","0,2","0,3","1,0\n\n\n\n\n\n\n\n\ne"], - ["0,1\n\n\n\n\n\n\n\n\ne","1,0","1,1","1,2","1,3","1,1\n\n\n\n\n\n\n\n\ne"], - ["","2,0","2,1","2,2","2,3"], - ["","3,0","3,1","3,2","3,3"] - ] - }, - "vial": { - "midi": "basic" - } -} From 443051ad93b93fbde11d8670cb682d952af1771b Mon Sep 17 00:00:00 2001 From: villeramassana <132305075+villeramassana@users.noreply.github.com> Date: Mon, 9 Oct 2023 00:06:55 +0200 Subject: [PATCH 6/9] improved layout and encoders working --- keyboards/handwired/illera16/config.h | 39 ++++++++++ keyboards/handwired/illera16/info.json | 2 +- .../illera16/keymaps/default/keymap.c | 77 ++++++------------- keyboards/handwired/illera16/rules.mk | 4 +- 4 files changed, 68 insertions(+), 54 deletions(-) create mode 100644 keyboards/handwired/illera16/config.h diff --git a/keyboards/handwired/illera16/config.h b/keyboards/handwired/illera16/config.h new file mode 100644 index 000000000000..4cae979d6a4a --- /dev/null +++ b/keyboards/handwired/illera16/config.h @@ -0,0 +1,39 @@ +// Copyright 2023 y (@villeramassana) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//Vial + +#define VIAL_KEYBOARD_UID {0xFD, 0XC4, 0xE0, 0x12, 0x93, 0x1C, 0x2B, 0x9A} +#define VIAL_UNLOCK_COMBO_ROWS { 0,0 } +#define VIAL_UNLOCK_COMBO_COLS { 0,1 } + +#define WS2812_DI_PIN D0 +#define RGBLED_NUM 6 +#define RGBLIGHT_LAYERS + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define ENCODERS_PAD_A { B5, B4} +#define ENCODERS_PAD_B { B6, B2} +#define ENCODER_RESOLUTION 2 + +#define MIDI_BASIC + diff --git a/keyboards/handwired/illera16/info.json b/keyboards/handwired/illera16/info.json index d56d5874143b..4d2f25ff6e3d 100644 --- a/keyboards/handwired/illera16/info.json +++ b/keyboards/handwired/illera16/info.json @@ -45,4 +45,4 @@ ] } } -} \ No newline at end of file +} diff --git a/keyboards/handwired/illera16/keymaps/default/keymap.c b/keyboards/handwired/illera16/keymaps/default/keymap.c index 49a36bbf8610..73a1f74d2106 100644 --- a/keyboards/handwired/illera16/keymaps/default/keymap.c +++ b/keyboards/handwired/illera16/keymaps/default/keymap.c @@ -7,8 +7,6 @@ #define _CAPA1 1 #define _CAPA2 2 #define _CAPA3 3 -#define _CAPA4 4 -#define _CAPA5 5 layer_state_t layer_state_set_user(layer_state_t state); @@ -32,14 +30,6 @@ layer_state_t layer_state_set_user(layer_state_t state) { rgblight_sethsv_noeeprom(HSV_PINK); break; - case _CAPA4: - rgblight_sethsv_noeeprom(HSV_PURPLE); - break; - - case _CAPA5: - rgblight_sethsv_noeeprom(HSV_CORAL); - break; - default: rgblight_sethsv_noeeprom(HSV_BLUE); // MI COLOR break; @@ -61,11 +51,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ 1 │ 2 │ 3 │ 0 │ * └───┴───┴───┴───┘ */ + [0] = LAYOUT_ortho_4x4( /* CAPAS BASE */ - KC_DEL, TG(1), ____, KC_SLASH, - KC_7, KC_8, KC_9, KC_PAST, - KC_4, KC_5, KC_6, KC_PMNS, - KC_1, KC_2, KC_3, KC_0 + KC_DEL, TG(1), _______, KC_SLASH, + KC_7, KC_8, KC_9, KC_PAST, + KC_4, KC_5, KC_6, KC_PMNS, + KC_1, KC_2, KC_3, KC_0 ), [1] = LAYOUT_ortho_4x4( /* CAPA1 */ KC_1, TG(2), TG(1), KC_1, @@ -80,45 +71,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_2, KC_2, KC_2, KC_2 ), [3] = LAYOUT_ortho_4x4( /* CAPA3 */ - KC_3, TG(4), TG(3), KC_3, - KC_3, KC_3, KC_3, KC_3, - KC_3, KC_3, KC_3, KC_3, - KC_3, KC_3, KC_3, KC_3 - ), - /* MOUSE - * ,-------------------------------------------------. - * | | | c3 | X | - * |-----------+-----------+------------+------------| - * | BUTTON 5 |LEFT CLICK | UP |RIGHT CLICK | - * |-----------+-----------+------------+------------| - * | BUTTON 4 | LEFT | DOWN | RIGHT | - * |-----------+-----------+------------+------=-----| - * | BUTTON 3 |SCROLL LEFT|SCROLL DOWN |SCROLL RIGHT| - * `-------------------------------------------------' - */ - [4] = LAYOUT_ortho_4x4( - _______, TG(5), TG(4), _______, - KC_BTN5, KC_BTN1, KC_MS_U, KC_BTN2, - KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, - KC_BTN3, KC_WH_L, KC_WH_D, KC_WH_R + KC_3, KC_NO, TG(3), KC_3, + KC_3, KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3 ), - /* NAV - * ,-----------------------. - * | INS |PGUP | c4 |PRSCR| - * |-----+-----+-----+-----| - * | DEL |PGDN |VOLD |VOLU | - * |-----+-----+-----+-----| - * |HOME | UP | END | | - * |-----+-----+-----+-----| - * |LEFT |DOWN |RIGHT|ENTER| - * `---------------------- ' - */ - [5] = LAYOUT_ortho_4x4( /* NAV CLUSTER */ - KC_PGUP, _______, TG(5), KC_PSCR, - KC_DEL, KC_PGDN, KC_VOLD, KC_VOLU, - KC_HOME, KC_UP, KC_END, _______, - KC_LEFT, KC_DOWN, KC_RGHT, KC_ENT - ), + +}; +/* + * ROTARY ENCODER + */ + +#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_UP, KC_MS_WH_DOWN) }, + [1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, + [2] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, + [3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, }; +#endif + + + diff --git a/keyboards/handwired/illera16/rules.mk b/keyboards/handwired/illera16/rules.mk index c0efbd2a9efa..93a1ab58de62 100644 --- a/keyboards/handwired/illera16/rules.mk +++ b/keyboards/handwired/illera16/rules.mk @@ -1,3 +1,5 @@ # This file intentionally left blank -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes +ENCODER_ENABLE = yes +ENCODER_MAP_ENABLE = yes \ No newline at end of file From abf1e0f6af5de02da09fb9a47200d6e7ac61e83e Mon Sep 17 00:00:00 2001 From: villeramassana <132305075+villeramassana@users.noreply.github.com> Date: Mon, 9 Oct 2023 00:13:58 +0200 Subject: [PATCH 7/9] Update keyboards/handwired/illera16/info.json Co-authored-by: Joel Challis --- keyboards/handwired/illera16/info.json | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/handwired/illera16/info.json b/keyboards/handwired/illera16/info.json index 4d2f25ff6e3d..189aa7865f71 100644 --- a/keyboards/handwired/illera16/info.json +++ b/keyboards/handwired/illera16/info.json @@ -2,7 +2,6 @@ "manufacturer": "victor_illera", "keyboard_name": "illera16", "maintainer": "villeramassana", - "bootloader": "caterina", "diode_direction": "COL2ROW", "features": { "bootmagic": true, From 3b57e181c06118263b2cbe2198d19f7b2567547b Mon Sep 17 00:00:00 2001 From: villeramassana <132305075+villeramassana@users.noreply.github.com> Date: Mon, 9 Oct 2023 00:14:33 +0200 Subject: [PATCH 8/9] Update keyboards/handwired/illera16/info.json Co-authored-by: Joel Challis --- keyboards/handwired/illera16/info.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/handwired/illera16/info.json b/keyboards/handwired/illera16/info.json index 189aa7865f71..5cef7813e22b 100644 --- a/keyboards/handwired/illera16/info.json +++ b/keyboards/handwired/illera16/info.json @@ -9,7 +9,8 @@ "console": false, "extrakey": true, "mousekey": true, - "nkro": true + "nkro": true, + "rgblight": true }, "matrix_pins": { "cols": ["D4", "C6", "D7", "E6"], From b703bbb8659c1c3c1c92012fa11177f077ec6a99 Mon Sep 17 00:00:00 2001 From: villeramassana Date: Mon, 9 Oct 2023 00:33:01 +0200 Subject: [PATCH 9/9] some layers deleted + encoder working --- keyboards/handwired/illera16/info.json | 4 +- .../handwired/illera16/keymaps/vial/config.h | 40 ------ .../handwired/illera16/keymaps/vial/keymap.c | 131 ------------------ .../handwired/illera16/keymaps/vial/rules.mk | 10 -- keyboards/handwired/illera16/readme.md | 2 - 5 files changed, 2 insertions(+), 185 deletions(-) delete mode 100644 keyboards/handwired/illera16/keymaps/vial/config.h delete mode 100644 keyboards/handwired/illera16/keymaps/vial/keymap.c delete mode 100644 keyboards/handwired/illera16/keymaps/vial/rules.mk diff --git a/keyboards/handwired/illera16/info.json b/keyboards/handwired/illera16/info.json index 5cef7813e22b..4d2f25ff6e3d 100644 --- a/keyboards/handwired/illera16/info.json +++ b/keyboards/handwired/illera16/info.json @@ -2,6 +2,7 @@ "manufacturer": "victor_illera", "keyboard_name": "illera16", "maintainer": "villeramassana", + "bootloader": "caterina", "diode_direction": "COL2ROW", "features": { "bootmagic": true, @@ -9,8 +10,7 @@ "console": false, "extrakey": true, "mousekey": true, - "nkro": true, - "rgblight": true + "nkro": true }, "matrix_pins": { "cols": ["D4", "C6", "D7", "E6"], diff --git a/keyboards/handwired/illera16/keymaps/vial/config.h b/keyboards/handwired/illera16/keymaps/vial/config.h deleted file mode 100644 index 333eb9d8787a..000000000000 --- a/keyboards/handwired/illera16/keymaps/vial/config.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2023 Victor Illera (@villeramassana) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//Vial - -#define VIAL_KEYBOARD_UID {0xFD, 0XC4, 0xE0, 0x12, 0x93, 0x1C, 0x2B, 0x9A} -#define VIAL_UNLOCK_COMBO_ROWS { 0,0 } -#define VIAL_UNLOCK_COMBO_COLS { 0,1 } - - -#define RGB_DI_PIN D0 /*es al pin on es conecta el din de RGB strip*/ -#define RGBLED_NUM 6 -#define RGBLIGHT_LAYERS - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -#define ENCODERS_PAD_A { B5, B4} -#define ENCODERS_PAD_B { B6, B2} -#define ENCODER_RESOLUTION 2 - -#define MIDI_BASIC - diff --git a/keyboards/handwired/illera16/keymaps/vial/keymap.c b/keyboards/handwired/illera16/keymaps/vial/keymap.c deleted file mode 100644 index c181c41063c4..000000000000 --- a/keyboards/handwired/illera16/keymaps/vial/keymap.c +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2023 QMK -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H - -#define _BASE 0 -#define _CAPA1 1 -#define _CAPA2 2 -#define _CAPA3 3 -#define _CAPA4 4 - - -layer_state_t layer_state_set_user(layer_state_t state); - -void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); - layer_state_set_user(layer_state); -} - -layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t layer = biton32(state); - switch (layer) { - case _CAPA1: - rgblight_sethsv_noeeprom(HSV_PURPLE); - break; - - case _CAPA2: - rgblight_sethsv_noeeprom(HSV_RED); - break; - - case _CAPA3: - rgblight_sethsv_noeeprom(HSV_GREEN); - break; - - case _CAPA4: - rgblight_sethsv_noeeprom(HSV_YELLOW); - break; - - default: - rgblight_sethsv_noeeprom(HSV_BLUE); // MI COLOR - break; - } - - return state; -} - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌───┬───┬───┬───┐ - * │ 7 │ 8 │ 9 │ / │ - * ├───┼───┼───┼───┤ - * │ 4 │ 5 │ 6 │ * │ - * ├───┼───┼───┼───┤ - * │ 1 │ 2 │ 3 │ - │ - * ├───┼───┼───┼───┤ - * │ 0 │ . │Ent│ + │ - * └───┴───┴───┴───┘ - */ - [0] = LAYOUT_ortho_4x4( /* CAPAS BASE */ - LT(1, KC_7), KC_8, KC_9, KC_SLASH, - KC_4, KC_5, KC_6, KC_PAST, - KC_1, KC_2, KC_3, KC_PMNS, - KC_0, KC_PDOT, KC_PENT, KC_PPLS - ), - [1] = LAYOUT_ortho_4x4( /* CAPAS */ - _______, TG(5), _______, _______, - TG(2), _______, _______, _______, - TG(3), _______, _______, _______, - TG(4), _______, _______, _______ - ), - [2] = LAYOUT_ortho_4x4( /* CAPA2 */ - TG(2), KC_2, KC_2, KC_2, - KC_2, KC_2, KC_2, KC_2, - KC_2, KC_2, KC_2, KC_2, - KC_2, KC_2, KC_2, KC_2 - ), - [3] = LAYOUT_ortho_4x4( /* CAPA3 */ - TG(3), KC_3, KC_3, KC_3, - KC_3, KC_3, KC_3, KC_3, - KC_3, KC_3, KC_3, KC_3, - KC_3, KC_3, KC_3, KC_3 - ), - /* MOUSE - * ,-------------------------------------------------. - * | | | SCROLL UP | X | - * |-----------+-----------+------------+------------| - * | BUTTON 5 |LEFT CLICK | UP |RIGHT CLICK | - * |-----------+-----------+------------+------------| - * | BUTTON 4 | LEFT | DOWN | RIGHT | - * |-----------+-----------+------------+------=-----| - * | BUTTON 3 |SCROLL LEFT|SCROLL DOWN |SCROLL RIGHT| - * `-------------------------------------------------' - */ - [4] = LAYOUT_ortho_4x4( - TG(4), _______, KC_WH_U, _______, - KC_BTN5, KC_BTN1, KC_MS_U, KC_BTN2, - KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, - KC_BTN3, KC_WH_L, KC_WH_D, KC_WH_R - ), - -}; -/* - * ROTARY ENCODER - */ - -#if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - [_BASE] = { - ENCODER_CCW_CW(KC_VOLD, KC_VOLU), - ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) - }, - [1] = { - ENCODER_CCW_CW(KC_WH_D, KC_WH_U), - ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) - }, - [2] = { - ENCODER_CCW_CW(RGB_VAD, RGB_VAI), - ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) - }, - [3] = { - ENCODER_CCW_CW(KC_VOLD, KC_VOLU), - ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) - }, - [4] = { - ENCODER_CCW_CW(KC_VOLD, KC_VOLU), - ENCODER_CCW_CW(KC_MS_DOWN, KC_MS_UP) - }, -}; -#endif - diff --git a/keyboards/handwired/illera16/keymaps/vial/rules.mk b/keyboards/handwired/illera16/keymaps/vial/rules.mk deleted file mode 100644 index d1f11e2a7f90..000000000000 --- a/keyboards/handwired/illera16/keymaps/vial/rules.mk +++ /dev/null @@ -1,10 +0,0 @@ -LTO_ENABLE = yes -VIA_ENABLE = yes -VIAL_ENABLE = yes -TAP_DANCE_ENABLE = yes -KEY_OVERRIDE_ENABLE = no -COMBO_ENABLE = no -QMK_SETTINGS = no -ENCODER_ENABLE = yes -ENCODER_MAP_ENABLE = yes -MIDI_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/illera16/readme.md b/keyboards/handwired/illera16/readme.md index f39c95298128..a4fadf261835 100644 --- a/keyboards/handwired/illera16/readme.md +++ b/keyboards/handwired/illera16/readme.md @@ -1,7 +1,5 @@ # handwired/illera16 -![handwired/illera16](imgur.com image replace me!) - *hand wired 4x4 macro pad* * Keyboard Maintainer: [victor_illera](https://github.com/villeramassana)