From 3eb04fee87f0c07c7e89a5c47455ebec2d0f994f Mon Sep 17 00:00:00 2001 From: dztech Date: Thu, 16 Mar 2023 00:53:28 +0800 Subject: [PATCH 1/5] add tiger80 iso layout support (#19975) Co-authored-by: Joel Challis Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/kbdfans/tiger80/config.h | 17 +- keyboards/kbdfans/tiger80/info.json | 318 ++++++++++++------ .../kbdfans/tiger80/keymaps/iso/keymap.c | 30 ++ keyboards/kbdfans/tiger80/rules.mk | 12 - keyboards/kbdfans/tiger80/tiger80.c | 17 - keyboards/kbdfans/tiger80/tiger80.h | 35 -- 6 files changed, 245 insertions(+), 184 deletions(-) create mode 100644 keyboards/kbdfans/tiger80/keymaps/iso/keymap.c delete mode 100644 keyboards/kbdfans/tiger80/tiger80.c delete mode 100644 keyboards/kbdfans/tiger80/tiger80.h diff --git a/keyboards/kbdfans/tiger80/config.h b/keyboards/kbdfans/tiger80/config.h index ec6d3d3095d..6b4667513ca 100644 --- a/keyboards/kbdfans/tiger80/config.h +++ b/keyboards/kbdfans/tiger80/config.h @@ -16,16 +16,6 @@ #pragma once - -#define MATRIX_ROW_PINS { B0, E6, B1, B4, D1, D2 } -#define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, D3, D5, D4, D6, D7, B5, B6, C6, E2, D0 } - -#define DIODE_DIRECTION COL2ROW - -#define LOCKING_SUPPORT_ENABLE -#define LOCKING_RESYNC_ENABLE - -#define RGB_DI_PIN B3 #ifdef RGB_DI_PIN #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD @@ -37,13 +27,8 @@ #define RGBLIGHT_EFFECT_RGB_TEST #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_EFFECT_RAINBOW_MOOD + 6) +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_EFFECT_RAINBOW_MOOD + 6) #define RGBLIGHT_DEFAULT_SPD 15 -#define RGBLED_NUM 20 -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 10 -#define RGBLIGHT_VAL_STEP 10 -#define RGBLIGHT_SLEEP #endif #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 diff --git a/keyboards/kbdfans/tiger80/info.json b/keyboards/kbdfans/tiger80/info.json index 916fd1c6db9..9741c68cb2e 100644 --- a/keyboards/kbdfans/tiger80/info.json +++ b/keyboards/kbdfans/tiger80/info.json @@ -1,119 +1,229 @@ { - "keyboard_name": "Tiger80", "manufacturer": "KBDFans", - "url": "", - "maintainer": "kbdfans", - "usb": { - "vid": "0x4B42", - "pid": "0x0011", - "device_version": "0.0.1" + "keyboard_name": "Tiger80", + "maintainer": "kbdfans", + "bootloader": "atmel-dfu", + "diode_direction": "COL2ROW", + "features": { + "audio": false, + "backlight": false, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true }, "indicators": { "caps_lock": "C7", + "on_state": 1, "scroll_lock": "B2" }, - "processor": "atmega32u4", - "bootloader": "atmel-dfu", - "layout_aliases": { - "LAYOUT_all": "LAYOUT_tkl_f13_ansi_tsangan" + "matrix_pins": { + "cols": ["F7", "F6", "F5", "F4", "F1", "F0", "D3", "D5", "D4", "D6", "D7", "B5", "B6", "C6", "E2", "D0"], + "rows": ["B0", "E6", "B1", "B4", "D1", "D2"] }, - "community_layouts": ["tkl_f13_ansi_tsangan"], + "processor": "atmega32u4", + "rgblight": { + "brightness_steps": 10, + "hue_steps": 10, + "led_count": 20, + "pin": "B3", + "saturation_steps": 10, + "sleep": true + }, + "url": "", + "usb": { + "device_version": "0.0.1", + "pid": "0x0011", + "vid": "0x4B42" + }, + "community_layouts": ["tkl_f13_ansi_tsangan", "tkl_f13_iso_tsangan"], "layouts": { "LAYOUT_tkl_f13_ansi_tsangan": { "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":1.25, "y":0}, - {"label":"F2", "x":2.25, "y":0}, - {"label":"F3", "x":3.25, "y":0}, - {"label":"F4", "x":4.25, "y":0}, - {"label":"F5", "x":5.5, "y":0}, - {"label":"F6", "x":6.5, "y":0}, - {"label":"F7", "x":7.5, "y":0}, - {"label":"F8", "x":8.5, "y":0}, - {"label":"F9", "x":9.75, "y":0}, - {"label":"F10", "x":10.75, "y":0}, - {"label":"F11", "x":11.75, "y":0}, - {"label":"F12", "x":12.75, "y":0}, - {"label":"F13", "x":14, "y":0}, - {"label":"PrtSc", "x":15.25, "y":0}, - {"label":"Scroll Lock", "x":16.25, "y":0}, - {"label":"Pause", "x":17.25, "y":0}, - - {"label":"`~", "x":0, "y":1.5}, - {"label":"1!", "x":1, "y":1.5}, - {"label":"2@", "x":2, "y":1.5}, - {"label":"3#", "x":3, "y":1.5}, - {"label":"4$", "x":4, "y":1.5}, - {"label":"5%", "x":5, "y":1.5}, - {"label":"6^", "x":6, "y":1.5}, - {"label":"7", "x":7, "y":1.5}, - {"label":"8*", "x":8, "y":1.5}, - {"label":"9(", "x":9, "y":1.5}, - {"label":"0)", "x":10, "y":1.5}, - {"label":"-_", "x":11, "y":1.5}, - {"label":"=+", "x":12, "y":1.5}, - {"label":"Backspace", "x":13, "y":1.5, "w":2}, - {"label":"Insert", "x":15.25, "y":1.5}, - {"label":"Home", "x":16.25, "y":1.5}, - {"label":"PgUp", "x":17.25, "y":1.5}, - - {"label":"Tab", "x":0, "y":2.5, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.5}, - {"label":"W", "x":2.5, "y":2.5}, - {"label":"E", "x":3.5, "y":2.5}, - {"label":"R", "x":4.5, "y":2.5}, - {"label":"T", "x":5.5, "y":2.5}, - {"label":"Y", "x":6.5, "y":2.5}, - {"label":"U", "x":7.5, "y":2.5}, - {"label":"I", "x":8.5, "y":2.5}, - {"label":"O", "x":9.5, "y":2.5}, - {"label":"P", "x":10.5, "y":2.5}, - {"label":"[{", "x":11.5, "y":2.5}, - {"label":"]}", "x":12.5, "y":2.5}, - {"label":"\\|", "x":13.5, "y":2.5, "w":1.5}, - {"label":"Delete", "x":15.25, "y":2.5}, - {"label":"End", "x":16.25, "y":2.5}, - {"label":"PgDn", "x":17.25, "y":2.5}, - - {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, - {"label":"A", "x":1.75, "y":3.5}, - {"label":"S", "x":2.75, "y":3.5}, - {"label":"D", "x":3.75, "y":3.5}, - {"label":"F", "x":4.75, "y":3.5}, - {"label":"G", "x":5.75, "y":3.5}, - {"label":"H", "x":6.75, "y":3.5}, - {"label":"J", "x":7.75, "y":3.5}, - {"label":"K", "x":8.75, "y":3.5}, - {"label":"L", "x":9.75, "y":3.5}, - {"label":";:", "x":10.75, "y":3.5}, - {"label":"'\"", "x":11.75, "y":3.5}, - {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, - - {"label":"Shift", "x":0, "y":4.5, "w":2.25}, - {"label":"Z", "x":2.25, "y":4.5}, - {"label":"X", "x":3.25, "y":4.5}, - {"label":"C", "x":4.25, "y":4.5}, - {"label":"V", "x":5.25, "y":4.5}, - {"label":"B", "x":6.25, "y":4.5}, - {"label":"N", "x":7.25, "y":4.5}, - {"label":"M", "x":8.25, "y":4.5}, - {"label":",<", "x":9.25, "y":4.5}, - {"label":".>", "x":10.25, "y":4.5}, - {"label":"/?", "x":11.25, "y":4.5}, - {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, - {"label":"\u2191", "x":16.25, "y":4.5}, - - {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, - {"label":"Win", "x":1.5, "y":5.5}, - {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, - {"label":"Space", "x":4, "y":5.5, "w":7}, - {"label":"Alt", "x":11, "y":5.5, "w":1.5}, - {"label":"Win", "x":12.5, "y":5.5}, - {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, - {"label":"\u2190", "x":15.25, "y":5.5}, - {"label":"\u2193", "x":16.25, "y":5.5}, - {"label":"\u2192", "x":17.25, "y":5.5} + { "label": "Esc", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "F1", "matrix": [0, 1], "x": 1.25, "y": 0 }, + { "label": "F2", "matrix": [0, 2], "x": 2.25, "y": 0 }, + { "label": "F3", "matrix": [0, 3], "x": 3.25, "y": 0 }, + { "label": "F4", "matrix": [0, 4], "x": 4.25, "y": 0 }, + { "label": "F5", "matrix": [0, 5], "x": 5.5, "y": 0 }, + { "label": "F6", "matrix": [0, 6], "x": 6.5, "y": 0 }, + { "label": "F7", "matrix": [0, 7], "x": 7.5, "y": 0 }, + { "label": "F8", "matrix": [0, 8], "x": 8.5, "y": 0 }, + { "label": "F9", "matrix": [0, 9], "x": 9.75, "y": 0 }, + { "label": "F10", "matrix": [0, 10], "x": 10.75, "y": 0 }, + { "label": "F11", "matrix": [0, 11], "x": 11.75, "y": 0 }, + { "label": "F12", "matrix": [0, 12], "x": 12.75, "y": 0 }, + { "label": "F13", "matrix": [0, 13], "x": 14, "y": 0 }, + { "label": "PrtSc", "matrix": [0, 14], "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "matrix": [0, 15], "x": 16.25, "y": 0 }, + { "label": "Pause", "matrix": [3, 15], "x": 17.25, "y": 0 }, + { "label": "`~", "matrix": [1, 0], "x": 0, "y": 1.5 }, + { "label": "1!", "matrix": [1, 1], "x": 1, "y": 1.5 }, + { "label": "2@", "matrix": [1, 2], "x": 2, "y": 1.5 }, + { "label": "3#", "matrix": [1, 3], "x": 3, "y": 1.5 }, + { "label": "4$", "matrix": [1, 4], "x": 4, "y": 1.5 }, + { "label": "5%", "matrix": [1, 5], "x": 5, "y": 1.5 }, + { "label": "6^", "matrix": [1, 6], "x": 6, "y": 1.5 }, + { "label": "7", "matrix": [1, 7], "x": 7, "y": 1.5 }, + { "label": "8*", "matrix": [1, 8], "x": 8, "y": 1.5 }, + { "label": "9(", "matrix": [1, 9], "x": 9, "y": 1.5 }, + { "label": "0)", "matrix": [1, 10], "x": 10, "y": 1.5 }, + { "label": "-_", "matrix": [1, 11], "x": 11, "y": 1.5 }, + { "label": "=+", "matrix": [1, 12], "x": 12, "y": 1.5 }, + { "label": "Backspace", "matrix": [1, 13], "w": 2, "x": 13, "y": 1.5 }, + { "label": "Insert", "matrix": [1, 14], "x": 15.25, "y": 1.5 }, + { "label": "Home", "matrix": [1, 15], "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "matrix": [3, 14], "x": 17.25, "y": 1.5 }, + { "label": "Tab", "matrix": [2, 0], "w": 1.5, "x": 0, "y": 2.5 }, + { "label": "Q", "matrix": [2, 1], "x": 1.5, "y": 2.5 }, + { "label": "W", "matrix": [2, 2], "x": 2.5, "y": 2.5 }, + { "label": "E", "matrix": [2, 3], "x": 3.5, "y": 2.5 }, + { "label": "R", "matrix": [2, 4], "x": 4.5, "y": 2.5 }, + { "label": "T", "matrix": [2, 5], "x": 5.5, "y": 2.5 }, + { "label": "Y", "matrix": [2, 6], "x": 6.5, "y": 2.5 }, + { "label": "U", "matrix": [2, 7], "x": 7.5, "y": 2.5 }, + { "label": "I", "matrix": [2, 8], "x": 8.5, "y": 2.5 }, + { "label": "O", "matrix": [2, 9], "x": 9.5, "y": 2.5 }, + { "label": "P", "matrix": [2, 10], "x": 10.5, "y": 2.5 }, + { "label": "[{", "matrix": [2, 11], "x": 11.5, "y": 2.5 }, + { "label": "]}", "matrix": [2, 12], "x": 12.5, "y": 2.5 }, + { "label": "\\|", "matrix": [2, 13], "w": 1.5, "x": 13.5, "y": 2.5 }, + { "label": "Delete", "matrix": [2, 14], "x": 15.25, "y": 2.5 }, + { "label": "End", "matrix": [2, 15], "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "matrix": [4, 14], "x": 17.25, "y": 2.5 }, + { "label": "Caps Lock", "matrix": [3, 0], "w": 1.75, "x": 0, "y": 3.5 }, + { "label": "A", "matrix": [3, 1], "x": 1.75, "y": 3.5 }, + { "label": "S", "matrix": [3, 2], "x": 2.75, "y": 3.5 }, + { "label": "D", "matrix": [3, 3], "x": 3.75, "y": 3.5 }, + { "label": "F", "matrix": [3, 4], "x": 4.75, "y": 3.5 }, + { "label": "G", "matrix": [3, 5], "x": 5.75, "y": 3.5 }, + { "label": "H", "matrix": [3, 6], "x": 6.75, "y": 3.5 }, + { "label": "J", "matrix": [3, 7], "x": 7.75, "y": 3.5 }, + { "label": "K", "matrix": [3, 8], "x": 8.75, "y": 3.5 }, + { "label": "L", "matrix": [3, 9], "x": 9.75, "y": 3.5 }, + { "label": ";:", "matrix": [3, 10], "x": 10.75, "y": 3.5 }, + { "label": "'\"", "matrix": [3, 11], "x": 11.75, "y": 3.5 }, + { "label": "Enter", "matrix": [3, 13], "w": 2.25, "x": 12.75, "y": 3.5 }, + { "label": "Shift", "matrix": [4, 0], "w": 2.25, "x": 0, "y": 4.5 }, + { "label": "Z", "matrix": [4, 2], "x": 2.25, "y": 4.5 }, + { "label": "X", "matrix": [4, 3], "x": 3.25, "y": 4.5 }, + { "label": "C", "matrix": [4, 4], "x": 4.25, "y": 4.5 }, + { "label": "V", "matrix": [4, 5], "x": 5.25, "y": 4.5 }, + { "label": "B", "matrix": [4, 6], "x": 6.25, "y": 4.5 }, + { "label": "N", "matrix": [4, 7], "x": 7.25, "y": 4.5 }, + { "label": "M", "matrix": [4, 8], "x": 8.25, "y": 4.5 }, + { "label": ",<", "matrix": [4, 9], "x": 9.25, "y": 4.5 }, + { "label": ".>", "matrix": [4, 10], "x": 10.25, "y": 4.5 }, + { "label": "/?", "matrix": [4, 11], "x": 11.25, "y": 4.5 }, + { "label": "Shift", "matrix": [4, 13], "w": 2.75, "x": 12.25, "y": 4.5 }, + { "label": "\u2191", "matrix": [4, 15], "x": 16.25, "y": 4.5 }, + { "label": "Ctrl", "matrix": [5, 0], "w": 1.5, "x": 0, "y": 5.5 }, + { "label": "Win", "matrix": [5, 1], "x": 1.5, "y": 5.5 }, + { "label": "Alt", "matrix": [5, 2], "w": 1.5, "x": 2.5, "y": 5.5 }, + { "label": "Space", "matrix": [5, 6], "w": 7, "x": 4, "y": 5.5 }, + { "label": "Alt", "matrix": [5, 10], "w": 1.5, "x": 11, "y": 5.5 }, + { "label": "Win", "matrix": [5, 11], "x": 12.5, "y": 5.5 }, + { "label": "Ctrl", "matrix": [5, 12], "w": 1.5, "x": 13.5, "y": 5.5 }, + { "label": "\u2190", "matrix": [5, 13], "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "matrix": [5, 14], "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "matrix": [5, 15], "x": 17.25, "y": 5.5 } + ] + }, + "LAYOUT_tkl_f13_iso_tsangan": { + "layout": [ + { "label": "K00", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "K01", "matrix": [0, 1], "x": 1, "y": 0 }, + { "label": "K02", "matrix": [0, 2], "x": 2, "y": 0 }, + { "label": "K03", "matrix": [0, 3], "x": 3, "y": 0 }, + { "label": "K04", "matrix": [0, 4], "x": 4, "y": 0 }, + { "label": "K05", "matrix": [0, 5], "x": 5, "y": 0 }, + { "label": "K06", "matrix": [0, 6], "x": 6, "y": 0 }, + { "label": "K07", "matrix": [0, 7], "x": 7, "y": 0 }, + { "label": "K08", "matrix": [0, 8], "x": 8, "y": 0 }, + { "label": "K09", "matrix": [0, 9], "x": 9, "y": 0 }, + { "label": "K0A", "matrix": [0, 10], "x": 10, "y": 0 }, + { "label": "K0B", "matrix": [0, 11], "x": 11, "y": 0 }, + { "label": "K0C", "matrix": [0, 12], "x": 12, "y": 0 }, + { "label": "K0D", "matrix": [0, 13], "x": 13, "y": 0 }, + { "label": "K0E", "matrix": [0, 14], "x": 14, "y": 0 }, + { "label": "K0F", "matrix": [0, 15], "x": 15, "y": 0 }, + { "label": "K3F", "matrix": [3, 15], "x": 16, "y": 0 }, + { "label": "K10", "matrix": [1, 0], "x": 17, "y": 0 }, + { "label": "K11", "matrix": [1, 1], "x": 18, "y": 0 }, + { "label": "K12", "matrix": [1, 2], "x": 19, "y": 0 }, + { "label": "K13", "matrix": [1, 3], "x": 20, "y": 0 }, + { "label": "K14", "matrix": [1, 4], "x": 21, "y": 0 }, + { "label": "K15", "matrix": [1, 5], "x": 22, "y": 0 }, + { "label": "K16", "matrix": [1, 6], "x": 23, "y": 0 }, + { "label": "K17", "matrix": [1, 7], "x": 24, "y": 0 }, + { "label": "K18", "matrix": [1, 8], "x": 25, "y": 0 }, + { "label": "K19", "matrix": [1, 9], "x": 26, "y": 0 }, + { "label": "K1A", "matrix": [1, 10], "x": 27, "y": 0 }, + { "label": "K1B", "matrix": [1, 11], "x": 28, "y": 0 }, + { "label": "K1C", "matrix": [1, 12], "x": 29, "y": 0 }, + { "label": "K1D", "matrix": [1, 13], "x": 30, "y": 0 }, + { "label": "K1E", "matrix": [1, 14], "x": 31, "y": 0 }, + { "label": "K1F", "matrix": [1, 15], "x": 32, "y": 0 }, + { "label": "K3E", "matrix": [3, 14], "x": 33, "y": 0 }, + { "label": "K20", "matrix": [2, 0], "x": 34, "y": 0 }, + { "label": "K21", "matrix": [2, 1], "x": 35, "y": 0 }, + { "label": "K22", "matrix": [2, 2], "x": 36, "y": 0 }, + { "label": "K23", "matrix": [2, 3], "x": 37, "y": 0 }, + { "label": "K24", "matrix": [2, 4], "x": 38, "y": 0 }, + { "label": "K25", "matrix": [2, 5], "x": 39, "y": 0 }, + { "label": "K26", "matrix": [2, 6], "x": 40, "y": 0 }, + { "label": "K27", "matrix": [2, 7], "x": 41, "y": 0 }, + { "label": "K28", "matrix": [2, 8], "x": 42, "y": 0 }, + { "label": "K29", "matrix": [2, 9], "x": 43, "y": 0 }, + { "label": "K2A", "matrix": [2, 10], "x": 44, "y": 0 }, + { "label": "K2B", "matrix": [2, 11], "x": 45, "y": 0 }, + { "label": "K2C", "matrix": [2, 12], "x": 46, "y": 0 }, + { "label": "K2D", "matrix": [2, 13], "x": 47, "y": 0 }, + { "label": "K2E", "matrix": [2, 14], "x": 48, "y": 0 }, + { "label": "K2F", "matrix": [2, 15], "x": 49, "y": 0 }, + { "label": "K4E", "matrix": [4, 14], "x": 50, "y": 0 }, + { "label": "K30", "matrix": [3, 0], "x": 51, "y": 0 }, + { "label": "K31", "matrix": [3, 1], "x": 52, "y": 0 }, + { "label": "K32", "matrix": [3, 2], "x": 53, "y": 0 }, + { "label": "K33", "matrix": [3, 3], "x": 54, "y": 0 }, + { "label": "K34", "matrix": [3, 4], "x": 55, "y": 0 }, + { "label": "K35", "matrix": [3, 5], "x": 56, "y": 0 }, + { "label": "K36", "matrix": [3, 6], "x": 57, "y": 0 }, + { "label": "K37", "matrix": [3, 7], "x": 58, "y": 0 }, + { "label": "K38", "matrix": [3, 8], "x": 59, "y": 0 }, + { "label": "K39", "matrix": [3, 9], "x": 60, "y": 0 }, + { "label": "K3A", "matrix": [3, 10], "x": 61, "y": 0 }, + { "label": "K3B", "matrix": [3, 11], "x": 62, "y": 0 }, + { "label": "K3D", "matrix": [3, 13], "x": 63, "y": 0 }, + { "label": "K40", "matrix": [4, 0], "x": 64, "y": 0 }, + { "label": "K41", "matrix": [4, 1], "x": 65, "y": 0 }, + { "label": "K42", "matrix": [4, 2], "x": 66, "y": 0 }, + { "label": "K43", "matrix": [4, 3], "x": 67, "y": 0 }, + { "label": "K44", "matrix": [4, 4], "x": 68, "y": 0 }, + { "label": "K45", "matrix": [4, 5], "x": 69, "y": 0 }, + { "label": "K46", "matrix": [4, 6], "x": 70, "y": 0 }, + { "label": "K47", "matrix": [4, 7], "x": 71, "y": 0 }, + { "label": "K48", "matrix": [4, 8], "x": 72, "y": 0 }, + { "label": "K49", "matrix": [4, 9], "x": 73, "y": 0 }, + { "label": "K4A", "matrix": [4, 10], "x": 74, "y": 0 }, + { "label": "K4B", "matrix": [4, 11], "x": 75, "y": 0 }, + { "label": "K4D", "matrix": [4, 13], "x": 76, "y": 0 }, + { "label": "K4F", "matrix": [4, 15], "x": 77, "y": 0 }, + { "label": "K50", "matrix": [5, 0], "x": 78, "y": 0 }, + { "label": "K51", "matrix": [5, 1], "x": 79, "y": 0 }, + { "label": "K52", "matrix": [5, 2], "x": 80, "y": 0 }, + { "label": "K56", "matrix": [5, 6], "x": 81, "y": 0 }, + { "label": "K5A", "matrix": [5, 10], "x": 82, "y": 0 }, + { "label": "K5B", "matrix": [5, 11], "x": 83, "y": 0 }, + { "label": "K5C", "matrix": [5, 12], "x": 84, "y": 0 }, + { "label": "K5D", "matrix": [5, 13], "x": 85, "y": 0 }, + { "label": "K5E", "matrix": [5, 14], "x": 86, "y": 0 }, + { "label": "K5F", "matrix": [5, 15], "x": 87, "y": 0 } ] } } } + diff --git a/keyboards/kbdfans/tiger80/keymaps/iso/keymap.c b/keyboards/kbdfans/tiger80/keymaps/iso/keymap.c new file mode 100644 index 00000000000..6e6dd4c48b3 --- /dev/null +++ b/keyboards/kbdfans/tiger80/keymaps/iso/keymap.c @@ -0,0 +1,30 @@ +/* Copyright 2023 DZTECH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl_f13_iso_tsangan( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_PSCR, KC_SCRL, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + +}; diff --git a/keyboards/kbdfans/tiger80/rules.mk b/keyboards/kbdfans/tiger80/rules.mk index b851d0ab392..e69de29bb2d 100644 --- a/keyboards/kbdfans/tiger80/rules.mk +++ b/keyboards/kbdfans/tiger80/rules.mk @@ -1,12 +0,0 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output diff --git a/keyboards/kbdfans/tiger80/tiger80.c b/keyboards/kbdfans/tiger80/tiger80.c deleted file mode 100644 index 8348a142a21..00000000000 --- a/keyboards/kbdfans/tiger80/tiger80.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright 2022 DZTECH - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "tiger80.h" diff --git a/keyboards/kbdfans/tiger80/tiger80.h b/keyboards/kbdfans/tiger80/tiger80.h deleted file mode 100644 index 376759a55d9..00000000000 --- a/keyboards/kbdfans/tiger80/tiger80.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2022 DZTECH - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include "quantum.h" - -#define LAYOUT_tkl_f13_ansi_tsangan( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K3F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K3E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K4E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \ - K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ - { K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F } \ -} From 54dca8cbff3eebcd40d47adea82317ee54260f70 Mon Sep 17 00:00:00 2001 From: mjbogusz Date: Wed, 15 Mar 2023 21:30:29 +0100 Subject: [PATCH 2/5] [Keyboard] Add Atlantis PS17 (#19952) --- keyboards/atlantis/ps17/config.h | 53 ++++++++++ keyboards/atlantis/ps17/info.json | 99 +++++++++++++++++++ .../atlantis/ps17/keymaps/default/keymap.c | 49 +++++++++ .../atlantis/ps17/keymaps/multimedia/keymap.c | 49 +++++++++ .../atlantis/ps17/keymaps/multimedia/rules.mk | 1 + keyboards/atlantis/ps17/keymaps/via/keymap.c | 49 +++++++++ keyboards/atlantis/ps17/keymaps/via/rules.mk | 2 + keyboards/atlantis/ps17/ps17.c | 53 ++++++++++ keyboards/atlantis/ps17/readme.md | 34 +++++++ keyboards/atlantis/ps17/rules.mk | 1 + 10 files changed, 390 insertions(+) create mode 100644 keyboards/atlantis/ps17/config.h create mode 100644 keyboards/atlantis/ps17/info.json create mode 100644 keyboards/atlantis/ps17/keymaps/default/keymap.c create mode 100644 keyboards/atlantis/ps17/keymaps/multimedia/keymap.c create mode 100644 keyboards/atlantis/ps17/keymaps/multimedia/rules.mk create mode 100644 keyboards/atlantis/ps17/keymaps/via/keymap.c create mode 100644 keyboards/atlantis/ps17/keymaps/via/rules.mk create mode 100644 keyboards/atlantis/ps17/ps17.c create mode 100644 keyboards/atlantis/ps17/readme.md create mode 100644 keyboards/atlantis/ps17/rules.mk diff --git a/keyboards/atlantis/ps17/config.h b/keyboards/atlantis/ps17/config.h new file mode 100644 index 00000000000..5638e334bd5 --- /dev/null +++ b/keyboards/atlantis/ps17/config.h @@ -0,0 +1,53 @@ +// Copyright 2023 mjbogusz (@mjbogusz) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* Indicator LEDs */ +#define LED_INDICATOR_0_PIN D0 +#define LED_INDICATOR_1_PIN D5 +#define LED_INDICATOR_2_PIN D4 + +/* RGB matrix */ +#define RGB_DI_PIN B7 +#define RGB_MATRIX_LED_COUNT 28 +#define RGB_MATRIX_KEYPRESSES +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +#ifdef RGB_MATRIX_ENABLE + // RGB Matrix Animation modes. Explicitly enabled + // For full list of effects, see: + // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects + #define ENABLE_RGB_MATRIX_SOLID_COLOR + // #define ENABLE_RGB_MATRIX_ALPHAS_MODS + // #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN + // #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT + // #define ENABLE_RGB_MATRIX_BREATHING + // #define ENABLE_RGB_MATRIX_BAND_SAT + // #define ENABLE_RGB_MATRIX_BAND_VAL + // #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + // #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + // #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT + // #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL + #define ENABLE_RGB_MATRIX_CYCLE_ALL + // #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + // #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN + // #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + // #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN + // #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL + // #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL + // #define ENABLE_RGB_MATRIX_DUAL_BEACON + #define ENABLE_RGB_MATRIX_RAINBOW_BEACON + // #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS + // #define ENABLE_RGB_MATRIX_RAINDROPS + // #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + // #define ENABLE_RGB_MATRIX_HUE_BREATHING + // #define ENABLE_RGB_MATRIX_HUE_PENDULUM + // #define ENABLE_RGB_MATRIX_HUE_WAVE + // #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + // #define ENABLE_RGB_MATRIX_PIXEL_FLOW + #define ENABLE_RGB_MATRIX_PIXEL_RAIN + // #define ENABLE_RGB_MATRIX_TYPING_HEATMAP + // #define ENABLE_RGB_MATRIX_DIGITAL_RAIN +#endif diff --git a/keyboards/atlantis/ps17/info.json b/keyboards/atlantis/ps17/info.json new file mode 100644 index 00000000000..5b025c83f7c --- /dev/null +++ b/keyboards/atlantis/ps17/info.json @@ -0,0 +1,99 @@ +{ + "manufacturer": "Atlantis", + "keyboard_name": "PS17", + "maintainer": "mjbogusz", + "url": "https://qmk.fm/keyboards/", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "bootloader_instructions": "To reset the board into bootloader mode, tap the Reset switch mounted on the bottom of the PCB.", + "usb": { + "device_version": "1.0.0", + "pid": "0x414B", + "vid": "0x0015" + }, + "features": { + "bootmagic": false, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "encoder": true, + "rgb_matrix": true + }, + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["F6", "F7", "D3", "D6"], + "rows": ["F0", "B4", "B5", "B6", "C6", "C7", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN"] + }, + "encoder": { + "rotary": [{ + "pin_a": "D2", + "pin_b": "D1" + }] + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 1], "x": 0, "y": 0}, + + { "matrix": [1, 0], "x": 0, "y": 1.5}, + { "matrix": [1, 1], "x": 1, "y": 1.5}, + { "matrix": [1, 2], "x": 2, "y": 1.5}, + { "matrix": [1, 3], "x": 3, "y": 1.5}, + + { "matrix": [2, 0], "x": 0, "y": 2.5}, + { "matrix": [2, 1], "x": 1, "y": 2.5}, + { "matrix": [2, 2], "x": 2, "y": 2.5}, + { "matrix": [2, 3], "x": 3, "y": 2.5, "h": 2}, + + { "matrix": [3, 0], "x": 0, "y": 3.5}, + { "matrix": [3, 1], "x": 1, "y": 3.5}, + { "matrix": [3, 2], "x": 2, "y": 3.5}, + + { "matrix": [4, 0], "x": 0, "y": 4.5}, + { "matrix": [4, 1], "x": 1, "y": 4.5}, + { "matrix": [4, 2], "x": 2, "y": 4.5}, + { "matrix": [4, 3], "x": 3, "y": 4.5, "h": 2}, + + { "matrix": [5, 0], "x": 0, "y": 5.5, "w": 2}, + { "matrix": [5, 2], "x": 2, "y": 5.5} + ] + } + }, + "rgb_matrix": { + "driver": "WS2812", + "center_point": [126, 126], + "layout": [ + { "flags": 4, "matrix": [1, 0], "x": 74, "y": 165 }, + { "flags": 4, "matrix": [1, 1], "x": 108, "y": 165 }, + { "flags": 4, "matrix": [1, 2], "x": 144, "y": 165 }, + { "flags": 4, "matrix": [1, 3], "x": 179, "y": 165 }, + { "flags": 4, "matrix": [2, 0], "x": 74, "y": 129 }, + { "flags": 4, "matrix": [2, 1], "x": 109, "y": 129 }, + { "flags": 4, "matrix": [2, 2], "x": 143, "y": 129 }, + { "flags": 4, "matrix": [2, 3], "x": 188, "y": 121 }, + { "flags": 4, "matrix": [3, 0], "x": 74, "y": 95 }, + { "flags": 4, "matrix": [3, 1], "x": 109, "y": 95 }, + { "flags": 4, "matrix": [3, 2], "x": 143, "y": 95 }, + { "flags": 4, "matrix": [4, 0], "x": 73, "y": 60 }, + { "flags": 4, "matrix": [4, 1], "x": 109, "y": 60 }, + { "flags": 4, "matrix": [4, 2], "x": 144, "y": 60 }, + { "flags": 4, "matrix": [4, 3], "x": 188, "y": 51 }, + { "flags": 4, "matrix": [5, 0], "x": 91, "y": 25 }, + { "flags": 4, "matrix": [5, 2], "x": 144, "y": 25 }, + + { "flags": 2, "x": 61, "y": 26}, + { "flags": 2, "x": 61, "y": 88}, + { "flags": 2, "x": 61, "y": 158}, + { "flags": 2, "x": 61, "y": 197}, + { "flags": 2, "x": 61, "y": 232}, + { "flags": 2, "x": 192, "y": 232}, + { "flags": 2, "x": 192, "y": 196}, + { "flags": 2, "x": 192, "y": 158}, + { "flags": 2, "x": 192, "y": 87}, + { "flags": 2, "x": 183, "y": 26}, + { "flags": 2, "x": 127, "y": 24} + ] + } +} diff --git a/keyboards/atlantis/ps17/keymaps/default/keymap.c b/keyboards/atlantis/ps17/keymaps/default/keymap.c new file mode 100644 index 00000000000..b5d36f02a7e --- /dev/null +++ b/keyboards/atlantis/ps17/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +// Copyright 2023 mjbogusz (@mjbogusz) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default layer: numpad + volume control + [0] = LAYOUT( + KC_MUTE, + TO(1), KC_PSLS, KC_PAST, KC_PMNS, + KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, + KC_KP_4, KC_KP_5, KC_KP_6, + KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, + KC_KP_0, KC_PDOT + ), + [1] = LAYOUT( + RGB_MOD, + TO(2), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), + [2] = LAYOUT( + RGB_MOD, + TO(3), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), + [3] = LAYOUT( + RGB_MOD, + TO(0), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_HUI, RGB_HUD) }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, +}; +#endif diff --git a/keyboards/atlantis/ps17/keymaps/multimedia/keymap.c b/keyboards/atlantis/ps17/keymaps/multimedia/keymap.c new file mode 100644 index 00000000000..32d20ef86c3 --- /dev/null +++ b/keyboards/atlantis/ps17/keymaps/multimedia/keymap.c @@ -0,0 +1,49 @@ +// Copyright 2023 mjbogusz (@mjbogusz) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default layer: numpad + volume control + [0] = LAYOUT( + KC_MUTE, + TO(1), KC_PSLS, KC_PAST, KC_PMNS, + KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, + KC_KP_4, KC_KP_5, KC_KP_6, + KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, + KC_KP_0, KC_PDOT + ), + [1] = LAYOUT( + KC_MUTE, + TO(2), XXXXXXX, XXXXXXX, KC_VOLD, + XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, + KC_MRWD, KC_MPLY, KC_MFFD, + KC_MPRV, KC_MSTP, KC_MNXT, KC_MSEL, + XXXXXXX, XXXXXXX + ), + [2] = LAYOUT( + RGB_MOD, + TO(3), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), + [3] = LAYOUT( + KC_TRNS, + TO(0), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [2] = { ENCODER_CCW_CW(RGB_HUI, RGB_HUD) }, + [3] = { ENCODER_CCW_CW(RGB_HUI, RGB_HUD) }, +}; +#endif diff --git a/keyboards/atlantis/ps17/keymaps/multimedia/rules.mk b/keyboards/atlantis/ps17/keymaps/multimedia/rules.mk new file mode 100644 index 00000000000..ee325681483 --- /dev/null +++ b/keyboards/atlantis/ps17/keymaps/multimedia/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/atlantis/ps17/keymaps/via/keymap.c b/keyboards/atlantis/ps17/keymaps/via/keymap.c new file mode 100644 index 00000000000..93a158172d1 --- /dev/null +++ b/keyboards/atlantis/ps17/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +// Copyright 2023 mjbogusz (@mjbogusz) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default layer: numpad + volume control + [0] = LAYOUT( + KC_MUTE, + TO(1), KC_PSLS, KC_PAST, KC_PMNS, + KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, + KC_KP_4, KC_KP_5, KC_KP_6, + KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, + KC_KP_0, KC_PDOT + ), + [1] = LAYOUT( + RGB_MOD, + TO(2), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), + [2] = LAYOUT( + KC_TRNS, + TO(3), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), + [3] = LAYOUT( + KC_TRNS, + TO(0), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_HUI, RGB_HUD) }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, +}; +#endif diff --git a/keyboards/atlantis/ps17/keymaps/via/rules.mk b/keyboards/atlantis/ps17/keymaps/via/rules.mk new file mode 100644 index 00000000000..715838ecc5d --- /dev/null +++ b/keyboards/atlantis/ps17/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +ENCODER_MAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/atlantis/ps17/ps17.c b/keyboards/atlantis/ps17/ps17.c new file mode 100644 index 00000000000..ccac1ce9230 --- /dev/null +++ b/keyboards/atlantis/ps17/ps17.c @@ -0,0 +1,53 @@ +// Copyright 2023 mjbogusz (@mjbogusz) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +layer_state_t layer_state_set_kb(layer_state_t state) { + /* Display current layer using indicator LEDs */ + writePin(LED_INDICATOR_0_PIN, !IS_LAYER_ON_STATE(state, 1)); + writePin(LED_INDICATOR_1_PIN, !IS_LAYER_ON_STATE(state, 2)); + writePin(LED_INDICATOR_2_PIN, !IS_LAYER_ON_STATE(state, 3)); + return layer_state_set_user(state); +} + +void keyboard_pre_init_kb(void) { + /* Set indicator LEDs as outputs */ + setPinOutput(LED_INDICATOR_0_PIN); + setPinOutput(LED_INDICATOR_1_PIN); + setPinOutput(LED_INDICATOR_2_PIN); + keyboard_pre_init_user(); +} + +#if defined(ENCODER_ENABLE) +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { + /* Don't process further events if user function exists and returns false */ + return false; + } + + /* Ignore index - only one encoder on this board */ + if (clockwise) { + tap_code_delay(KC_VOLU, 10); + } else { + tap_code_delay(KC_VOLD, 10); + } + return false; +} +#endif + +#ifdef RGB_MATRIX_ENABLE +void suspend_power_down_kb(void) { + /* Disable indicator LEDs when going to sleep */ + writePin(LED_INDICATOR_0_PIN, 1); + writePin(LED_INDICATOR_1_PIN, 1); + writePin(LED_INDICATOR_2_PIN, 1); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + /* Restore indicator LEDs state */ + layer_state_set_kb(layer_state); + suspend_wakeup_init_user(); +} +#endif diff --git a/keyboards/atlantis/ps17/readme.md b/keyboards/atlantis/ps17/readme.md new file mode 100644 index 00000000000..69d735739b9 --- /dev/null +++ b/keyboards/atlantis/ps17/readme.md @@ -0,0 +1,34 @@ +# atlantis/ps17 + +![atlantis/ps17](https://i.imgur.com/5qGIv2Kh.jpg) + +A 17-key hot-swap numpad/macropad with an EC11 clickable rotary encoder (knob) and RGB backlight and underglow + +* Keyboard Maintainer: [mjbogusz](https://github.com/mjbogusz) +* Hardware Supported: Atlantis PS17 +* Hardware Availability: [AliExpress, SpiderIsland Tech Co., Ltd Store](https://www.aliexpress.com/item/1005003058226085.html) +* Additional photos: + * [Full size](https://i.imgur.com/5qGIv2K.jpg) + * [PCB front](https://i.imgur.com/OmGBqvC.jpg) + * [PCB back](https://i.imgur.com/rvoZZ5f.jpg) + +Make example for this keyboard (after setting up your build environment): + + make atlantis/ps17:default + +Flashing example for this keyboard: + + make atlantis/ps17: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: + +* **Physical reset button**: Briefly press the button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available + +## Attributions + +Pin mapping and LED physical layout based on [Solartempest work](https://github.com/solartempest/qmk_firmware/tree/master/keyboards/solartempest/ps17) diff --git a/keyboards/atlantis/ps17/rules.mk b/keyboards/atlantis/ps17/rules.mk new file mode 100644 index 00000000000..4da205a168c --- /dev/null +++ b/keyboards/atlantis/ps17/rules.mk @@ -0,0 +1 @@ +LTO_ENABLE = yes From 012fa6dd4544f25e73b086c377e9f1a57d3d46a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=97=E3=81=90=E3=82=8C?= <23041178+ForsakenRei@users.noreply.github.com> Date: Wed, 15 Mar 2023 18:55:18 -0400 Subject: [PATCH 3/5] [Doc] Add example to keyboard housekeeping and some minor fixes (#19968) Co-authored-by: jack <0x6a73@protonmail.com> --- docs/custom_quantum_functions.md | 58 ++++++++++++++++++++++- docs/feature_advanced_keycodes.md | 5 ++ docs/feature_key_overrides.md | 34 ++++++------- keyboards/gray_studio/space65r3/readme.md | 2 +- 4 files changed, 80 insertions(+), 19 deletions(-) diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 2917fbad268..5d63f3cfb7d 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -202,6 +202,62 @@ This function gets called at the end of all QMK processing, before starting the Similar to `matrix_scan_*`, these are called as often as the MCU can handle. To keep your board responsive, it's suggested to do as little as possible during these function calls, potentially throtting their behaviour if you do indeed require implementing something special. +### Example `void housekeeping_task_user(void)` implementation + +This example will show you how to use `void housekeeping_task_user(void)` to turn off [RGB Light](feature_rgblight.md). For RGB Matrix, the [builtin](https://docs.qmk.fm/#/feature_rgb_matrix?id=additional-configh-options) `RGB_MATRIX_TIMEOUT` should be used. + +First, add the following lines to your keymap's `config.h`: + +```c +#define RGBLIGHT_SLEEP // enable rgblight_suspend() and rgblight_wakeup() in keymap.c +#define RGBLIGHT_TIMEOUT 900000 // ms to wait until rgblight time out, 900K ms is 15min. +``` + +Next, add the following code to your `keymap.c`: + +```c +static uint32_t key_timer; // timer for last keyboard activity, use 32bit value and function to make longer idle time possible +static void refresh_rgb(void); // refreshes the activity timer and RGB, invoke whenever any activity happens +static void check_rgb_timeout(void); // checks if enough time has passed for RGB to timeout +bool is_rgb_timeout = false; // store if RGB has timed out or not in a boolean + +void refresh_rgb(void) { + key_timer = timer_read32(); // store time of last refresh + if (is_rgb_timeout) + { + is_rgb_timeout = false; + rgblight_wakeup(); + } +} +void check_rgb_timeout(void) { + if (!is_rgb_timeout && timer_elapsed32(key_timer) > RGBLIGHT_TIMEOUT) // check if RGB has already timeout and if enough time has passed + { + rgblight_suspend(); + is_rgb_timeout = true; + } +} +/* Then, call the above functions from QMK's built in post processing functions like so */ +/* Runs at the end of each scan loop, check if RGB timeout has occured or not */ +void housekeeping_task_user(void) { +#ifdef RGBLIGHT_TIMEOUT + check_rgb_timeout(); +#endif +} +/* Runs after each key press, check if activity occurred */ +void post_process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef RGBLIGHT_TIMEOUT + if (record->event.pressed) + refresh_rgb(); +#endif +} +/* Runs after each encoder tick, check if activity occurred */ +void post_encoder_update_user(uint8_t index, bool clockwise) { +#ifdef RGBLIGHT_TIMEOUT + refresh_rgb(); +#endif +} +``` + # Keyboard Idling/Wake Code If the board supports it, it can be "idled", by stopping a number of functions. A good example of this is RGB lights or backlights. This can save on power consumption, or may be better behavior for your keyboard. @@ -209,7 +265,7 @@ If the board supports it, it can be "idled", by stopping a number of functions. This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_init_*`, which are called when the system board is idled and when it wakes up, respectively. -### Example suspend_power_down_user() and suspend_wakeup_init_user() Implementation +### Example `suspend_power_down_user()` and `suspend_wakeup_init_user()` Implementation ```c diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index b04721b23a6..90f06e405a9 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -160,6 +160,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; ``` +Alternatively, this can be done with [Key Overrides](feature_key_overrides?id=simple-example). # Advanced topics :id=advanced-topics @@ -180,3 +181,7 @@ This page used to encompass a large set of features. We have moved many sections ## Tap-Hold Configuration Options :id=tap-hold-configuration-options * [Tap-Hold Configuration Options](tap_hold.md) + +## Key Overrides :id=key-overrides + +* [Key Overrides](feature_key_overrides.md) \ No newline at end of file diff --git a/docs/feature_key_overrides.md b/docs/feature_key_overrides.md index 36fd383cd45..608eb001e4b 100644 --- a/docs/feature_key_overrides.md +++ b/docs/feature_key_overrides.md @@ -1,4 +1,4 @@ -# Key Overrides +# Key Overrides :id=key-overrides Key overrides allow you to override modifier-key combinations to send a different modifier-key combination or perform completely custom actions. Don't want `shift` + `1` to type `!` on your computer? Use a key override to make your keyboard type something different when you press `shift` + `1`. The general behavior is like this: If `modifiers w` + `key x` are pressed, replace these keys with `modifiers y` + `key z` in the keyboard report. @@ -10,13 +10,13 @@ You can use key overrides in a similar way to momentary layer/fn keys to activat - Create custom shortcuts or change existing ones: E.g. Send `ctrl`+`shift`+`z` when `ctrl`+`y` is pressed. - Run custom code when `ctrl` + `alt` + `esc` is pressed. -## Setup +## Setup :id=setup To enable this feature, you need to add `KEY_OVERRIDE_ENABLE = yes` to your `rules.mk`. Then, in your `keymap.c` file, you'll need to define the array `key_overrides`, which defines all key overrides to be used. Each override is a value of type `key_override_t`. The array `key_overrides` is `NULL`-terminated and contains pointers to `key_override_t` values (`const key_override_t **`). -## Creating Key Overrides +## Creating Key Overrides :id=creating-key-overrides The `key_override_t` struct has many options that allow you to precisely tune your overrides. The full reference is shown below. Instead of manually creating a `key_override_t` value, it is recommended to use these dedicated initializers: @@ -34,7 +34,7 @@ Additionally takes a bitmask `options` that specifies additional options. See `k For more customization possibilities, you may directly create a `key_override_t`, which allows you to customize even more behavior. Read further below for details and examples. -## Simple Example +## Simple Example :id=simple-example This shows how the mentioned example of sending `delete` when `shift` + `backspace` are pressed is realized: @@ -48,9 +48,9 @@ const key_override_t **key_overrides = (const key_override_t *[]){ }; ``` -## Intermediate Difficulty Examples +## Intermediate Difficulty Examples :id=intermediate-difficulty-examples -### Media Controls & Screen Brightness +### Media Controls & Screen Brightness :id=media-controls-amp-screen-brightness In this example a single key is configured to control media, volume and screen brightness by using key overrides. @@ -102,7 +102,7 @@ const key_override_t **key_overrides = (const key_override_t *[]){ }; ``` -### Flexible macOS-friendly Grave Escape +### Flexible macOS-friendly Grave Escape :id=flexible-macos-friendly-grave-escape The [Grave Escape feature](feature_grave_esc.md) is limited in its configurability and has [bugs when used on macOS](feature_grave_esc.md#caveats). Key overrides can be used to achieve a similar functionality as Grave Escape, but with more customization and without bugs on macOS. ```c @@ -121,8 +121,8 @@ const key_override_t **key_overrides = (const key_override_t *[]){ In addition to not encountering unexpected bugs on macOS, you can also change the behavior as you wish. Instead setting `GUI` + `ESC` = `` ` `` you may change it to an arbitrary other modifier, for example `Ctrl` + `ESC` = `` ` ``. -## Advanced Examples -### Modifiers as Layer Keys +## Advanced Examples :id=advanced-examples +### Modifiers as Layer Keys :id=modifiers-as-layer-keys Do you really need a dedicated key to toggle your fn layer? With key overrides, perhaps not. This example shows how you can configure to use `rGUI` + `rAlt` (right GUI and right alt) to access a momentary layer like an fn layer. With this you completely eliminate the need to use a dedicated layer key. Of course the choice of modifier keys can be changed as needed, `rGUI` + `rAlt` is just an example here. @@ -150,7 +150,7 @@ const key_override_t fn_override = {.trigger_mods = MOD_BIT(KC_RGUI) | .enabled = NULL}; ``` -## Keycodes +## Keycodes :id=keycodes |Keycode |Aliases |Description | |------------------------|---------|----------------------| @@ -158,7 +158,7 @@ const key_override_t fn_override = {.trigger_mods = MOD_BIT(KC_RGUI) | |`QK_KEY_OVERRIDE_ON` |`KO_ON` |Turn on key overrides | |`QK_KEY_OVERRIDE_OFF` |`KO_OFF` |Turn off key overrides| -## Reference for `key_override_t` +## Reference for `key_override_t` :id=reference-for-key_override_t Advanced users may need more customization than what is offered by the simple `ko_make` initializers. For this, directly create a `key_override_t` value and set all members. Below is a reference for all members of `key_override_t`. @@ -175,7 +175,7 @@ Advanced users may need more customization than what is offered by the simple `k | `void *context` | A context that will be passed to the custom action function. | | `bool *enabled` | If this points to false this override will not be used. Set to NULL to always have this override enabled. | -### Reference for `ko_option_t` +## Reference for `ko_option_t` :id=reference-for-ko_option_t Bitfield with various options controlling the behavior of a key override. @@ -189,11 +189,11 @@ Bitfield with various options controlling the behavior of a key override. | `ko_option_no_reregister_trigger` | If set, the trigger key will never be registered again after the override is deactivated. | | `ko_options_default` | The default options used by the `ko_make_xxx` functions | -## For Advanced Users: Inner Workings +## For Advanced Users: Inner Workings :id=for-advanced-users-inner-workings This section explains how a key override works in detail, explaining where each member of `key_override_t` comes into play. Understanding this is essential to be able to take full advantage of all the options offered by key overrides. -#### Activation +#### Activation :id=activation When the necessary keys are pressed (`trigger_mods` + `trigger`), the override is 'activated' and the replacement key is registered in the keyboard report (`replacement`), while the `trigger` key is removed from the keyboard report. The trigger modifiers may also be removed from the keyboard report upon activation of an override (`suppressed_mods`). The override will not activate if any of the `negative_modifiers` are pressed. @@ -207,11 +207,11 @@ Use the `option` member to customize which of these events are allowed to activa In any case, a key override can only activate if the `trigger` key is the _last_ non-modifier key that was pressed down. This emulates the behavior of how standard OSes (macOS, Windows, Linux) handle normal key input (to understand: Hold down `a`, then also hold down `b`, then hold down `shift`; `B` will be typed but not `A`). -#### Deactivation +#### Deactivation :id=deactivation An override is 'deactivated' when one of the trigger keys (`trigger_mods`, `trigger`) is lifted, another non-modifier key is pressed down, or one of the `negative_modifiers` is pressed down. When an override deactivates, the `replacement` key is removed from the keyboard report, while the `suppressed_mods` that are still held down are re-added to the keyboard report. By default, the `trigger` key is re-added to the keyboard report if it is still held down and no other non-modifier key has been pressed since. This again emulates the behavior of how standard OSes handle normal key input (To understand: hold down `a`, then also hold down `b`, then also `shift`, then release `b`; `A` will not be typed even though you are holding the `a` and `shift` keys). Use the `option` field `ko_option_no_reregister_trigger` to prevent re-registering the trigger key in all cases. -#### Key Repeat Delay +#### Key Repeat Delay :id=key-repeat-delay A third way in which standard OS-handling of modifier-key input is emulated in key overrides is with a ['key repeat delay'](https://www.dummies.com/computers/pcs/set-your-keyboards-repeat-delay-and-repeat-rate/). To explain what this is, let's look at how normal keyboard input is handled by mainstream OSes again: If you hold down `a`, followed by `shift`, you will see the letter `a` is first typed, then for a short moment nothing is typed and then repeating `A`s are typed. Take note that, although shift is pressed down just after `a` is pressed, it takes a moment until `A` is typed. This is caused by the aforementioned key repeat delay, and it is a feature that prevents unwanted repeated characters from being typed. @@ -222,6 +222,6 @@ This applies equally to releasing a modifier: When you hold `shift`, then press The duration of the key repeat delay is controlled with the `KEY_OVERRIDE_REPEAT_DELAY` macro. Define this value in your `config.h` file to change it. It is 500ms by default. -## Difference to Combos +## Difference to Combos :id=difference-to-combos Note that key overrides are very different from [combos](https://docs.qmk.fm/#/feature_combo). Combos require that you press down several keys almost _at the same time_ and can work with any combination of non-modifier keys. Key overrides work like keyboard shortcuts (e.g. `ctrl` + `z`): They take combinations of _multiple_ modifiers and _one_ non-modifier key to then perform some custom action. Key overrides are implemented with much care to behave just like normal keyboard shortcuts would in regards to the order of pressed keys, timing, and interacton with other pressed keys. There are a number of optional settings that can be used to really fine-tune the behavior of each key override as well. Using key overrides also does not delay key input for regular key presses, which inherently happens in combos and may be undesirable. diff --git a/keyboards/gray_studio/space65r3/readme.md b/keyboards/gray_studio/space65r3/readme.md index 4f89d3851a5..2de127bd7af 100644 --- a/keyboards/gray_studio/space65r3/readme.md +++ b/keyboards/gray_studio/space65r3/readme.md @@ -1,4 +1,4 @@ -# Gray Studio 65 R3 +# Gray Studio Space65 R3 A 65% keyboard by Graystudio. PCB designed and manufactured by DEMO Studio. From 7654c2a23b183f10c706bc6511d151ecc441fa7d Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 16 Mar 2023 00:37:58 +0000 Subject: [PATCH 4/5] Update keycodes_0.0.1_basic.hjson (#20129) --- data/constants/keycodes/keycodes_0.0.1_basic.hjson | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/constants/keycodes/keycodes_0.0.1_basic.hjson b/data/constants/keycodes/keycodes_0.0.1_basic.hjson index 7141d553b08..430211eccae 100644 --- a/data/constants/keycodes/keycodes_0.0.1_basic.hjson +++ b/data/constants/keycodes/keycodes_0.0.1_basic.hjson @@ -253,7 +253,7 @@ "0x002F": { "group": "basic", "key": "KC_LEFT_BRACKET", - "label": "]", + "label": "[", "aliases": [ "KC_LBRC" ] @@ -261,7 +261,7 @@ "0x0030": { "group": "basic", "key": "KC_RIGHT_BRACKET", - "label": "[", + "label": "]", "aliases": [ "KC_RBRC" ] @@ -1512,4 +1512,4 @@ ] } } -} \ No newline at end of file +} From 2f7a06cf739fc97b9f590ef137e15a76eaaa3df2 Mon Sep 17 00:00:00 2001 From: lalalademaxiya1 <66767061+lalalademaxiya1@users.noreply.github.com> Date: Thu, 16 Mar 2023 09:30:09 +0800 Subject: [PATCH 5/5] Update keychron_common.c (#20055) --- keyboards/keychron/common/keychron_common.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/keyboards/keychron/common/keychron_common.c b/keyboards/keychron/common/keychron_common.c index a04f3b7264f..a6250966f33 100644 --- a/keyboards/keychron/common/keychron_common.c +++ b/keyboards/keychron/common/keychron_common.c @@ -41,6 +41,20 @@ void housekeeping_task_keychron(void) { bool process_record_keychron(uint16_t keycode, keyrecord_t *record) { switch (keycode) { + case QK_KB_0: + if (record->event.pressed) { + register_code(KC_MISSION_CONTROL); + } else { + unregister_code(KC_MISSION_CONTROL); + } + return false; // Skip all further processing of this key + case QK_KB_1: + if (record->event.pressed) { + register_code(KC_LAUNCHPAD); + } else { + unregister_code(KC_LAUNCHPAD); + } + return false; // Skip all further processing of this key case KC_LOPTN: case KC_ROPTN: case KC_LCMMD: