From 30bb8cdc08383064151548adf0a24088d7fcb69c Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 11:34:46 +0800 Subject: [PATCH 01/31] keyboards/framework: Initial commit of Framework 16 Signed-off-by: Daniel Schaefer --- keyboards/framework/ansi/ansi.c | 416 ++++++++++++++++++ keyboards/framework/ansi/ansi.h | 23 + keyboards/framework/ansi/config.h | 17 + keyboards/framework/ansi/info.json | 114 +++++ .../framework/ansi/keymaps/advanced/keymap.c | 116 +++++ .../framework/ansi/keymaps/default/keymap.c | 108 +++++ keyboards/framework/ansi/rules.mk | 4 + keyboards/framework/build_all.sh | 6 + keyboards/framework/config.h | 134 ++++++ keyboards/framework/framework.c | 154 +++++++ keyboards/framework/framework.h | 37 ++ keyboards/framework/halconf.h | 13 + keyboards/framework/iso/config.h | 5 + keyboards/framework/iso/info.json | 112 +++++ keyboards/framework/iso/iso.h | 23 + .../framework/iso/keymaps/default/keymap.c | 108 +++++ keyboards/framework/iso/rules.mk | 2 + keyboards/framework/jis/config.h | 5 + keyboards/framework/jis/info.json | 116 +++++ keyboards/framework/jis/jis.h | 23 + .../framework/jis/keymaps/default/keymap.c | 109 +++++ keyboards/framework/jis/rules.mk | 2 + keyboards/framework/kle/README.md | 20 + keyboards/framework/kle/ansi_layout.json | 370 ++++++++++++++++ keyboards/framework/kle/ansi_via.json | 359 +++++++++++++++ keyboards/framework/kle/iso_layout.json | 379 ++++++++++++++++ keyboards/framework/kle/iso_via.json | 366 +++++++++++++++ keyboards/framework/kle/jis_layout.json | 411 +++++++++++++++++ keyboards/framework/kle/jis_via.json | 392 +++++++++++++++++ keyboards/framework/kle/macropad_layout.json | 133 ++++++ keyboards/framework/kle/macropad_via.json | 132 ++++++ keyboards/framework/kle/numpad_layout.json | 124 ++++++ keyboards/framework/kle/numpad_via.json | 118 +++++ keyboards/framework/led.py | 281 ++++++++++++ keyboards/framework/macropad/config.h | 16 + keyboards/framework/macropad/info.json | 62 +++ .../macropad/keymaps/default/keymap.c | 87 ++++ .../macropad/keymaps/esther/keymap.c | 63 +++ keyboards/framework/macropad/macropad.c | 83 ++++ keyboards/framework/macropad/macropad.h | 18 + keyboards/framework/macropad/rules.mk | 2 + keyboards/framework/matrix.c | 335 ++++++++++++++ keyboards/framework/matrix.h | 6 + keyboards/framework/mcuconf.h | 29 ++ keyboards/framework/numpad/config.h | 5 + keyboards/framework/numpad/info.json | 54 +++ .../framework/numpad/keymaps/default/keymap.c | 73 +++ keyboards/framework/numpad/numpad.c | 14 + keyboards/framework/numpad/numpad.h | 24 + keyboards/framework/numpad/rules.mk | 2 + keyboards/framework/readme.md | 44 ++ keyboards/framework/rules.mk | 21 + 52 files changed, 5670 insertions(+) create mode 100644 keyboards/framework/ansi/ansi.c create mode 100644 keyboards/framework/ansi/ansi.h create mode 100644 keyboards/framework/ansi/config.h create mode 100644 keyboards/framework/ansi/info.json create mode 100644 keyboards/framework/ansi/keymaps/advanced/keymap.c create mode 100644 keyboards/framework/ansi/keymaps/default/keymap.c create mode 100644 keyboards/framework/ansi/rules.mk create mode 100755 keyboards/framework/build_all.sh create mode 100644 keyboards/framework/config.h create mode 100644 keyboards/framework/framework.c create mode 100644 keyboards/framework/framework.h create mode 100644 keyboards/framework/halconf.h create mode 100644 keyboards/framework/iso/config.h create mode 100644 keyboards/framework/iso/info.json create mode 100644 keyboards/framework/iso/iso.h create mode 100644 keyboards/framework/iso/keymaps/default/keymap.c create mode 100644 keyboards/framework/iso/rules.mk create mode 100644 keyboards/framework/jis/config.h create mode 100644 keyboards/framework/jis/info.json create mode 100644 keyboards/framework/jis/jis.h create mode 100644 keyboards/framework/jis/keymaps/default/keymap.c create mode 100644 keyboards/framework/jis/rules.mk create mode 100644 keyboards/framework/kle/README.md create mode 100644 keyboards/framework/kle/ansi_layout.json create mode 100644 keyboards/framework/kle/ansi_via.json create mode 100644 keyboards/framework/kle/iso_layout.json create mode 100644 keyboards/framework/kle/iso_via.json create mode 100644 keyboards/framework/kle/jis_layout.json create mode 100644 keyboards/framework/kle/jis_via.json create mode 100644 keyboards/framework/kle/macropad_layout.json create mode 100644 keyboards/framework/kle/macropad_via.json create mode 100644 keyboards/framework/kle/numpad_layout.json create mode 100644 keyboards/framework/kle/numpad_via.json create mode 100755 keyboards/framework/led.py create mode 100644 keyboards/framework/macropad/config.h create mode 100644 keyboards/framework/macropad/info.json create mode 100644 keyboards/framework/macropad/keymaps/default/keymap.c create mode 100644 keyboards/framework/macropad/keymaps/esther/keymap.c create mode 100644 keyboards/framework/macropad/macropad.c create mode 100644 keyboards/framework/macropad/macropad.h create mode 100644 keyboards/framework/macropad/rules.mk create mode 100644 keyboards/framework/matrix.c create mode 100644 keyboards/framework/matrix.h create mode 100644 keyboards/framework/mcuconf.h create mode 100644 keyboards/framework/numpad/config.h create mode 100644 keyboards/framework/numpad/info.json create mode 100644 keyboards/framework/numpad/keymaps/default/keymap.c create mode 100644 keyboards/framework/numpad/numpad.c create mode 100644 keyboards/framework/numpad/numpad.h create mode 100644 keyboards/framework/numpad/rules.mk create mode 100644 keyboards/framework/readme.md create mode 100644 keyboards/framework/rules.mk diff --git a/keyboards/framework/ansi/ansi.c b/keyboards/framework/ansi/ansi.c new file mode 100644 index 00000000000..27679d5e984 --- /dev/null +++ b/keyboards/framework/ansi/ansi.c @@ -0,0 +1,416 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +#define CS19_SW12 0x00 +#define CS20_SW12 0x01 +#define CS21_SW12 0x02 +#define CS22_SW12 0x03 +#define CS23_SW12 0x04 +#define CS24_SW12 0x05 +#define CS25_SW12 0x06 +#define CS26_SW12 0x07 +#define CS27_SW12 0x08 +#define CS28_SW12 0x09 +#define CS29_SW12 0x0A +#define CS30_SW12 0x0B +#define CS31_SW12 0x0C +#define CS32_SW12 0x0D +#define CS33_SW12 0x0E +#define CS34_SW12 0x0F +#define CS35_SW12 0x10 +#define CS36_SW12 0x11 + +#define CS19_SW13 0x12 +#define CS20_SW13 0x13 +#define CS21_SW13 0x14 +#define CS22_SW13 0x15 +#define CS23_SW13 0x16 +#define CS24_SW13 0x17 +#define CS25_SW13 0x18 +#define CS26_SW13 0x19 +#define CS27_SW13 0x1A +#define CS28_SW13 0x1B +#define CS29_SW13 0x1C +#define CS30_SW13 0x1D +#define CS31_SW13 0x1E +#define CS32_SW13 0x1F +#define CS33_SW13 0x20 +#define CS34_SW13 0x21 +#define CS35_SW13 0x22 +#define CS36_SW13 0x23 + +#define CS19_SW14 0x24 +#define CS20_SW14 0x25 +#define CS21_SW14 0x26 +#define CS22_SW14 0x27 +#define CS23_SW14 0x28 +#define CS24_SW14 0x29 +#define CS25_SW14 0x2A +#define CS26_SW14 0x2B +#define CS27_SW14 0x2C +#define CS28_SW14 0x2D +#define CS29_SW14 0x2E +#define CS30_SW14 0x2F +#define CS31_SW14 0x30 +#define CS32_SW14 0x31 +#define CS33_SW14 0x32 +#define CS34_SW14 0x33 +#define CS35_SW14 0x34 +#define CS36_SW14 0x35 + +#define CS19_SW15 0x36 +#define CS20_SW15 0x37 +#define CS21_SW15 0x38 +#define CS22_SW15 0x39 +#define CS23_SW15 0x3A +#define CS24_SW15 0x3B +#define CS25_SW15 0x3C +#define CS26_SW15 0x3D +#define CS27_SW15 0x3E +#define CS28_SW15 0x3F +#define CS29_SW15 0x40 +#define CS30_SW15 0x41 +#define CS31_SW15 0x42 +#define CS32_SW15 0x43 +#define CS33_SW15 0x44 +#define CS34_SW15 0x45 +#define CS35_SW15 0x46 +#define CS36_SW15 0x47 + +#define CS19_SW16 0x48 +#define CS20_SW16 0x49 +#define CS21_SW16 0x4A +#define CS22_SW16 0x4B +#define CS23_SW16 0x4C +#define CS24_SW16 0x4D +#define CS25_SW16 0x4E +#define CS26_SW16 0x4F +#define CS27_SW16 0x50 +#define CS28_SW16 0x51 +#define CS29_SW16 0x52 +#define CS30_SW16 0x53 +#define CS31_SW16 0x54 +#define CS32_SW16 0x55 +#define CS33_SW16 0x56 +#define CS34_SW16 0x57 +#define CS35_SW16 0x58 +#define CS36_SW16 0x59 + +#define CS19_SW17 0x5A +#define CS20_SW17 0x5B +#define CS21_SW17 0x5C +#define CS22_SW17 0x5D +#define CS23_SW17 0x5E +#define CS24_SW17 0x5F +#define CS25_SW17 0x60 +#define CS26_SW17 0x61 +#define CS27_SW17 0x62 +#define CS28_SW17 0x63 +#define CS29_SW17 0x64 +#define CS30_SW17 0x65 +#define CS31_SW17 0x66 +#define CS32_SW17 0x67 +#define CS33_SW17 0x68 +#define CS34_SW17 0x69 +#define CS35_SW17 0x6A +#define CS36_SW17 0x6B + +#define CS19_SW18 0x6C +#define CS20_SW18 0x6D +#define CS21_SW18 0x6E +#define CS22_SW18 0x6F +#define CS23_SW18 0x70 +#define CS24_SW18 0x71 +#define CS25_SW18 0x72 +#define CS26_SW18 0x73 +#define CS27_SW18 0x74 +#define CS28_SW18 0x75 +#define CS29_SW18 0x76 +#define CS30_SW18 0x77 +#define CS31_SW18 0x78 +#define CS32_SW18 0x79 +#define CS33_SW18 0x7A +#define CS34_SW18 0x7B +#define CS35_SW18 0x7C +#define CS36_SW18 0x7D + +#define CS19_SW19 0x7E +#define CS20_SW19 0x7F +#define CS21_SW19 0x80 +#define CS22_SW19 0x81 +#define CS23_SW19 0x82 +#define CS24_SW19 0x83 +#define CS25_SW19 0x84 +#define CS26_SW19 0x85 +#define CS27_SW19 0x86 +#define CS28_SW19 0x87 +#define CS29_SW19 0x88 +#define CS30_SW19 0x89 +#define CS31_SW19 0x8A +#define CS32_SW19 0x8B +#define CS33_SW19 0x8C +#define CS34_SW19 0x8D +#define CS35_SW19 0x8E +#define CS36_SW19 0x8F + +#define CS19_SW20 0x90 +#define CS20_SW20 0x91 +#define CS21_SW20 0x92 +#define CS22_SW20 0x93 +#define CS23_SW20 0x94 +#define CS24_SW20 0x95 +#define CS25_SW20 0x96 +#define CS26_SW20 0x97 +#define CS27_SW20 0x98 +#define CS28_SW20 0x99 +#define CS29_SW20 0x9A +#define CS30_SW20 0x9B +#define CS31_SW20 0x9C +#define CS32_SW20 0x9D +#define CS33_SW20 0x9E +#define CS34_SW20 0x9F +#define CS35_SW20 0xA0 +#define CS36_SW20 0xA1 + +// clang-format off +// TODO: Should have attribute __flash. But won't compile if I add it +const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + // Re-arranged in LED ID order so it matches with the physical location array + {0, CS3_SW6, CS2_SW6, CS1_SW6}, // LED 1 + {0, CS3_SW8, CS2_SW8, CS1_SW8}, // LED 2 + {0, CS3_SW1, CS2_SW1, CS1_SW1}, // LED 3 + {0, CS3_SW2, CS2_SW2, CS1_SW2}, // LED 4 + {0, CS3_SW3, CS2_SW3, CS1_SW3}, // LED 5 + {0, CS3_SW4, CS2_SW4, CS1_SW4}, // LED 6 + {0, CS3_SW9, CS2_SW9, CS1_SW9}, // LED 7 + {0, CS3_SW5, CS2_SW5, CS1_SW5}, // LED 8 + {0, CS3_SW7, CS2_SW7, CS1_SW7}, // LED 9 + + {0, CS6_SW3, CS5_SW3, CS4_SW3}, // LED 10 + {0, CS6_SW7, CS5_SW7, CS4_SW7}, // LED 11 + {0, CS6_SW1, CS5_SW1, CS4_SW1}, // LED 12 + {0, CS6_SW2, CS5_SW2, CS4_SW2}, // LED 13 + {0, CS6_SW4, CS5_SW4, CS4_SW4}, // LED 14 + {0, CS6_SW5, CS5_SW5, CS4_SW5}, // LED 15 + {0, CS6_SW6, CS5_SW6, CS4_SW6}, // LED 16 + {0, CS6_SW8, CS5_SW8, CS4_SW8}, // LED 17 + {0, CS6_SW9, CS5_SW9, CS4_SW9}, // LED 18 + + {0, CS9_SW1, CS8_SW1, CS7_SW1}, // LED 19 + {0, CS9_SW2, CS8_SW2, CS7_SW2}, // LED 20 + {0, CS9_SW3, CS8_SW3, CS7_SW3}, // LED 21 + {0, CS9_SW4, CS8_SW4, CS7_SW4}, // LED 22 + {0, CS9_SW5, CS8_SW5, CS7_SW5}, // LED 23 + {0, CS9_SW6, CS8_SW6, CS7_SW6}, // LED 24 + {0, CS9_SW7, CS8_SW7, CS7_SW7}, // LED 25 + {0, CS9_SW8, CS8_SW8, CS7_SW8}, // LED 26 + {0, CS9_SW9, CS8_SW9, CS7_SW9}, // LED 27 + + {0, CS12_SW1, CS11_SW1, CS10_SW1}, // LED 28 + {0, CS12_SW2, CS11_SW2, CS10_SW2}, // LED 29 + {0, CS12_SW3, CS11_SW3, CS10_SW3}, // LED 30 + {0, CS12_SW4, CS11_SW4, CS10_SW4}, // LED 31 + {0, CS12_SW5, CS11_SW5, CS10_SW5}, // LED 32 + {0, CS12_SW6, CS11_SW6, CS10_SW6}, // LED 33 + {0, CS12_SW7, CS11_SW7, CS10_SW7}, // LED 34 + {0, CS12_SW8, CS11_SW8, CS10_SW8}, // LED 35 + {0, CS12_SW9, CS11_SW9, CS10_SW9}, // LED 36 + + {0, CS15_SW2, CS14_SW2, CS13_SW2}, // LED 37 + {0, CS15_SW3, CS14_SW3, CS13_SW3}, // LED 38 + {0, CS15_SW6, CS14_SW6, CS13_SW6}, // LED 39 + {0, CS15_SW7, CS14_SW7, CS13_SW7}, // LED 40 + {0, CS15_SW9, CS14_SW9, CS13_SW9}, // LED 41 + {0, CS15_SW1, CS14_SW1, CS13_SW1}, // LED 42 + {0, CS15_SW4, CS14_SW4, CS13_SW4}, // LED 43 + {0, CS15_SW5, CS14_SW5, CS13_SW5}, // LED 44 + {0, CS15_SW8, CS14_SW8, CS13_SW8}, // LED 45 + + {0, CS18_SW1, CS17_SW1, CS16_SW1}, // LED 46 + {0, CS18_SW2, CS17_SW2, CS16_SW2}, // LED 47 + {0, CS18_SW3, CS17_SW3, CS16_SW3}, // LED 48 + + {1, CS21_SW12, CS20_SW12, CS19_SW12}, // LED 49 + {1, CS21_SW13, CS20_SW13, CS19_SW13}, // LED 50 + {1, CS21_SW14, CS20_SW14, CS19_SW14}, // LED 51 + {1, CS21_SW15, CS20_SW15, CS19_SW15}, // LED 52 + {1, CS21_SW16, CS20_SW16, CS19_SW16}, // LED 53 + {1, CS21_SW17, CS20_SW17, CS19_SW17}, // LED 54 + {1, CS21_SW18, CS20_SW18, CS19_SW18}, // LED 55 + {1, CS21_SW19, CS20_SW19, CS19_SW19}, // LED 56 + {1, CS21_SW20, CS20_SW20, CS19_SW20}, // LED 57 + + {1, CS24_SW12, CS23_SW12, CS22_SW12}, // LED 58 + {1, CS24_SW13, CS23_SW13, CS22_SW13}, // LED 59 + {1, CS24_SW14, CS23_SW14, CS22_SW14}, // LED 60 + {1, CS24_SW15, CS23_SW15, CS22_SW15}, // LED 61 + {1, CS24_SW16, CS23_SW16, CS22_SW16}, // LED 62 + {1, CS24_SW17, CS23_SW17, CS22_SW17}, // LED 63 + {1, CS24_SW18, CS23_SW18, CS22_SW18}, // LED 64 + {1, CS24_SW19, CS23_SW19, CS22_SW19}, // LED 65 + {1, CS24_SW20, CS23_SW20, CS22_SW20}, // LED 66 + + {1, CS27_SW12, CS26_SW12, CS25_SW12}, // LED 67 + {1, CS27_SW13, CS26_SW13, CS25_SW13}, // LED 68 + {1, CS27_SW15, CS26_SW15, CS25_SW15}, // LED 69 + {1, CS27_SW16, CS26_SW16, CS25_SW16}, // LED 70 + {1, CS27_SW17, CS26_SW17, CS25_SW17}, // LED 71 + {1, CS27_SW18, CS26_SW18, CS25_SW18}, // LED 72 + {1, CS27_SW19, CS26_SW19, CS25_SW19}, // LED 73 + {1, CS27_SW20, CS26_SW20, CS25_SW20}, // LED 74 + {1, CS27_SW14, CS26_SW14, CS25_SW14}, // LED 75 + + {1, CS30_SW12, CS29_SW12, CS28_SW12}, // LED 76 + {1, CS30_SW13, CS29_SW13, CS28_SW13}, // LED 77 + {1, CS30_SW14, CS29_SW14, CS28_SW14}, // LED 78 + {1, CS30_SW15, CS29_SW15, CS28_SW15}, // LED 79 + {1, CS30_SW16, CS29_SW16, CS28_SW16}, // LED 80 + {1, CS30_SW17, CS29_SW17, CS28_SW17}, // LED 81 + {1, CS30_SW18, CS29_SW18, CS28_SW18}, // LED 82 + {1, CS30_SW19, CS29_SW19, CS28_SW19}, // LED 83 + {1, CS30_SW20, CS29_SW20, CS28_SW20}, // LED 84 + + {1, CS33_SW12, CS32_SW12, CS31_SW12}, // LED 85 + {1, CS33_SW13, CS32_SW13, CS31_SW13}, // LED 86 + {1, CS33_SW14, CS32_SW14, CS31_SW14}, // LED 87 + {1, CS33_SW15, CS32_SW15, CS31_SW15}, // LED 88 + {1, CS33_SW16, CS32_SW16, CS31_SW16}, // LED 89 + {1, CS33_SW17, CS32_SW17, CS31_SW17}, // LED 90 + {1, CS33_SW18, CS32_SW18, CS31_SW18}, // LED 91 + {1, CS33_SW19, CS32_SW19, CS31_SW19}, // LED 92 + {1, CS33_SW20, CS32_SW20, CS31_SW20}, // LED 93 + + {1, CS36_SW12, CS35_SW12, CS34_SW12}, // LED 94 + {1, CS36_SW13, CS35_SW13, CS34_SW13}, // LED 95 + {1, CS36_SW14, CS35_SW14, CS34_SW14}, // LED 96 + {1, CS36_SW15, CS35_SW15, CS34_SW15}, // LED 97 +}; + +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 31, 72, 5, 84, NO_LED, 29, 33, 77, 75, 82, 78, NO_LED, 88, 79, 52, NO_LED, }, + {NO_LED, NO_LED, NO_LED, 47, 96, 27, 35, 76, 90, 30, NO_LED, NO_LED, 34, 81, 53, 67, }, + {NO_LED, NO_LED, 93, NO_LED, 2, 19, 39, 40, 55, NO_LED, 26, NO_LED, NO_LED, 63, NO_LED, 91, }, + {NO_LED, 46, 1, NO_LED, 20, 21, 7, 8, 59, NO_LED, 24, 74, NO_LED, 70, NO_LED, NO_LED, }, + {NO_LED, NO_LED, 16, NO_LED, 38, 41, 9, 14, 68, NO_LED, 22, NO_LED, NO_LED, 61, 62, NO_LED, }, + {NO_LED, NO_LED, 15, NO_LED, 12, 13, 11, 10, 69, NO_LED, 17, NO_LED, NO_LED, 60, 64, NO_LED, }, + {NO_LED, NO_LED, NO_LED, NO_LED, 18, 3, 4, 6, 66, NO_LED, 58, 89, NO_LED, 57, 54, NO_LED, }, + {NO_LED, NO_LED, 36, NO_LED, NO_LED, 25, 43, 49, 51, NO_LED, 50, NO_LED, NO_LED, 48, 37, NO_LED, }, +}, { + // LED Index to Physical Position + { 11, 23 }, // LED 1 + { 0, 23 }, // LED 2 + { 57, 22 }, // LED 3 + { 41, 22 }, // LED 4 + { 73, 22 }, // LED 5 + { 25, 22 }, // LED 6 + { 121, 22 }, // LED 7 + { 89, 22 }, // LED 8 + { 105, 22 }, // LED 9 + { 82, 10 }, // LED 10 + { 114, 10 }, // LED 11 + { 66, 10 }, // LED 12 + { 50, 10 }, // LED 13 + { 34, 10 }, // LED 14 + { 98, 10 }, // LED 15 + { 18, 10 }, // LED 16 + { 2, 10 }, // LED 17 + { 130, 10 }, // LED 18 + { 56, 0 }, // LED 19 + { 40, 0 }, // LED 20 + { 72, 0 }, // LED 21 + { 24, 0 }, // LED 22 + { 88, 0 }, // LED 23 + { 10, 0 }, // LED 24 + { 104, 0 }, // LED 25 + { 0, 0 }, // LED 26 + { 120, 0 }, // LED 27 + { 38, 47 }, // LED 28 + { 22, 47 }, // LED 29 + { 54, 47 }, // LED 30 + { 5, 48 }, // LED 31 + { 70, 47 }, // LED 32 + { 1, 48 }, // LED 33 + { 86, 47 }, // LED 34 + { 0, 60 }, // LED 35 + { 102, 47 }, // LED 36 + { 30, 34 }, // LED 37 + { 62, 34 }, // LED 38 + { 7, 35 }, // LED 39 + { 94, 34 }, // LED 40 + { 110, 34 }, // LED 41 + { 46, 34 }, // LED 42 + { 13, 36 }, // LED 43 + { 78, 34 }, // LED 44 + { 1, 36 }, // LED 45 + { 8, 60 }, // LED 46 + { 38, 59 }, // LED 47 + { 54, 59 }, // LED 48 + { 174, 34 }, // LED 49 + { 126, 34 }, // LED 50 + { 142, 34 }, // LED 51 + { 158, 34 }, // LED 52 + { 190, 34 }, // LED 53 + { 205, 34 }, // LED 54 + { 202, 22 }, // LED 55 + { 219, 22 }, // LED 56 + { 223, 36 }, // LED 57 + { 185, 22 }, // LED 58 + { 137, 22 }, // LED 59 + { 153, 22 }, // LED 60 + { 169, 22 }, // LED 61 + { 162, 10 }, // LED 62 + { 194, 10 }, // LED 63 + { 178, 10 }, // LED 64 + { 209, 11 }, // LED 65 + { 222, 11 }, // LED 66 + { 181, 0 }, // LED 67 + { 136, 0 }, // LED 68 + { 168, 0 }, // LED 69 + { 146, 10 }, // LED 70 + { 199, 0 }, // LED 71 + { 186, 0 }, // LED 72 + { 213, 0 }, // LED 73 + { 224, 0 }, // LED 74 + { 152, 0 }, // LED 75 + { 166, 47 }, // LED 76 + { 118, 47 }, // LED 77 + { 134, 47 }, // LED 78 + { 150, 47 }, // LED 79 + { 182, 47 }, // LED 80 + { 197, 48 }, // LED 81 + { 202, 58 }, // LED 82 + { 203, 48 }, // LED 83 + { 217, 48 }, // LED 84 + { 150, 59 }, // LED 85 + { 108, 60 }, // LED 86 + { 121, 60 }, // LED 87 + { 134, 60 }, // LED 88 + { 166, 59 }, // LED 89 + { 183, 64 }, // LED 90 + { 202, 62 }, // LED 91 + { 220, 64 }, // LED 92 + { 222, 48 }, // LED 93 + { 22, 59 }, // LED 94 + { 70, 60 }, // LED 95 + { 83, 60 }, // LED 96 + { 95, 60 }, // LED 97 +}, { + // LED Index to Flag + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4 +} }; +// clang-format on diff --git a/keyboards/framework/ansi/ansi.h b/keyboards/framework/ansi/ansi.h new file mode 100644 index 00000000000..b6839b9da44 --- /dev/null +++ b/keyboards/framework/ansi/ansi.h @@ -0,0 +1,23 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +// The layouts are all mostly the same, except for the extra keys that the different layouts have +// clang-format off +#define LAYOUT( \ + K110, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122, K123, K76, \ + K1, K2, K3, K4, K5, K6, K7, K8, K9, K10, K11, K12, K13, K15, \ + K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K43, \ + K44, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K57, \ + K58, K59, K127, K60, K61, K62, K64, K79, K83, K84, K89 \ +) \ +{ \ + { K48, K76, K17, K62, KC_NO, K47, K49, K52, K54, K57, K53, KC_NO, K64, K55, K41, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, K60, K61, K46, K50, K51, K84, K44, KC_NO, KC_NO, K58, K83, K43, K119 }, \ + { KC_NO, KC_NO, K59, KC_NO, K19, K113, K35, K36, K29, KC_NO, K118, KC_NO, KC_NO, K12, KC_NO, K89 }, \ + { KC_NO, K127, K16, KC_NO, K115, K112, K21, K22, K25, KC_NO, K117, K120, KC_NO, K123, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, K1, KC_NO, K30, K32, K6, K7, K121, KC_NO, K116, KC_NO, KC_NO, K11, K13, KC_NO }, \ + { KC_NO, KC_NO, K2, KC_NO, K4, K3, K5, K8, K10, KC_NO, K9, KC_NO, KC_NO, K26, K15, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K114, K18, K20, K23, K122, KC_NO, K24, K79, KC_NO, K27, K28, KC_NO }, \ + { KC_NO, KC_NO, K31, KC_NO, KC_NO, K110, K34, K37, K39, KC_NO, K38, KC_NO, KC_NO, K40, K33, KC_NO } \ +} diff --git a/keyboards/framework/ansi/config.h b/keyboards/framework/ansi/config.h new file mode 100644 index 00000000000..d62d457df8a --- /dev/null +++ b/keyboards/framework/ansi/config.h @@ -0,0 +1,17 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#define MATRIX_COLS 16 +#define MATRIX_ROWS 8 + +#define DRIVER_COUNT 2 +#define DRIVER_ADDR_1 0b0100000 +#define DRIVER_ADDR_2 0b0100011 +#define DRIVER_1_LED_TOTAL 48 +#define DRIVER_2_LED_TOTAL 49 +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define ISSI_CONFIGURATION 0x21 // Enable only the first 9 SW and disable software shutdown + +// Limit current to ensure max current draw is just about 500mA +// when white att 100% brightness +#define ISSI_GLOBALCURRENT 104 diff --git a/keyboards/framework/ansi/info.json b/keyboards/framework/ansi/info.json new file mode 100644 index 00000000000..95a5cacc06a --- /dev/null +++ b/keyboards/framework/ansi/info.json @@ -0,0 +1,114 @@ +{ + "keyboard_name": "Laptop 16 Keyboard Module - ANSI", + "manufacturer": "Framework", + "maintainer": "JohnAZoidberg", + "bootloader": "rp2040", + "features": { + "bootmagic": false, + "mousekey": false, + "extrakey": true, + "console": true, + "command": false, + "nkro": true, + "audio": false + }, + "debounce": 5, + "processor": "RP2040", + "url": "https://fr.mw/FRAKDKEN", + "usb": { + "device_version": "0.2.2", + "pid": "0x0012", + "vid": "0x32AC", + "force_nkro": true + }, + "backlight": { + "pin": "GP25" + }, + "layout_aliases": { + "LAYOUT_default": "LAYOUT" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0, "w": 1.25, "h": 0.5 }, + { "label": "F1", "x": 1.5, "y": 0, "h": 0.5 }, + { "label": "F2", "x": 2.75, "y": 0, "h": 0.5 }, + { "label": "F3", "x": 4, "y": 0, "h": 0.5 }, + { "label": "F4", "x": 5.25, "y": 0, "h": 0.5 }, + { "label": "F5", "x": 6.5, "y": 0, "h": 0.5 }, + { "label": "F6", "x": 7.75, "y": 0, "h": 0.5 }, + { "label": "F7", "x": 9, "y": 0, "h": 0.5 }, + { "label": "F8", "x": 10.25, "y": 0, "h": 0.5 }, + { "label": "F9", "x": 11.5, "y": 0, "h": 0.5 }, + { "label": "F10", "x": 12.75, "y": 0, "h": 0.5 }, + { "label": "F11", "x": 14, "y": 0, "h": 0.5 }, + { "label": "F12", "x": 15.25, "y": 0, "h": 0.5 }, + { "label": "Delete", "x": 16.5, "y": 0, "w": 1.75, "h": 0.5 }, + { "label": "~", "x": 0, "y": 0.75 }, + { "label": "!", "x": 1.25, "y": 0.75 }, + { "label": "@", "x": 2.5, "y": 0.75 }, + { "label": "#", "x": 3.75, "y": 0.75 }, + { "label": "$", "x": 5, "y": 0.75 }, + { "label": "%", "x": 6.25, "y": 0.75 }, + { "label": "^", "x": 7.5, "y": 0.75 }, + { "label": "&", "x": 8.75, "y": 0.75 }, + { "label": "*", "x": 10, "y": 0.75 }, + { "label": "(", "x": 11.25, "y": 0.75 }, + { "label": ")", "x": 12.5, "y": 0.75 }, + { "label": "_", "x": 13.75, "y": 0.75 }, + { "label": "+", "x": 15, "y": 0.75 }, + { "label": "Backspace", "x": 16.25, "y": 0.75, "w": 2 }, + { "label": "Tab", "x": 0, "y": 2, "w": 1.5 }, + { "label": "Q", "x": 1.75, "y": 2 }, + { "label": "W", "x": 3, "y": 2 }, + { "label": "E", "x": 4.25, "y": 2 }, + { "label": "R", "x": 5.5, "y": 2 }, + { "label": "T", "x": 6.75, "y": 2 }, + { "label": "Y", "x": 8, "y": 2 }, + { "label": "U", "x": 9.25, "y": 2 }, + { "label": "I", "x": 10.5, "y": 2 }, + { "label": "O", "x": 11.75, "y": 2 }, + { "label": "P", "x": 13, "y": 2 }, + { "label": "{", "x": 14.25, "y": 2 }, + { "label": "}", "x": 15.5, "y": 2 }, + { "label": "|", "x": 16.75, "y": 2, "w": 1.5 }, + { "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, + { "label": "A", "x": 2, "y": 3.25 }, + { "label": "S", "x": 3.25, "y": 3.25 }, + { "label": "D", "x": 4.5, "y": 3.25 }, + { "label": "F", "x": 5.75, "y": 3.25 }, + { "label": "G", "x": 7, "y": 3.25 }, + { "label": "H", "x": 8.25, "y": 3.25 }, + { "label": "J", "x": 9.5, "y": 3.25 }, + { "label": "K", "x": 10.75, "y": 3.25 }, + { "label": "L", "x": 12, "y": 3.25 }, + { "label": ":", "x": 13.25, "y": 3.25 }, + { "label": "\"", "x": 14.5, "y": 3.25 }, + { "label": "Enter", "x": 15.75, "y": 3.25, "w": 2.5 }, + { "label": "Shift", "x": 0, "y": 4.5, "w": 2.5 }, + { "label": "Z", "x": 2.75, "y": 4.5 }, + { "label": "X", "x": 4, "y": 4.5 }, + { "label": "C", "x": 5.25, "y": 4.5 }, + { "label": "V", "x": 6.5, "y": 4.5 }, + { "label": "B", "x": 7.75, "y": 4.5 }, + { "label": "N", "x": 9, "y": 4.5 }, + { "label": "M", "x": 10.25, "y": 4.5 }, + { "label": "<", "x": 11.5, "y": 4.5 }, + { "label": ">", "x": 12.75, "y": 4.5 }, + { "label": "?", "x": 14, "y": 4.5 }, + { "label": "Shift", "x": 15.25, "y": 4.5, "w": 3 }, + { "label": "Ctrl", "x": 0, "y": 5.75, "w": 1.25 }, + { "label": "Fn", "x": 1.5, "y": 5.75 }, + { "label": "Win", "x": 2.75, "y": 5.75 }, + { "label": "Alt", "x": 4, "y": 5.75 }, + { "x": 5.25, "y": 5.75, "w": 6 }, + { "label": "Alt", "x": 11.5, "y": 5.75 }, + { "label": "Ctrl", "x": 12.75, "y": 5.75 }, + { "label": "←", "x": 14, "y": 5.75, "w": 1.25 }, + { "label": "↑", "x": 15.5, "y": 5.75, "w": 1.25, "h": 0.5 }, + { "label": "→", "x": 17, "y": 5.75, "w": 1.25 }, + { "label": "↓", "x": 15.5, "y": 6.25, "w": 1.25, "h": 0.5 } + ] + } + } +} diff --git a/keyboards/framework/ansi/keymaps/advanced/keymap.c b/keyboards/framework/ansi/keymaps/advanced/keymap.c new file mode 100644 index 00000000000..85381098ffe --- /dev/null +++ b/keyboards/framework/ansi/keymaps/advanced/keymap.c @@ -0,0 +1,116 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +#include "framework.h" + +// clang-format off +enum _layers { + _BASE, + _FN, + _FN_LOCK, + _FM +}; + +// Changes from regular layout +// - Capslock => Map as ctrl and escape +// - FN+Backtick => Sleep + + +// Control when held and combined, Escape when tapped +#define KC_ECPS CTL_T(KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ + * 14 keys │Esc │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Del│ + * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ + * 14 keys │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Backsp│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * 14 keys │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤ + * 13 keys │ECaps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───────┤ + * 12 keys │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ + * ├────┬───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ + * │ │ │ │ │ │ │ │ │↑ │ │ + * 11 keys │Ctrl│FN │GUI│Alt│ │Alt│Ctl│ ← ├───┤ → │ + * │ │ │ │ │ │ │ │ │ ↓│ │ + * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ + * 78 total + */ + [_BASE] = LAYOUT( + 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_DEL, + 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_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_BSLS, + KC_ECPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, MO(_FN), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT + ), + /* + * Function layer + * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ + * 14 keys │FN lk│Mut│vDn│vUp│Prv│Ply│Nxt│bDn│bUp│Scn│Air│Prt│App│Ins │ + * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ + * 14 keys │SLP│ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * 14 keys │ │ │RGB│Nxt│Hue│Sat│Spd│Brt│ │ │Pau│ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤ + * 13 keys │ │ │SRq│Prv│Hue│Sat│Spd│Brt│ScL│ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───────┤ + * 12 keys │ │ │ │ │ │ │Brk│ │ │ │ │ │ + * ├────┬───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ + * │ │ │ │ │ │ │ │ │PgU│ │ + * 11 keys │ │ │ │ │ Toggle Backlight │ │ │Home├───┤End │ + * │ │ │ │ │ │ │ │ │PgD│ │ + * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ + * 78 total + */ + [_FN] = LAYOUT( + FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, + KC_SLEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______, + _______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______, + _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END + ), + // Function lock layer + // Everything on F-row locked to function layer, except ESC and DEL + [_FN_LOCK] = LAYOUT( + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, MO(_FM), _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FM] = LAYOUT( + FN_LOCK, 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_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______, + _______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______, + _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END + ), +}; +// clang-format on + +// Make sure to keep FN Lock even after reset +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case FN_LOCK: + if (record->event.pressed) { + if (layer_state_is(_FN)) { + set_single_persistent_default_layer(_FN_LOCK); + } + if (layer_state_is(_FM)) { + set_single_persistent_default_layer(_BASE); + } + } + return false; + break; + default: + break; + } + return true; +} diff --git a/keyboards/framework/ansi/keymaps/default/keymap.c b/keyboards/framework/ansi/keymaps/default/keymap.c new file mode 100644 index 00000000000..fce5e643308 --- /dev/null +++ b/keyboards/framework/ansi/keymaps/default/keymap.c @@ -0,0 +1,108 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +#include "framework.h" + +// clang-format off +enum _layers { + _BASE, + _FN, + _FN_LOCK, + _FM +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ + * 14 keys │Esc │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Del│ + * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ + * 14 keys │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Backsp│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * 14 keys │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤ + * 13 keys │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───────┤ + * 12 keys │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ + * ├────┬───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ + * │ │ │ │ │ │ │ │ │↑ │ │ + * 11 keys │Ctrl│FN │GUI│Alt│ │Alt│Ctl│ ← ├───┤ → │ + * │ │ │ │ │ │ │ │ │ ↓│ │ + * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ + * 78 total + */ + [_BASE] = LAYOUT( + 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_DEL, + 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_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_BSLS, + 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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, MO(_FN), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT + ), + /* + * Function layer + * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ + * 14 keys │FN lk│Mut│vDn│vUp│Prv│Ply│Nxt│bDn│bUp│Scn│Air│Prt│App│Ins │ + * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ + * 14 keys │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * 14 keys │ │ │RGB│Nxt│Hue│Sat│Spd│Brt│ │ │Pau│ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤ + * 13 keys │ │ │SRq│Prv│Hue│Sat│Spd│Brt│ScL│ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───────┤ + * 12 keys │ │ │ │ │ │ │Brk│ │ │ │ │ │ + * ├────┬───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ + * │ │ │ │ │ │ │ │ │PgU│ │ + * 11 keys │ │ │ │ │ Toggle Backlight │ │ │Home├───┤End │ + * │ │ │ │ │ │ │ │ │PgD│ │ + * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ + * 78 total + */ + [_FN] = LAYOUT( + FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______, + _______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______, + _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END + ), + // Function lock layer + // Everything on F-row locked to function layer, except ESC and DEL + [_FN_LOCK] = LAYOUT( + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, MO(_FM), _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FM] = LAYOUT( + FN_LOCK, 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_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______, + _______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______, + _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END + ), +}; +// clang-format on + +// Make sure to keep FN Lock even after reset +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case FN_LOCK: + if (record->event.pressed) { + if (layer_state_is(_FN)) { + set_single_persistent_default_layer(_FN_LOCK); + } + if (layer_state_is(_FM)) { + set_single_persistent_default_layer(_BASE); + } + } + return false; + break; + default: + break; + } + return true; +} diff --git a/keyboards/framework/ansi/rules.mk b/keyboards/framework/ansi/rules.mk new file mode 100644 index 00000000000..68d6023391e --- /dev/null +++ b/keyboards/framework/ansi/rules.mk @@ -0,0 +1,4 @@ +# Debugging (enabled in info.json) +#CONSOLE_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = IS31FL3743A diff --git a/keyboards/framework/build_all.sh b/keyboards/framework/build_all.sh new file mode 100755 index 00000000000..adc5097084f --- /dev/null +++ b/keyboards/framework/build_all.sh @@ -0,0 +1,6 @@ +set -e +qmk compile -kb framework/ansi -km default +qmk compile -kb framework/iso -km default +qmk compile -kb framework/jis -km default +qmk compile -kb framework/numpad -km default +qmk compile -kb framework/macropad -km default diff --git a/keyboards/framework/config.h b/keyboards/framework/config.h new file mode 100644 index 00000000000..fde442e8b05 --- /dev/null +++ b/keyboards/framework/config.h @@ -0,0 +1,134 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Allow (emulated) EEPROM reset using VIA +#define VIA_EEPROM_ALLOW_RESET + +// Increase to 16K for more storage space +// With 64K backing size, this spread the wear level over 4 blocks +#define WEAR_LEVELING_LOGICAL_SIZE (4 * 4096) +// Increase to 64K backing size to allow more wear leveling +#define WEAR_LEVELING_BACKING_SIZE (16 * 4096) +// We use 1MB flash +#define PICO_FLASH_SIZE_BYTES (1 * 1024 * 1024) +#define WEAR_LEVELING_RP2040_FLASH_SIZE PICO_FLASH_SIZE_BYTES +// Keep the last 4K sector free for the serial number +#define WEAR_LEVELING_RP2040_FLASH_BASE ((PICO_FLASH_SIZE_BYTES) - (WEAR_LEVELING_BACKING_SIZE + 4096)) + +// Prints every second how many matrix scans were done (Frequency in Hz) +// Only during debugging, since it prevents the host from going to sleep +//#define DEBUG_MATRIX_SCAN_RATE + +// Prototype for Framework Laptop 16 with Raspberry Pi Pico +// It'll disable column drive because we need to remap some pins to there +// SDB is mapped to GP22 +//#define PICO_FL16 + +#ifdef KEYBOARD_framework_ansi +# define LED_CAPS_LOCK_PIN GP24 +#elif KEYBOARD_framework_iso +# define LED_CAPS_LOCK_PIN GP24 +#elif KEYBOARD_framework_jis +# define LED_CAPS_LOCK_PIN GP24 +#elif KEYBOARD_framework_numpad +# define LED_NUM_LOCK_PIN GP24 +#elif KEYBOARD_framework_macropad +#endif + +// PWM single one backlight configuration +// GPIO25 maps to PWM channel 4B of the RP2040 +// On the Raspberry Pi Pico this is the green LED on the board, good for prototyping +#define BACKLIGHT_PWM_DRIVER PWMD4 +#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_B +#define BACKLIGHT_BREATHING +// Change PWM frequency to 24kHz, the default of 2048Hz causes loud noise +// TODO: Waiting for PR #21717 +// #define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 24000 + +// I2C for the RBG controller +#define I2C_DRIVER I2CD1 +#define I2C1_SDA_PIN GP26 +#define I2C1_SCL_PIN GP27 + +// RGB config + +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// 0 = Off +// 1 = Solid Color +// 2 +#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 +// 10 +#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 +// 20 +#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_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +// 30 +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#define RGB_MATRIX_KEYPRESSES +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// 33 +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// 40 +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +/* + * 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 diff --git a/keyboards/framework/framework.c b/keyboards/framework/framework.c new file mode 100644 index 00000000000..cd18920546b --- /dev/null +++ b/keyboards/framework/framework.c @@ -0,0 +1,154 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" +#include "framework.h" + +void keyboard_post_init_kb(void) { + keyboard_post_init_user(); + + // Enable debug output + debug_enable = true; + debug_matrix = true; + debug_keyboard = true; +} + +/** + * Hook into early keyboard initialization + */ +void keyboard_pre_init_kb(void) { + keyboard_pre_init_user(); + + // Mark boot as done. + // Before this, when holding down both alt keys QSPI_SS is pulled low to put + // the RP2040 in bootloader mode during reset. + setPinOutput(BOOT_DONE_GPIO); + writePinLow(BOOT_DONE_GPIO); + + // TODO: Do we ever need to disable it to save power? + setPinOutput(MUX_ENABLE_GPIO); + writePinHigh(MUX_ENABLE_GPIO); + +#ifdef RGB_MATRIX_ENABLE + setPinOutput(IS31FL3743A_ENABLE_GPIO); + writePinHigh(IS31FL3743A_ENABLE_GPIO); +#endif + setPinInput(SLEEP_GPIO); +} + +/** + * Called by QMK when the keyboard suspends + */ +void suspend_power_down_kb(void) { + suspend_power_down_user(); + +#ifdef RGB_MATRIX_ENABLE + writePinLow(IS31FL3743A_ENABLE_GPIO); +#endif +} + +/** + * Called by QMK when the keyboard wakes up from suspend + */ +void suspend_wakeup_init_kb(void) { + suspend_wakeup_init_user(); + +#ifdef RGB_MATRIX_ENABLE + setPinOutput(IS31FL3743A_ENABLE_GPIO); + writePinHigh(IS31FL3743A_ENABLE_GPIO); +#endif +} + +// If in BIOS mode, no matter what the keys have been remapped to, +// always send them as the F keys +bool bios_mode = false; +bool handle_bios_hotkeys(uint16_t keycode, keyrecord_t *record) { + // Not in bios mode, no special handling, handle as normal + if (!bios_mode) return true; + + if (record->event.key.col == 5 && record->event.key.row == 2) { + if (record->event.pressed) { + register_code(KC_F2); + } else { + unregister_code(KC_F2); + } + return false; + } + + if (record->event.key.col == 8 && record->event.key.row == 4) { + if (record->event.pressed) { + register_code(KC_F10); + } else { + unregister_code(KC_F10); + } + return false; + } + + if (record->event.key.col == 13 && record->event.key.row == 3) { + if (record->event.pressed) { + register_code(KC_F12); + } else { + unregister_code(KC_F12); + } + return false; + } + + return true; +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + process_record_user(keycode, record); + + if (!handle_bios_hotkeys(keycode, record)) { + return false; + } + +#ifdef RGB_MATRIX_ENABLE + uint8_t h; + uint8_t s; + uint8_t v; + uint8_t new_v; +#endif + + switch (keycode) { + // Implement step brightness for RGB backlight +#ifdef RGB_MATRIX_ENABLE + case BL_STEP: + if (record->event.pressed) { + h = rgb_matrix_get_hue(); + s = rgb_matrix_get_sat(); + v = rgb_matrix_get_val(); + switch (v) { + default: // Default when user set to a different level + case 0: + new_v = 85; + break; + case 85: + new_v = 170; + break; + case 170: + new_v = 255; + break; + case 255: + new_v = 0; + break; + } + rgb_matrix_sethsv(h, s, new_v); + } + return true; +#endif + case KC_SCRN: + // Simulate press WIN+P + // Works (at least) on Windows and GNOME + if (record->event.pressed) { + register_code(KC_LGUI); + register_code(KC_P); + } else { + unregister_code(KC_P); + unregister_code(KC_LGUI); + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} diff --git a/keyboards/framework/framework.h b/keyboards/framework/framework.h new file mode 100644 index 00000000000..a11430fceb4 --- /dev/null +++ b/keyboards/framework/framework.h @@ -0,0 +1,37 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_framework_ansi +# include "ansi.h" +#elif KEYBOARD_framework_iso +# include "iso.h" +#elif KEYBOARD_framework_jis +# include "jis.h" +#elif KEYBOARD_framework_numpad +# include "numpad.h" +#elif KEYBOARD_framework_macropad +# include "macropad.h" +#endif + +enum framework_keycodes { + // Custom keycode to change screen modes (e.g. enable external screen) + KC_SCRN = SAFE_RANGE, + FN_LOCK, +}; + +extern bool bios_mode; + +#define SLEEP_GPIO GP0 +#define MUX_ENABLE_GPIO GP4 +#define BOOT_DONE_GPIO GP5 +// Pin SDB to enable the RGB controller +#ifdef PICO_FL16 +// 22 only on RPi Pico because it doesn't have GP29 +# define IS31FL3743A_ENABLE_GPIO GP22 +#else +# define IS31FL3743A_ENABLE_GPIO GP29 +#endif diff --git a/keyboards/framework/halconf.h b/keyboards/framework/halconf.h new file mode 100644 index 00000000000..4b6d4a7f273 --- /dev/null +++ b/keyboards/framework/halconf.h @@ -0,0 +1,13 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_SIO TRUE + +// For single-zone backlight +#define HAL_USE_PWM TRUE + +#define HAL_USE_ADC TRUE + +#include_next diff --git a/keyboards/framework/iso/config.h b/keyboards/framework/iso/config.h new file mode 100644 index 00000000000..b3fa449889e --- /dev/null +++ b/keyboards/framework/iso/config.h @@ -0,0 +1,5 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#define MATRIX_COLS 16 +#define MATRIX_ROWS 8 diff --git a/keyboards/framework/iso/info.json b/keyboards/framework/iso/info.json new file mode 100644 index 00000000000..a698f650c82 --- /dev/null +++ b/keyboards/framework/iso/info.json @@ -0,0 +1,112 @@ +{ + "keyboard_name": "Laptop 16 Keyboard Module - ISO", + "manufacturer": "Framework", + "maintainer": "JohnAZoidberg", + "bootloader": "rp2040", + "features": { + "bootmagic": false, + "mousekey": false, + "extrakey": true, + "console": true, + "command": false, + "nkro": true, + "audio": false + }, + "debounce": 5, + "processor": "RP2040", + "url": "https://fr.mw/FRAKDKEN", + "usb": { + "device_version": "0.2.2", + "pid": "0x0018", + "vid": "0x32AC", + "force_nkro": true + }, + "backlight": { + "pin": "GP25" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0, "w": 1.25, "h": 0.5 }, + { "label": "F1", "x": 1.5, "y": 0, "h": 0.5 }, + { "label": "F2", "x": 2.75, "y": 0, "h": 0.5 }, + { "label": "F3", "x": 4, "y": 0, "h": 0.5 }, + { "label": "F4", "x": 5.25, "y": 0, "h": 0.5 }, + { "label": "F5", "x": 6.5, "y": 0, "h": 0.5 }, + { "label": "F6", "x": 7.75, "y": 0, "h": 0.5 }, + { "label": "F7", "x": 9, "y": 0, "h": 0.5 }, + { "label": "F8", "x": 10.25, "y": 0, "h": 0.5 }, + { "label": "F9", "x": 11.5, "y": 0, "h": 0.5 }, + { "label": "F10", "x": 12.75, "y": 0, "h": 0.5 }, + { "label": "F11", "x": 14, "y": 0, "h": 0.5 }, + { "label": "F12", "x": 15.25, "y": 0, "h": 0.5 }, + { "label": "Delete", "x": 16.5, "y": 0, "w": 1.75, "h": 0.5 }, + { "label": "~", "x": 0, "y": 0.75 }, + { "label": "!", "x": 1.25, "y": 0.75 }, + { "label": "\"", "x": 2.5, "y": 0.75 }, + { "label": "", "x": 3.75, "y": 0.75 }, + { "label": "$", "x": 5, "y": 0.75 }, + { "label": "%", "x": 6.25, "y": 0.75 }, + { "label": "^", "x": 7.5, "y": 0.75 }, + { "label": "&", "x": 8.75, "y": 0.75 }, + { "label": "*", "x": 10, "y": 0.75 }, + { "label": "(", "x": 11.25, "y": 0.75 }, + { "label": ")", "x": 12.5, "y": 0.75 }, + { "label": "_", "x": 13.75, "y": 0.75 }, + { "label": "+", "x": 15, "y": 0.75 }, + { "label": "Backspace", "x": 16.25, "y": 0.75, "w": 2 }, + { "label": "Tab", "x": 0, "y": 2, "w": 1.5 }, + { "label": "Q", "x": 1.75, "y": 2 }, + { "label": "W", "x": 3, "y": 2 }, + { "label": "E", "x": 4.25, "y": 2 }, + { "label": "R", "x": 5.5, "y": 2 }, + { "label": "T", "x": 6.75, "y": 2 }, + { "label": "Y", "x": 8, "y": 2 }, + { "label": "U", "x": 9.25, "y": 2 }, + { "label": "I", "x": 10.5, "y": 2 }, + { "label": "O", "x": 11.75, "y": 2 }, + { "label": "P", "x": 13, "y": 2 }, + { "label": "{", "x": 14.25, "y": 2 }, + { "label": "}", "x": 15.5, "y": 2 }, + { "label": "Enter", "x": 17, "y": 2, "w": 1.25, "h": 2.25 }, + { "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, + { "label": "A", "x": 2, "y": 3.25 }, + { "label": "S", "x": 3.25, "y": 3.25 }, + { "label": "D", "x": 4.5, "y": 3.25 }, + { "label": "F", "x": 5.75, "y": 3.25 }, + { "label": "G", "x": 7, "y": 3.25 }, + { "label": "H", "x": 8.25, "y": 3.25 }, + { "label": "J", "x": 9.5, "y": 3.25 }, + { "label": "K", "x": 10.75, "y": 3.25 }, + { "label": "L", "x": 12, "y": 3.25 }, + { "label": ":", "x": 13.25, "y": 3.25 }, + { "label": "@", "x": 14.5, "y": 3.25 }, + { "label": "~", "x": 15.75, "y": 3.25 }, + { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, + { "label": "|", "x": 1.5, "y": 4.5 }, + { "label": "Z", "x": 2.75, "y": 4.5 }, + { "label": "X", "x": 4, "y": 4.5 }, + { "label": "C", "x": 5.25, "y": 4.5 }, + { "label": "V", "x": 6.5, "y": 4.5 }, + { "label": "B", "x": 7.75, "y": 4.5 }, + { "label": "N", "x": 9, "y": 4.5 }, + { "label": "M", "x": 10.25, "y": 4.5 }, + { "label": "<", "x": 11.5, "y": 4.5 }, + { "label": ">", "x": 12.75, "y": 4.5 }, + { "label": "?", "x": 14, "y": 4.5 }, + { "label": "Shift", "x": 15.25, "y": 4.5, "w": 3 }, + { "label": "Ctrl", "x": 0, "y": 5.75, "w": 1.25 }, + { "label": "Fn", "x": 1.5, "y": 5.75 }, + { "label": "Win", "x": 2.75, "y": 5.75 }, + { "label": "Alt", "x": 4, "y": 5.75 }, + { "x": 5.25, "y": 5.75, "w": 6 }, + { "label": "Alt", "x": 11.5, "y": 5.75 }, + { "label": "Ctrl", "x": 12.75, "y": 5.75 }, + { "label": "←", "x": 14, "y": 5.75, "w": 1.25 }, + { "label": "↑", "x": 15.5, "y": 5.75, "w": 1.25, "h": 0.5 }, + { "label": "→", "x": 17, "y": 5.75, "w": 1.25 }, + { "label": "↓", "x": 15.5, "y": 6.25, "w": 1.25, "h": 0.5 } + ] + } + } +} diff --git a/keyboards/framework/iso/iso.h b/keyboards/framework/iso/iso.h new file mode 100644 index 00000000000..01c84b9d000 --- /dev/null +++ b/keyboards/framework/iso/iso.h @@ -0,0 +1,23 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +// K29/K42 swapped in ANSI/ISO +// clang-format off +#define LAYOUT( \ + K110, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122, K123, K76, \ + K1, K2, K3, K4, K5, K6, K7, K8, K9, K10, K11, K12, K13, K15, \ + K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, \ + K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K57, \ + K58, K59, K127, K60, K61, K62, K64, K79, K83, K84, K89 \ +) \ +{ \ + { K48, K76, K17, K62, KC_NO, K47, K49, K52, K54, K57, K53, KC_NO, K64, K55, K41, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, K60, K61, K46, K50, K51, K84, K44, KC_NO, KC_NO, K58, K83, K43, K119 }, \ + { KC_NO, KC_NO, K59, KC_NO, K19, K113, K35, K36, K42, KC_NO, K118, KC_NO, KC_NO, K12, KC_NO, K89 }, \ + { KC_NO, K127, K16, KC_NO, K115, K112, K21, K22, K25, KC_NO, K117, K120, KC_NO, K123, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, K1, KC_NO, K30, K32, K6, K7, K121, KC_NO, K116, KC_NO, KC_NO, K11, K13, KC_NO }, \ + { KC_NO, KC_NO, K2, KC_NO, K4, K3, K5, K8, K10, KC_NO, K9, K45, KC_NO, K26, K15, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K114, K18, K20, K23, K122, KC_NO, K24, K79, KC_NO, K27, K28, KC_NO }, \ + { KC_NO, KC_NO, K31, KC_NO, KC_NO, K110, K34, K37, K39, KC_NO, K38, KC_NO, KC_NO, K40, K33, KC_NO }, \ +} diff --git a/keyboards/framework/iso/keymaps/default/keymap.c b/keyboards/framework/iso/keymaps/default/keymap.c new file mode 100644 index 00000000000..a80b18883a7 --- /dev/null +++ b/keyboards/framework/iso/keymaps/default/keymap.c @@ -0,0 +1,108 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +#include "framework.h" + +// clang-format off +enum _layers { + _BASE, + _FN, + _FN_LOCK, + _FM +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ + * 14 keys │Esc │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Del│ + * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ + * 14 keys │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Backsp│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * 13 keys │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Entr│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * 14 keys │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┤ + * 13 keys │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ + * ├────┼───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ + * │ │ │ │ │ │ │ │ │↑ │ │ + * 11 keys │Ctrl│FN │GUI│Alt│ │Alt│Ctl│ ← ├───┤ → │ + * │ │ │ │ │ │ │ │ │ ↓│ │ + * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ + * 79 total + */ + [_BASE] = LAYOUT( + 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_DEL, + 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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + 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_LCTL, MO(_FN), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT + ), + /* + * Function layer + * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ + * 14 keys │FN lk│Mut│vDn│vUp│Prv│Ply│Nxt│bDn│bUp│Scn│Air│Prt│App│Ins │ + * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ + * 14 keys │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * 13 keys │ │ │ │ │ │ │ │ │ │ │Pau│ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * 14 keys │ │ │ │ │ │ │ │ │ScL│ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┤ + * 13 keys │ │ │ │ │ │ │ │Brk│ │ │ │ │ │ + * ├────┼───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ + * │ │ │ │ │ │ │ │ │PgU│ │ + * 11 keys │ │ │ │ │ Toggle Backlight │ │ │Home├───┤End │ + * │ │ │ │ │ │ │ │ │PgD│ │ + * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ + * 78 total + */ + [_FN] = LAYOUT( + FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, _______, _______, + _______, _______, KC_SYRQ, _______, _______, _______, _______, _______, KC_SCRL, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END + ), + // Function lock layer + // Everything on F-row locked to function layer, except ESC and DEL + [_FN_LOCK] = LAYOUT( + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, MO(_FM), _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FM] = LAYOUT( + FN_LOCK, 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_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, _______, _______, + _______, _______, KC_SYRQ, _______, _______, _______, _______, _______, KC_SCRL, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END + ), +}; +// clang-format on + +// Make sure to keep FN Lock even after reset +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case FN_LOCK: + if (record->event.pressed) { + if (layer_state_is(_FN)) { + set_single_persistent_default_layer(_FN_LOCK); + } + if (layer_state_is(_FM)) { + set_single_persistent_default_layer(_BASE); + } + } + return false; + break; + default: + break; + } + return true; +} diff --git a/keyboards/framework/iso/rules.mk b/keyboards/framework/iso/rules.mk new file mode 100644 index 00000000000..f31edcda205 --- /dev/null +++ b/keyboards/framework/iso/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = pwm diff --git a/keyboards/framework/jis/config.h b/keyboards/framework/jis/config.h new file mode 100644 index 00000000000..b3fa449889e --- /dev/null +++ b/keyboards/framework/jis/config.h @@ -0,0 +1,5 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#define MATRIX_COLS 16 +#define MATRIX_ROWS 8 diff --git a/keyboards/framework/jis/info.json b/keyboards/framework/jis/info.json new file mode 100644 index 00000000000..5716251d2a8 --- /dev/null +++ b/keyboards/framework/jis/info.json @@ -0,0 +1,116 @@ +{ + "keyboard_name": "Laptop 16 Keyboard Module - JIS", + "manufacturer": "Framework", + "maintainer": "JohnAZoidberg", + "bootloader": "rp2040", + "features": { + "bootmagic": false, + "mousekey": false, + "extrakey": true, + "console": true, + "command": false, + "nkro": true, + "audio": false + }, + "debounce": 5, + "processor": "RP2040", + "url": "https://fr.mw/FRAKDKEN", + "usb": { + "device_version": "0.2.2", + "pid": "0x0019", + "vid": "0x32AC", + "force_nkro": true + }, + "backlight": { + "pin": "GP25" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0, "w": 1.25, "h": 0.5 }, + { "label": "F1", "x": 1.5, "y": 0, "h": 0.5 }, + { "label": "F2", "x": 2.75, "y": 0, "h": 0.5 }, + { "label": "F3", "x": 4, "y": 0, "h": 0.5 }, + { "label": "F4", "x": 5.25, "y": 0, "h": 0.5 }, + { "label": "F5", "x": 6.5, "y": 0, "h": 0.5 }, + { "label": "F6", "x": 7.75, "y": 0, "h": 0.5 }, + { "label": "F7", "x": 9, "y": 0, "h": 0.5 }, + { "label": "F8", "x": 10.25, "y": 0, "h": 0.5 }, + { "label": "F9", "x": 11.5, "y": 0, "h": 0.5 }, + { "label": "F10", "x": 12.75, "y": 0, "h": 0.5 }, + { "label": "F11", "x": 14, "y": 0, "h": 0.5 }, + { "label": "F12", "x": 15.25, "y": 0, "h": 0.5 }, + { "label": "Delete", "x": 16.5, "y": 0, "w": 1.75, "h": 0.5 }, + { "label": "~", "x": 0, "y": 0.75 }, + { "label": "!", "x": 1.25, "y": 0.75 }, + { "label": "\"", "x": 2.5, "y": 0.75 }, + { "label": "", "x": 3.75, "y": 0.75 }, + { "label": "$", "x": 5, "y": 0.75 }, + { "label": "%", "x": 6.25, "y": 0.75 }, + { "label": "^", "x": 7.5, "y": 0.75 }, + { "label": "&", "x": 8.75, "y": 0.75 }, + { "label": "*", "x": 10, "y": 0.75 }, + { "label": "(", "x": 11.25, "y": 0.75 }, + { "label": ")", "x": 12.5, "y": 0.75 }, + { "label": "_", "x": 13.75, "y": 0.75 }, + { "label": "+", "x": 15, "y": 0.75 }, + { "x": 16.25, "y": 0.75, "w": 0.5 }, + { "label": "Backsp", "x": 17, "y": 0.75, "w": 1.25 }, + { "label": "Tab", "x": 0, "y": 2, "w": 1.5 }, + { "label": "Q", "x": 1.75, "y": 2 }, + { "label": "W", "x": 3, "y": 2 }, + { "label": "E", "x": 4.25, "y": 2 }, + { "label": "R", "x": 5.5, "y": 2 }, + { "label": "T", "x": 6.75, "y": 2 }, + { "label": "Y", "x": 8, "y": 2 }, + { "label": "U", "x": 9.25, "y": 2 }, + { "label": "I", "x": 10.5, "y": 2 }, + { "label": "O", "x": 11.75, "y": 2 }, + { "label": "P", "x": 13, "y": 2 }, + { "label": "{", "x": 14.25, "y": 2 }, + { "label": "}", "x": 15.5, "y": 2 }, + { "label": "Enter", "x": 17, "y": 2, "w": 1.25, "h": 2.25 }, + { "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, + { "label": "A", "x": 2, "y": 3.25 }, + { "label": "S", "x": 3.25, "y": 3.25 }, + { "label": "D", "x": 4.5, "y": 3.25 }, + { "label": "F", "x": 5.75, "y": 3.25 }, + { "label": "G", "x": 7, "y": 3.25 }, + { "label": "H", "x": 8.25, "y": 3.25 }, + { "label": "J", "x": 9.5, "y": 3.25 }, + { "label": "K", "x": 10.75, "y": 3.25 }, + { "label": "L", "x": 12, "y": 3.25 }, + { "label": ":", "x": 13.25, "y": 3.25 }, + { "label": "@", "x": 14.5, "y": 3.25 }, + { "label": "~", "x": 15.75, "y": 3.25 }, + { "label": "Shift", "x": 0, "y": 4.5, "w": 2.5 }, + { "label": "Z", "x": 2.75, "y": 4.5 }, + { "label": "X", "x": 4, "y": 4.5 }, + { "label": "C", "x": 5.25, "y": 4.5 }, + { "label": "V", "x": 6.5, "y": 4.5 }, + { "label": "B", "x": 7.75, "y": 4.5 }, + { "label": "N", "x": 9, "y": 4.5 }, + { "label": "M", "x": 10.25, "y": 4.5 }, + { "label": "<", "x": 11.5, "y": 4.5 }, + { "label": ">", "x": 12.75, "y": 4.5 }, + { "label": "?", "x": 14, "y": 4.5 }, + { "x": 15.25, "y": 4.5 }, + { "label": "Shift", "x": 16.5, "y": 4.5, "w": 1.75 }, + { "label": "Ctrl", "x": 0, "y": 5.75, "w": 1.25 }, + { "label": "Fn", "x": 1.5, "y": 5.75 }, + { "label": "Win", "x": 2.75, "y": 5.75 }, + { "label": "Alt", "x": 4, "y": 5.75 }, + { "x": 5.25, "y": 5.75, "w": 0.5 }, + { "x": 6, "y": 5.75, "w": 3.75 }, + { "x": 10, "y": 5.75, "w": 0.5 }, + { "x": 10.75, "y": 5.75, "w": 0.5 }, + { "label": "Alt", "x": 11.5, "y": 5.75 }, + { "label": "Ctrl", "x": 12.75, "y": 5.75 }, + { "label": "←", "x": 14, "y": 5.75, "w": 1.25 }, + { "label": "↑", "x": 15.5, "y": 5.75, "w": 1.25, "h": 0.5 }, + { "label": "→", "x": 17, "y": 5.75, "w": 1.25 }, + { "label": "↓", "x": 15.5, "y": 6.25, "w": 1.25, "h": 0.5 } + ] + } + } +} diff --git a/keyboards/framework/jis/jis.h b/keyboards/framework/jis/jis.h new file mode 100644 index 00000000000..c1f80e77f54 --- /dev/null +++ b/keyboards/framework/jis/jis.h @@ -0,0 +1,23 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +// JIS is based off ANSI with a few extra keys +// clang-format off +#define LAYOUT( \ + K110, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122, K123, K76, \ + K1, K2, K3, K4, K5, K6, K7, K8, K9, K10, K11, K12, K13, K14, K15,\ + K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, \ + K44, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, \ + K58, K59, K127, K60, K131, K61, K132, K133, K62, K64, K79, K83, K84, K89 \ +) \ +{ \ + { K48, K76, K17, K62, KC_NO, K47, K49, K52, K54, K57, K53, K133, K64, K55, K41, K14 }, \ + { KC_NO, KC_NO, KC_NO, K60, K61, K46, K50, K51, K84, K44, KC_NO, K132, K58, K83, K43, K119 }, \ + { KC_NO, KC_NO, K59, KC_NO, K19, K113, K35, K36, K42, KC_NO, K118, KC_NO, KC_NO, K12, KC_NO, K89 }, \ + { KC_NO, K127, K16, KC_NO, K115, K112, K21, K22, K25, KC_NO, K117, K120, KC_NO, K123, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, K1, KC_NO, K30, K32, K6, K7, K121, KC_NO, K116, K56, KC_NO, K11, K13, KC_NO,}, \ + { KC_NO, KC_NO, K2, KC_NO, K4, K3, K5, K8, K10, KC_NO, K9, KC_NO, KC_NO, K26, K15, KC_NO,}, \ + { KC_NO, KC_NO, K131, KC_NO, K114, K18, K20, K23, K122, KC_NO, K24, K79, KC_NO, K27, K28, KC_NO,}, \ + { KC_NO, KC_NO, K31, KC_NO, KC_NO, K110, K34, K37, K39, KC_NO, K38, KC_NO, KC_NO, K40, K33, KC_NO,} \ +} diff --git a/keyboards/framework/jis/keymaps/default/keymap.c b/keyboards/framework/jis/keymaps/default/keymap.c new file mode 100644 index 00000000000..8f440eb0331 --- /dev/null +++ b/keyboards/framework/jis/keymaps/default/keymap.c @@ -0,0 +1,109 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +#include "keymap_japanese.h" +#include "framework.h" + +// clang-format off +enum _layers { + _BASE, + _FN, + _FN_LOCK, + _FM +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ + * 14 keys │Esc │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Del│ + * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴┬───┤ + * 15 keys │Z↔H│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ ^ │¥ │Bck│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬┴───┤ + * 13 keys │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ @ │ [ │Entr│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * 14 keys │ Eisū │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ : │ ] │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * 13 keys │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ \ │Shift│ + * ├────┬───┼───┼───┼──┬┴───┴───┴─┬─┴┬──┼───┼───┼───┴┬──┴┬────┤ + * │ │ │ │ │M │ │H │K │ │ │ │↑ │ │ + * 14 keys │Ctrl│FN │GUI│Alt│u │ │e │↔ │Alt│Ctl│ ← ├───┤ → │ + * │ │ │ │ │h │ │n │H │ │ │ │ ↓│ │ + * └────┴───┴───┴───┴──┴──────────┴──┴──┴───┴───┴────┴───┴────┘ + * 83 total + */ + [_BASE] = LAYOUT( + 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_DEL, + JP_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, JP_YEN, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_LBRC, + JP_EISU, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_RBRC, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, JP_BSLS, KC_RSFT, + KC_LCTL, MO(_FN), KC_LGUI, KC_LALT, JP_MHEN, KC_SPC, JP_HENK, JP_KANA, KC_RALT, KC_RCTL, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT + ), + /* + * Function layer + * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ + * 14 keys │FN lk│Mut│vDn│vUp│Prv│Ply│Nxt│bDn│bUp│Scn│Air│Prt│App│Ins │ + * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴┬───┤ + * 15 keys │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬┴───┤ + * 13 keys │ │ │ │ │ │ │ │ │ │ │Pau│ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * 14 keys │ │ │SRq│ │ │ │ │ │ScL│ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * 13 keys │ │ │ │ │ │ │Brk│ │ │ │ │ │ │ + * ├────┬───┼───┼───┼──┬┴───┴───┴─┬─┴┬──┼───┼───┼───┴┬──┴┬────┤ + * │ │ │ │ │ │ Toggle │ │ │ │ │ │PgU│ │ + * 14 keys │ │ │ │ │ │ Backlight│ │ │ │ │Home├───┤End │ + * │ │ │ │ │ │ │ │ │ │ │ │PgD│ │ + * └────┴───┴───┴───┴──┴──────────┴──┴──┴───┴───┴────┴───┴────┘ + * 83 total + */ + [_FN] = LAYOUT( + FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, _______, _______, + _______, _______, KC_SYRQ, _______, _______, _______, _______, _______, KC_SCRL, _______, _______, _______, _______, _______, + _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, BL_STEP, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END + ), + // Function lock layer + // Everything on F-row locked to function layer, except ESC and DEL + [_FN_LOCK] = LAYOUT( + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, MO(_FM), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN] = LAYOUT( + FN_LOCK, 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_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, _______, _______, + _______, _______, KC_SYRQ, _______, _______, _______, _______, _______, KC_SCRL, _______, _______, _______, _______, _______, + _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, BL_STEP, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END + ), +}; +// clang-format on + +// Make sure to keep FN Lock even after reset +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case FN_LOCK: + if (record->event.pressed) { + if (layer_state_is(_FN)) { + set_single_persistent_default_layer(_FN_LOCK); + } + if (layer_state_is(_FM)) { + set_single_persistent_default_layer(_BASE); + } + } + return false; + break; + default: + break; + } + return true; +} diff --git a/keyboards/framework/jis/rules.mk b/keyboards/framework/jis/rules.mk new file mode 100644 index 00000000000..f31edcda205 --- /dev/null +++ b/keyboards/framework/jis/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = pwm diff --git a/keyboards/framework/kle/README.md b/keyboards/framework/kle/README.md new file mode 100644 index 00000000000..9df8a071c46 --- /dev/null +++ b/keyboards/framework/kle/README.md @@ -0,0 +1,20 @@ +# KLE Layouts + +These files are generated by modeling our keyboard layouts in [KLE](http://www.keyboard-layout-editor.com). +That is then exported and converted to the format for `info.json`. +But to continue editing them, I kept the files here. Might be useful for the future. + +| Layout | Standard KLE Layout | VIA KLE Layout | VIA Design | +| -------- | ---------------------- | ------------------- | -------------------------- | +| ANSI | `ansi_layout.json` | `ansi_via.json` | `via_ansi_design.json` | +| ISO | `iso_layout.json` | `iso_layout.json` | `via_iso_design.json` | +| JIS | `jis_layout.json` | `jis_via.json` | `via_jis_design.json` | +| Numpad | `numpad_layout.json` | `numpad_via.json` | `via_numpad_design.json` | +| Macropad | `macropad_layout.json` | `macropad_via.json` | `via_macropad_design.json` | + +- The Standard KLE Layout is just downloaded from KLE. +- The VIA KLE Layout has matrix positions as labels instead of the actual key labels. +- VIA Design is the VIA KLE layout embedded in to a VIA compatible JSON file. + +The VIA Design file can be imported into VIA, then it will discover the +keyboard. This should be submitted to the VIA [keyboard repository](https://github.com/the-via/keyboards). diff --git a/keyboards/framework/kle/ansi_layout.json b/keyboards/framework/kle/ansi_layout.json new file mode 100644 index 00000000000..1cbf107e2e9 --- /dev/null +++ b/keyboards/framework/kle/ansi_layout.json @@ -0,0 +1,370 @@ +[ + [ + { + "a": 6, + "w": 1.25, + "h": 0.5 + }, + "Esc", + { + "x": 0.25, + "h": 0.5 + }, + "F1", + { + "x": 0.25, + "h": 0.5 + }, + "F2", + { + "x": 0.25, + "h": 0.5 + }, + "F3", + { + "x": 0.25, + "h": 0.5 + }, + "F4", + { + "x": 0.25, + "h": 0.5 + }, + "F5", + { + "x": 0.25, + "h": 0.5 + }, + "F6", + { + "x": 0.25, + "h": 0.5 + }, + "F7", + { + "x": 0.25, + "h": 0.5 + }, + "F8", + { + "x": 0.25, + "h": 0.5 + }, + "F9", + { + "x": 0.25, + "h": 0.5 + }, + "F10", + { + "x": 0.25, + "h": 0.5 + }, + "F11", + { + "x": 0.25, + "h": 0.5 + }, + "F12", + { + "x": 0.25, + "a": 5, + "w": 1.75, + "h": 0.5 + }, + "Delete" + ], + [ + { + "y": -0.25, + "a": 4 + }, + "~\n`", + { + "x": 0.25 + }, + "!\n1", + { + "x": 0.25 + }, + "@\n2", + { + "x": 0.25 + }, + "#\n3", + { + "x": 0.25 + }, + "$\n4", + { + "x": 0.25 + }, + "%\n5", + { + "x": 0.25 + }, + "^\n6", + { + "x": 0.25 + }, + "&\n7", + { + "x": 0.25 + }, + "*\n8", + { + "x": 0.25 + }, + "(\n9", + { + "x": 0.25 + }, + ")\n0", + { + "x": 0.25 + }, + "_\n-", + { + "x": 0.25 + }, + "+\n=", + { + "x": 0.25, + "a": 6, + "w": 2 + }, + "Backspace" + ], + [ + { + "y": 0.25, + "a": 4, + "w": 1.5 + }, + "Tab", + { + "x": 0.25 + }, + "Q", + { + "x": 0.25 + }, + "W", + { + "x": 0.25 + }, + "E", + { + "x": 0.25 + }, + "R", + { + "x": 0.25 + }, + "T", + { + "x": 0.25 + }, + "Y", + { + "x": 0.25 + }, + "U", + { + "x": 0.25 + }, + "I", + { + "x": 0.25 + }, + "O", + { + "x": 0.25 + }, + "P", + { + "x": 0.25 + }, + "{\n[", + { + "x": 0.25 + }, + "}\n]", + { + "x": 0.25, + "w": 1.5 + }, + "|\n\\" + ], + [ + { + "y": 0.25, + "w": 1.75 + }, + "Caps Lock", + { + "x": 0.25 + }, + "A", + { + "x": 0.25 + }, + "S", + { + "x": 0.25 + }, + "D", + { + "x": 0.25 + }, + "F", + { + "x": 0.25 + }, + "G", + { + "x": 0.25 + }, + "H", + { + "x": 0.25 + }, + "J", + { + "x": 0.25 + }, + "K", + { + "x": 0.25 + }, + "L", + { + "x": 0.25 + }, + ":\n;", + { + "x": 0.25 + }, + "\"\n'", + { + "x": 0.25, + "a": 6, + "w": 2.5 + }, + "Enter" + ], + [ + { + "y": 0.25, + "w": 2.5 + }, + "Shift", + { + "x": 0.25, + "a": 4 + }, + "Z", + { + "x": 0.25 + }, + "X", + { + "x": 0.25 + }, + "C", + { + "x": 0.25 + }, + "V", + { + "x": 0.25 + }, + "B", + { + "x": 0.25 + }, + "N", + { + "x": 0.25 + }, + "M", + { + "x": 0.25 + }, + "<\n,", + { + "x": 0.25 + }, + ">\n.", + { + "x": 0.25 + }, + "?\n/", + { + "x": 0.25, + "a": 6, + "w": 3 + }, + "Shift" + ], + [ + { + "y": 0.25, + "w": 1.25 + }, + "Ctrl", + { + "x": 0.25 + }, + "Fn", + { + "x": 0.25 + }, + "Win", + { + "x": 0.25 + }, + "Alt", + { + "x": 0.25, + "a": 7, + "w": 6 + }, + "", + { + "x": 0.25, + "a": 6 + }, + "Alt", + { + "x": 0.25 + }, + "Ctrl", + { + "x": 0.25, + "a": 7, + "w": 1.25 + }, + "←", + { + "x": 0.25, + "w": 1.25, + "h": 0.5 + }, + "↑", + { + "x": 0.25, + "w": 1.25 + }, + "→" + ], + [ + { + "y": -0.5, + "x": 15.5, + "w": 1.25, + "h": 0.5 + }, + "↓" + ] +] \ No newline at end of file diff --git a/keyboards/framework/kle/ansi_via.json b/keyboards/framework/kle/ansi_via.json new file mode 100644 index 00000000000..0d33a6bf88b --- /dev/null +++ b/keyboards/framework/kle/ansi_via.json @@ -0,0 +1,359 @@ +[ + [ + { + "w": 1.25, + "h": 0.5 + }, + "7,5", + { + "x": 0.25, + "h": 0.5 + }, + "3,5", + { + "x": 0.25, + "h": 0.5 + }, + "2,5", + { + "x": 0.25, + "h": 0.5 + }, + "6,4", + { + "x": 0.25, + "h": 0.5 + }, + "3,4", + { + "x": 0.25, + "h": 0.5 + }, + "4,10", + { + "x": 0.25, + "h": 0.5 + }, + "3,10", + { + "x": 0.25, + "h": 0.5 + }, + "2,10", + { + "x": 0.25, + "h": 0.5 + }, + "1,15", + { + "x": 0.25, + "h": 0.5 + }, + "3,11", + { + "x": 0.25, + "h": 0.5 + }, + "4,8", + { + "x": 0.25, + "h": 0.5 + }, + "6,8", + { + "x": 0.25, + "h": 0.5 + }, + "3,15", + { + "x": 0.25, + "w": 1.75, + "h": 0.5 + }, + "0,1" + ], + [ + { + "y": -0.25 + }, + "4,2", + { + "x": 0.25 + }, + "5,2", + { + "x": 0.25 + }, + "5,5", + { + "x": 0.25 + }, + "5,4", + { + "x": 0.25 + }, + "5,6", + { + "x": 0.25 + }, + "4,6", + { + "x": 0.25 + }, + "4,7", + { + "x": 0.25 + }, + "5,7", + { + "x": 0.25 + }, + "5,10", + { + "x": 0.25 + }, + "5,8", + { + "x": 0.25 + }, + "4,13", + { + "x": 0.25 + }, + "2,13", + { + "x": 0.25 + }, + "4,14", + { + "x": 0.25, + "w": 2 + }, + "5,14" + ], + [ + { + "y": 0.25, + "w": 1.5 + }, + "3,2", + { + "x": 0.25 + }, + "0,2", + { + "x": 0.25 + }, + "6,5", + { + "x": 0.25 + }, + "2,4", + { + "x": 0.25 + }, + "6,6", + { + "x": 0.25 + }, + "3,6", + { + "x": 0.25 + }, + "3,7", + { + "x": 0.25 + }, + "6,7", + { + "x": 0.25 + }, + "6,10", + { + "x": 0.25 + }, + "3,8", + { + "x": 0.25 + }, + "5,13", + { + "x": 0.25 + }, + "6,13", + { + "x": 0.25 + }, + "6,14", + { + "x": 0.25, + "w": 1.5 + }, + "2,8" + ], + [ + { + "y": 0.25, + "w": 1.75 + }, + "4,4", + { + "x": 0.25 + }, + "7,2", + { + "x": 0.25 + }, + "4,5", + { + "x": 0.25 + }, + "7,14", + { + "x": 0.25 + }, + "7,6", + { + "x": 0.25 + }, + "2,6", + { + "x": 0.25 + }, + "2,7", + { + "x": 0.25 + }, + "7,7", + { + "x": 0.25 + }, + "7,10", + { + "x": 0.25 + }, + "7,8", + { + "x": 0.25 + }, + "7,13", + { + "x": 0.25 + }, + "0,14", + { + "x": 0.25, + "w": 2.5 + }, + "1,14" + ], + [ + { + "y": 0.25, + "w": 2.5 + }, + "1,9", + { + "x": 0.25 + }, + "1,5", + { + "x": 0.25 + }, + "0,5", + { + "x": 0.25 + }, + "0,0", + { + "x": 0.25 + }, + "0,6", + { + "x": 0.25 + }, + "1,6", + { + "x": 0.25 + }, + "1,7", + { + "x": 0.25 + }, + "0,7", + { + "x": 0.25 + }, + "0,10", + { + "x": 0.25 + }, + "0,8", + { + "x": 0.25 + }, + "0,13", + { + "x": 0.25, + "w": 3 + }, + "0,9" + ], + [ + { + "y": 0.25, + "w": 1.25 + }, + "1,12", + { + "x": 0.25 + }, + "2,2", + { + "x": 0.25 + }, + "3,1", + { + "x": 0.25 + }, + "1,3", + { + "x": 0.25, + "w": 6 + }, + "1,4", + { + "x": 0.25 + }, + "0,3", + { + "x": 0.25 + }, + "0,12", + { + "x": 0.25, + "w": 1.25 + }, + "6,11", + { + "x": 0.25, + "w": 1.25, + "h": 0.5 + }, + "1,13", + { + "x": 0.25, + "w": 1.25 + }, + "2,15" + ], + [ + { + "y": -0.5, + "x": 15.5, + "w": 1.25, + "h": 0.5 + }, + "1,8" + ] +] diff --git a/keyboards/framework/kle/iso_layout.json b/keyboards/framework/kle/iso_layout.json new file mode 100644 index 00000000000..4e91663d365 --- /dev/null +++ b/keyboards/framework/kle/iso_layout.json @@ -0,0 +1,379 @@ +[ + [ + { + "a": 6, + "w": 1.25, + "h": 0.5 + }, + "Esc", + { + "x": 0.25, + "h": 0.5 + }, + "F1", + { + "x": 0.25, + "h": 0.5 + }, + "F2", + { + "x": 0.25, + "h": 0.5 + }, + "F3", + { + "x": 0.25, + "h": 0.5 + }, + "F4", + { + "x": 0.25, + "h": 0.5 + }, + "F5", + { + "x": 0.25, + "h": 0.5 + }, + "F6", + { + "x": 0.25, + "h": 0.5 + }, + "F7", + { + "x": 0.25, + "h": 0.5 + }, + "F8", + { + "x": 0.25, + "h": 0.5 + }, + "F9", + { + "x": 0.25, + "h": 0.5 + }, + "F10", + { + "x": 0.25, + "h": 0.5 + }, + "F11", + { + "x": 0.25, + "h": 0.5 + }, + "F12", + { + "x": 0.25, + "a": 5, + "w": 1.75, + "h": 0.5 + }, + "Delete" + ], + [ + { + "y": -0.25, + "a": 4 + }, + "~\n`", + { + "x": 0.25 + }, + "!\n1", + { + "x": 0.25 + }, + "\"\n2", + { + "x": 0.25 + }, + "\n3", + { + "x": 0.25 + }, + "$\n4", + { + "x": 0.25 + }, + "%\n5", + { + "x": 0.25 + }, + "^\n6", + { + "x": 0.25 + }, + "&\n7", + { + "x": 0.25 + }, + "*\n8", + { + "x": 0.25 + }, + "(\n9", + { + "x": 0.25 + }, + ")\n0", + { + "x": 0.25 + }, + "_\n-", + { + "x": 0.25 + }, + "+\n=", + { + "x": 0.25, + "a": 6, + "w": 2 + }, + "Backspace" + ], + [ + { + "y": 0.25, + "a": 4, + "w": 1.5 + }, + "Tab", + { + "x": 0.25 + }, + "Q", + { + "x": 0.25 + }, + "W", + { + "x": 0.25 + }, + "E", + { + "x": 0.25 + }, + "R", + { + "x": 0.25 + }, + "T", + { + "x": 0.25 + }, + "Y", + { + "x": 0.25 + }, + "U", + { + "x": 0.25 + }, + "I", + { + "x": 0.25 + }, + "O", + { + "x": 0.25 + }, + "P", + { + "x": 0.25 + }, + "{\n[", + { + "x": 0.25 + }, + "}\n]", + { + "x": 0.5, + "a": 7, + "w": 1.25, + "h": 2.25, + "w2": 1.5, + "h2": 1.25, + "x2": -0.25 + }, + "Enter" + ], + [ + { + "y": 0.25, + "a": 4, + "w": 1.75 + }, + "Caps Lock", + { + "x": 0.25 + }, + "A", + { + "x": 0.25 + }, + "S", + { + "x": 0.25 + }, + "D", + { + "x": 0.25 + }, + "F", + { + "x": 0.25 + }, + "G", + { + "x": 0.25 + }, + "H", + { + "x": 0.25 + }, + "J", + { + "x": 0.25 + }, + "K", + { + "x": 0.25 + }, + "L", + { + "x": 0.25 + }, + ":\n;", + { + "x": 0.25 + }, + "@\n'", + { + "x": 0.25 + }, + "~\n#" + ], + [ + { + "y": 0.25, + "a": 6, + "w": 1.25 + }, + "Shift", + { + "x": 0.25, + "a": 4 + }, + "|\n\\", + { + "x": 0.25 + }, + "Z", + { + "x": 0.25 + }, + "X", + { + "x": 0.25 + }, + "C", + { + "x": 0.25 + }, + "V", + { + "x": 0.25 + }, + "B", + { + "x": 0.25 + }, + "N", + { + "x": 0.25 + }, + "M", + { + "x": 0.25 + }, + "<\n,", + { + "x": 0.25 + }, + ">\n.", + { + "x": 0.25 + }, + "?\n/", + { + "x": 0.25, + "a": 6, + "w": 3 + }, + "Shift" + ], + [ + { + "y": 0.25, + "w": 1.25 + }, + "Ctrl", + { + "x": 0.25 + }, + "Fn", + { + "x": 0.25 + }, + "Win", + { + "x": 0.25 + }, + "Alt", + { + "x": 0.25, + "a": 7, + "w": 6 + }, + "", + { + "x": 0.25, + "a": 6 + }, + "Alt", + { + "x": 0.25 + }, + "Ctrl", + { + "x": 0.25, + "a": 7, + "w": 1.25 + }, + "←", + { + "x": 0.25, + "w": 1.25, + "h": 0.5 + }, + "↑", + { + "x": 0.25, + "w": 1.25 + }, + "→" + ], + [ + { + "y": -0.5, + "x": 15.5, + "w": 1.25, + "h": 0.5 + }, + "↓" + ] +] \ No newline at end of file diff --git a/keyboards/framework/kle/iso_via.json b/keyboards/framework/kle/iso_via.json new file mode 100644 index 00000000000..755ea3e7c4b --- /dev/null +++ b/keyboards/framework/kle/iso_via.json @@ -0,0 +1,366 @@ +[ + [ + { + "w": 1.25, + "h": 0.5 + }, + "7,5", + { + "x": 0.25, + "h": 0.5 + }, + "3,5", + { + "x": 0.25, + "h": 0.5 + }, + "2,5", + { + "x": 0.25, + "h": 0.5 + }, + "6,4", + { + "x": 0.25, + "h": 0.5 + }, + "3,4", + { + "x": 0.25, + "h": 0.5 + }, + "4,10", + { + "x": 0.25, + "h": 0.5 + }, + "3,10", + { + "x": 0.25, + "h": 0.5 + }, + "2,10", + { + "x": 0.25, + "h": 0.5 + }, + "1,15", + { + "x": 0.25, + "h": 0.5 + }, + "3,11", + { + "x": 0.25, + "h": 0.5 + }, + "4,8", + { + "x": 0.25, + "h": 0.5 + }, + "6,8", + { + "x": 0.25, + "h": 0.5 + }, + "3,15", + { + "x": 0.25, + "w": 1.75, + "h": 0.5 + }, + "0,1" + ], + [ + { + "y": -0.25 + }, + "4,2", + { + "x": 0.25 + }, + "5,2", + { + "x": 0.25 + }, + "5,5", + { + "x": 0.25 + }, + "5,4", + { + "x": 0.25 + }, + "5,6", + { + "x": 0.25 + }, + "4,6", + { + "x": 0.25 + }, + "4,7", + { + "x": 0.25 + }, + "5,7", + { + "x": 0.25 + }, + "5,10", + { + "x": 0.25 + }, + "5,8", + { + "x": 0.25 + }, + "4,13", + { + "x": 0.25 + }, + "2,13", + { + "x": 0.25 + }, + "4,14", + { + "x": 0.25, + "w": 2 + }, + "5,14" + ], + [ + { + "y": 0.25, + "w": 1.5 + }, + "3,2", + { + "x": 0.25 + }, + "0,2", + { + "x": 0.25 + }, + "6,5", + { + "x": 0.25 + }, + "2,4", + { + "x": 0.25 + }, + "6,6", + { + "x": 0.25 + }, + "3,6", + { + "x": 0.25 + }, + "3,7", + { + "x": 0.25 + }, + "6,7", + { + "x": 0.25 + }, + "6,10", + { + "x": 0.25 + }, + "3,8", + { + "x": 0.25 + }, + "5,13", + { + "x": 0.25 + }, + "6,13", + { + "x": 0.25 + }, + "6,14", + { + "x": 0.5, + "w": 1.25, + "h": 2.25, + "w2": 1.5, + "h2": 1.25, + "x2": -0.25 + }, + "1,14" + ], + [ + { + "y": 0.25, + "w": 1.75 + }, + "4,4", + { + "x": 0.25 + }, + "7,2", + { + "x": 0.25 + }, + "4,5", + { + "x": 0.25 + }, + "7,14", + { + "x": 0.25 + }, + "7,6", + { + "x": 0.25 + }, + "2,6", + { + "x": 0.25 + }, + "2,7", + { + "x": 0.25 + }, + "7,7", + { + "x": 0.25 + }, + "7,10", + { + "x": 0.25 + }, + "7,8", + { + "x": 0.25 + }, + "7,13", + { + "x": 0.25 + }, + "0,14", + { + "x": 0.25 + }, + "2,8" + ], + [ + { + "y": 0.25, + "w": 1.25 + }, + "1,9", + { + "x": 0.25 + }, + "5,11", + { + "x": 0.25 + }, + "1,5", + { + "x": 0.25 + }, + "0,5", + { + "x": 0.25 + }, + "0,0", + { + "x": 0.25 + }, + "0,6", + { + "x": 0.25 + }, + "1,6", + { + "x": 0.25 + }, + "1,7", + { + "x": 0.25 + }, + "0,7", + { + "x": 0.25 + }, + "0,10", + { + "x": 0.25 + }, + "0,8", + { + "x": 0.25 + }, + "0,13", + { + "x": 0.25, + "w": 3 + }, + "0,9" + ], + [ + { + "y": 0.25, + "w": 1.25 + }, + "1,12", + { + "x": 0.25 + }, + "2,2", + { + "x": 0.25 + }, + "3,1", + { + "x": 0.25 + }, + "1,3", + { + "x": 0.25, + "w": 6 + }, + "1,4", + { + "x": 0.25 + }, + "0,3", + { + "x": 0.25 + }, + "0,12", + { + "x": 0.25, + "w": 1.25 + }, + "6,11", + { + "x": 0.25, + "w": 1.25, + "h": 0.5 + }, + "1,13", + { + "x": 0.25, + "w": 1.25 + }, + "2,15" + ], + [ + { + "y": -0.5, + "x": 15.5, + "w": 1.25, + "h": 0.5 + }, + "1,8" + ] +] diff --git a/keyboards/framework/kle/jis_layout.json b/keyboards/framework/kle/jis_layout.json new file mode 100644 index 00000000000..c28ceac6b47 --- /dev/null +++ b/keyboards/framework/kle/jis_layout.json @@ -0,0 +1,411 @@ +[ + { + "pcb": false, + "plate": false + }, + [ + { + "a": 6, + "w": 1.25, + "h": 0.5 + }, + "Esc", + { + "x": 0.25, + "h": 0.5 + }, + "F1", + { + "x": 0.25, + "h": 0.5 + }, + "F2", + { + "x": 0.25, + "h": 0.5 + }, + "F3", + { + "x": 0.25, + "h": 0.5 + }, + "F4", + { + "x": 0.25, + "h": 0.5 + }, + "F5", + { + "x": 0.25, + "h": 0.5 + }, + "F6", + { + "x": 0.25, + "h": 0.5 + }, + "F7", + { + "x": 0.25, + "h": 0.5 + }, + "F8", + { + "x": 0.25, + "h": 0.5 + }, + "F9", + { + "x": 0.25, + "h": 0.5 + }, + "F10", + { + "x": 0.25, + "h": 0.5 + }, + "F11", + { + "x": 0.25, + "h": 0.5 + }, + "F12", + { + "x": 0.25, + "a": 5, + "w": 1.75, + "h": 0.5 + }, + "Delete" + ], + [ + { + "y": -0.25, + "a": 4 + }, + "~\n`", + { + "x": 0.25 + }, + "!\n1", + { + "x": 0.25 + }, + "\"\n2", + { + "x": 0.25 + }, + "\n3", + { + "x": 0.25 + }, + "$\n4", + { + "x": 0.25 + }, + "%\n5", + { + "x": 0.25 + }, + "^\n6", + { + "x": 0.25 + }, + "&\n7", + { + "x": 0.25 + }, + "*\n8", + { + "x": 0.25 + }, + "(\n9", + { + "x": 0.25 + }, + ")\n0", + { + "x": 0.25 + }, + "_\n-", + { + "x": 0.25 + }, + "+\n=", + { + "x": 0.25, + "a": 7, + "w": 0.5, + "w2": 0.75 + }, + "", + { + "x": 0.25, + "a": 6, + "w": 1.25 + }, + "Backsp" + ], + [ + { + "y": 0.25, + "a": 4, + "w": 1.5 + }, + "Tab", + { + "x": 0.25 + }, + "Q", + { + "x": 0.25 + }, + "W", + { + "x": 0.25 + }, + "E", + { + "x": 0.25 + }, + "R", + { + "x": 0.25 + }, + "T", + { + "x": 0.25 + }, + "Y", + { + "x": 0.25 + }, + "U", + { + "x": 0.25 + }, + "I", + { + "x": 0.25 + }, + "O", + { + "x": 0.25 + }, + "P", + { + "x": 0.25 + }, + "{\n[", + { + "x": 0.25 + }, + "}\n]", + { + "x": 0.5, + "a": 7, + "w": 1.25, + "h": 2.25, + "w2": 1.5, + "h2": 1.25, + "x2": -0.25 + }, + "Enter" + ], + [ + { + "y": 0.25, + "a": 4, + "w": 1.75 + }, + "Caps Lock", + { + "x": 0.25 + }, + "A", + { + "x": 0.25 + }, + "S", + { + "x": 0.25 + }, + "D", + { + "x": 0.25 + }, + "F", + { + "x": 0.25 + }, + "G", + { + "x": 0.25 + }, + "H", + { + "x": 0.25 + }, + "J", + { + "x": 0.25 + }, + "K", + { + "x": 0.25 + }, + "L", + { + "x": 0.25 + }, + ":\n;", + { + "x": 0.25 + }, + "@\n'", + { + "x": 0.25 + }, + "~\n#" + ], + [ + { + "y": 0.25, + "a": 6, + "w": 2.5 + }, + "Shift", + { + "x": 0.25, + "a": 4 + }, + "Z", + { + "x": 0.25 + }, + "X", + { + "x": 0.25 + }, + "C", + { + "x": 0.25 + }, + "V", + { + "x": 0.25 + }, + "B", + { + "x": 0.25 + }, + "N", + { + "x": 0.25 + }, + "M", + { + "x": 0.25 + }, + "<\n,", + { + "x": 0.25 + }, + ">\n.", + { + "x": 0.25 + }, + "?\n/", + { + "x": 0.25, + "a": 7 + }, + "", + { + "x": 0.25, + "a": 6, + "w": 1.75 + }, + "Shift" + ], + [ + { + "y": 0.25, + "w": 1.25 + }, + "Ctrl", + { + "x": 0.25 + }, + "Fn", + { + "x": 0.25 + }, + "Win", + { + "x": 0.25 + }, + "Alt", + { + "x": 0.25, + "a": 7, + "w": 0.5, + "w2": 0.75 + }, + "", + { + "x": 0.25, + "w": 3.75 + }, + "", + { + "x": 0.25, + "w": 0.5, + "w2": 0.75, + "x2": -0.25 + }, + "", + { + "x": 0.25, + "w": 0.5, + "w2": 0.75, + "x2": -0.25 + }, + "", + { + "x": 0.25, + "a": 6 + }, + "Alt", + { + "x": 0.25 + }, + "Ctrl", + { + "x": 0.25, + "a": 7, + "w": 1.25 + }, + "←", + { + "x": 0.25, + "w": 1.25, + "h": 0.5 + }, + "↑", + { + "x": 0.25, + "w": 1.25 + }, + "→" + ], + [ + { + "y": -0.5, + "x": 15.5, + "w": 1.25, + "h": 0.5 + }, + "↓" + ] +] \ No newline at end of file diff --git a/keyboards/framework/kle/jis_via.json b/keyboards/framework/kle/jis_via.json new file mode 100644 index 00000000000..c5fa1390838 --- /dev/null +++ b/keyboards/framework/kle/jis_via.json @@ -0,0 +1,392 @@ +[ + [ + { + "w": 1.25, + "h": 0.5 + }, + "7,5", + { + "x": 0.25, + "h": 0.5 + }, + "3,5", + { + "x": 0.25, + "h": 0.5 + }, + "2,5", + { + "x": 0.25, + "h": 0.5 + }, + "6,4", + { + "x": 0.25, + "h": 0.5 + }, + "3,4", + { + "x": 0.25, + "h": 0.5 + }, + "4,10", + { + "x": 0.25, + "h": 0.5 + }, + "3,10", + { + "x": 0.25, + "h": 0.5 + }, + "2,10", + { + "x": 0.25, + "h": 0.5 + }, + "1,15", + { + "x": 0.25, + "h": 0.5 + }, + "3,11", + { + "x": 0.25, + "h": 0.5 + }, + "4,8", + { + "x": 0.25, + "h": 0.5 + }, + "6,8", + { + "x": 0.25, + "h": 0.5 + }, + "3,15", + { + "x": 0.25, + "w": 1.75, + "h": 0.5 + }, + "0,1" + ], + [ + { + "y": -0.25 + }, + "4,2", + { + "x": 0.25 + }, + "5,2", + { + "x": 0.25 + }, + "5,5", + { + "x": 0.25 + }, + "5,4", + { + "x": 0.25 + }, + "5,6", + { + "x": 0.25 + }, + "4,6", + { + "x": 0.25 + }, + "4,7", + { + "x": 0.25 + }, + "5,7", + { + "x": 0.25 + }, + "5,10", + { + "x": 0.25 + }, + "5,8", + { + "x": 0.25 + }, + "4,13", + { + "x": 0.25 + }, + "2,13", + { + "x": 0.25 + }, + "4,14", + { + "x": 0.25, + "w": 0.5, + "w2": 0.75 + }, + "0,15", + { + "x": 0.25, + "w": 1.25 + }, + "5,14" + ], + [ + { + "y": 0.25, + "w": 1.5 + }, + "3,2", + { + "x": 0.25 + }, + "0,2", + { + "x": 0.25 + }, + "6,5", + { + "x": 0.25 + }, + "2,4", + { + "x": 0.25 + }, + "6,6", + { + "x": 0.25 + }, + "3,6", + { + "x": 0.25 + }, + "3,7", + { + "x": 0.25 + }, + "6,7", + { + "x": 0.25 + }, + "6,10", + { + "x": 0.25 + }, + "3,8", + { + "x": 0.25 + }, + "5,13", + { + "x": 0.25 + }, + "6,13", + { + "x": 0.25 + }, + "6,14", + { + "x": 0.5, + "w": 1.25, + "h": 2.25, + "w2": 1.5, + "h2": 1.25, + "x2": -0.25 + }, + "1,14" + ], + [ + { + "y": 0.25, + "w": 1.75 + }, + "4,4", + { + "x": 0.25 + }, + "7,2", + { + "x": 0.25 + }, + "4,5", + { + "x": 0.25 + }, + "7,14", + { + "x": 0.25 + }, + "7,6", + { + "x": 0.25 + }, + "2,6", + { + "x": 0.25 + }, + "2,7", + { + "x": 0.25 + }, + "7,7", + { + "x": 0.25 + }, + "7,10", + { + "x": 0.25 + }, + "7,8", + { + "x": 0.25 + }, + "7,13", + { + "x": 0.25 + }, + "0,14", + { + "x": 0.25 + }, + "2,8" + ], + [ + { + "y": 0.25, + "w": 2.5 + }, + "1,9", + { + "x": 0.25 + }, + "1,5", + { + "x": 0.25 + }, + "0,5", + { + "x": 0.25 + }, + "0,0", + { + "x": 0.25 + }, + "0,6", + { + "x": 0.25 + }, + "1,6", + { + "x": 0.25 + }, + "1,7", + { + "x": 0.25 + }, + "0,7", + { + "x": 0.25 + }, + "0,10", + { + "x": 0.25 + }, + "0,8", + { + "x": 0.25 + }, + "0,13", + { + "x": 0.25 + }, + "4,11", + { + "x": 0.25, + "w": 1.75 + }, + "0,9" + ], + [ + { + "y": 0.25, + "w": 1.25 + }, + "1,12", + { + "x": 0.25 + }, + "2,2", + { + "x": 0.25 + }, + "3,1", + { + "x": 0.25 + }, + "1,3", + { + "x": 0.25, + "w": 0.5, + "w2": 0.75 + }, + "6,2", + { + "x": 0.25, + "w": 3.75 + }, + "1,4", + { + "x": 0.25, + "w": 0.5, + "w2": 0.75, + "x2": -0.25 + }, + "1,11", + { + "x": 0.25, + "w": 0.5, + "w2": 0.75, + "x2": -0.25 + }, + "0,11", + { + "x": 0.25 + }, + "0,3", + { + "x": 0.25 + }, + "0,12", + { + "x": 0.25, + "w": 1.25 + }, + "6,11", + { + "x": 0.25, + "w": 1.25, + "h": 0.5 + }, + "1,13", + { + "x": 0.25, + "w": 1.25 + }, + "2,15" + ], + [ + { + "y": -0.5, + "x": 15.5, + "w": 1.25, + "h": 0.5 + }, + "1,8" + ] +] diff --git a/keyboards/framework/kle/macropad_layout.json b/keyboards/framework/kle/macropad_layout.json new file mode 100644 index 00000000000..512c79293fe --- /dev/null +++ b/keyboards/framework/kle/macropad_layout.json @@ -0,0 +1,133 @@ +[ + [ + { + "a": 7, + "h": 0.75 + }, + "", + { + "x": 0.25, + "h": 0.75 + }, + "", + { + "x": 0.25, + "h": 0.75 + }, + "", + { + "x": 0.25, + "h": 0.75 + }, + "" + ], + [ + { + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "" + ], + [ + { + "y": 0.5, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "" + ], + [ + { + "y": 0.5, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "" + ], + [ + { + "y": 0.5, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "" + ], + [ + { + "y": 0.5, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "", + { + "x": 0.25, + "h": 1.25 + }, + "" + ] +] \ No newline at end of file diff --git a/keyboards/framework/kle/macropad_via.json b/keyboards/framework/kle/macropad_via.json new file mode 100644 index 00000000000..b9f050b5fed --- /dev/null +++ b/keyboards/framework/kle/macropad_via.json @@ -0,0 +1,132 @@ +[ + [ + { + "h": 0.75 + }, + "2,1", + { + "x": 0.25, + "h": 0.75 + }, + "2,2", + { + "x": 0.25, + "h": 0.75 + }, + "3,4", + { + "x": 0.25, + "h": 0.75 + }, + "2,4" + ], + [ + { + "h": 1.25 + }, + "0,0", + { + "x": 0.25, + "h": 1.25 + }, + "0,4", + { + "x": 0.25, + "h": 1.25 + }, + "1,1", + { + "x": 0.25, + "h": 1.25 + }, + "1,6" + ], + [ + { + "y": 0.5, + "h": 1.25 + }, + "0,1", + { + "x": 0.25, + "h": 1.25 + }, + "0,5", + { + "x": 0.25, + "h": 1.25 + }, + "1,2", + { + "x": 0.25, + "h": 1.25 + }, + "2,5" + ], + [ + { + "y": 0.5, + "h": 1.25 + }, + "0,2", + { + "x": 0.25, + "h": 1.25 + }, + "0,6", + { + "x": 0.25, + "h": 1.25 + }, + "1,3", + { + "x": 0.25, + "h": 1.25 + }, + "1,7" + ], + [ + { + "y": 0.5, + "h": 1.25 + }, + "0,3", + { + "x": 0.25, + "h": 1.25 + }, + "0,7", + { + "x": 0.25, + "h": 1.25 + }, + "1,4", + { + "x": 0.25, + "h": 1.25 + }, + "2,6" + ], + [ + { + "y": 0.5, + "h": 1.25 + }, + "1,0", + { + "x": 0.25, + "h": 1.25 + }, + "2,7", + { + "x": 0.25, + "h": 1.25 + }, + "1,5", + { + "x": 0.25, + "h": 1.25 + }, + "2,0" + ] +] diff --git a/keyboards/framework/kle/numpad_layout.json b/keyboards/framework/kle/numpad_layout.json new file mode 100644 index 00000000000..7e51408cfe1 --- /dev/null +++ b/keyboards/framework/kle/numpad_layout.json @@ -0,0 +1,124 @@ +[ + [ + { + "a": 6, + "h": 0.75 + }, + "ESC", + { + "x": 0.25, + "a": 4, + "h": 0.75 + }, + "+ -\nx /", + { + "x": 0.25, + "a": 7, + "h": 0.75 + }, + "=", + { + "x": 0.25, + "h": 0.75 + }, + "<--" + ], + [ + { + "a": 4, + "h": 1.25 + }, + "Num Lock", + { + "x": 0.25, + "a": 7, + "h": 1.25 + }, + "-", + { + "x": 0.25, + "h": 1.25 + }, + "*", + { + "x": 0.25, + "h": 1.25 + }, + "-" + ], + [ + { + "y": 0.5, + "a": 4, + "h": 1.25 + }, + "7\nHome", + { + "x": 0.25, + "h": 1.25 + }, + "8\n↑", + { + "x": 0.25, + "h": 1.25 + }, + "9\nPgUp", + { + "x": 0.25, + "h": 2.75 + }, + "+" + ], + [ + { + "y": 0.5, + "h": 1.25 + }, + "4\n←", + { + "x": 0.25, + "h": 1.25 + }, + "5", + { + "x": 0.25, + "h": 1.25 + }, + "6\n→" + ], + [ + { + "y": 0.5, + "h": 1.25 + }, + "1\nEnd", + { + "x": 0.25, + "h": 1.25 + }, + "2\n↓", + { + "x": 0.25, + "h": 1.25 + }, + "3\nPgDn", + { + "x": 0.25, + "h": 2.75 + }, + "Enter" + ], + [ + { + "y": 0.5, + "w": 2.25, + "h": 1.25 + }, + "0\nIns", + { + "x": 0.25, + "h": 1.25 + }, + ".\nDel" + ] +] \ No newline at end of file diff --git a/keyboards/framework/kle/numpad_via.json b/keyboards/framework/kle/numpad_via.json new file mode 100644 index 00000000000..999eb7de01f --- /dev/null +++ b/keyboards/framework/kle/numpad_via.json @@ -0,0 +1,118 @@ +[ + [ + { + "h": 0.75 + }, + "2,1", + { + "x": 0.25, + "h": 0.75 + }, + "2,2", + { + "x": 0.25, + "h": 0.75 + }, + "3,4", + { + "x": 0.25, + "h": 0.75 + }, + "2,4" + ], + [ + { + "h": 1.25 + }, + "0,0", + { + "x": 0.25, + "h": 1.25 + }, + "0,4", + { + "x": 0.25, + "h": 1.25 + }, + "1,1", + { + "x": 0.25, + "h": 1.25 + }, + "1,6" + ], + [ + { + "y": 0.5, + "h": 1.25 + }, + "0,1", + { + "x": 0.25, + "h": 1.25 + }, + "0,5", + { + "x": 0.25, + "h": 1.25 + }, + "1,2", + { + "x": 0.25, + "h": 2.75 + }, + "1,7" + ], + [ + { + "y": 0.5, + "h": 1.25 + }, + "0,2", + { + "x": 0.25, + "h": 1.25 + }, + "0,6", + { + "x": 0.25, + "h": 1.25 + }, + "1,3" + ], + [ + { + "y": 0.5, + "h": 1.25 + }, + "0,3", + { + "x": 0.25, + "h": 1.25 + }, + "0,7", + { + "x": 0.25, + "h": 1.25 + }, + "1,4", + { + "x": 0.25, + "h": 2.75 + }, + "2,0" + ], + [ + { + "y": 0.5, + "w": 2.25, + "h": 1.25 + }, + "1,0", + { + "x": 0.25, + "h": 1.25 + }, + "1,5" + ] +] \ No newline at end of file diff --git a/keyboards/framework/led.py b/keyboards/framework/led.py new file mode 100755 index 00000000000..f1fcc628c73 --- /dev/null +++ b/keyboards/framework/led.py @@ -0,0 +1,281 @@ +#!/usr/bin/env python3 +""" +Generate C code for the common configuration of the RBG matrix feature of QMK + +Reference: https://docs.qmk.fm/#/feature_rgb_matrix?id=common-configuration + +To use adjust `ansi` variable, run it and use the printed output. + +All LEDs are set as type LED_FLAG_KEYLIGHT. That's good enough for us. +All our LEDs are behind keys. However, LED_FLAG_MODIFIER might be useful for +some keys. Not sure what that means, though. +""" + +from collections import OrderedDict + +# Rows and columns in the electrical keyboard matrix. +# Equivalent to QMK's macros: MATRIX_ROWS and MATRIX_COLS +# Keyboard +MATRIX_ROWS = 8 +MATRIX_COLS = 16 +# Macropad +#MATRIX_ROWS = 4 +#MATRIX_COLS = 8 + +LED_FLAG_NONE = 0x00 +LED_FLAG_MODIFIER = 0x01 +LED_FLAG_UNDERGLOW = 0x02 +LED_FLAG_KEYLIGHT = 0x04 +LED_FLAG_INDICATOR = 0x08 + +# This structure is (manually) taken from a picture of the LED positions. +# The coordinates don't need to be translated or scaled. This script takes care of that. +# I loaded the PDF into GIMP and just took the coordinates. +# id: LED id, of where it's connected to the LED controller +# x: x coordinate of the LED +# y: y coordinate of the LED +# matrix: The keyboard matrix coordinate of the key this LED belongs to. +# Only one LED per key needs this. Other's can keep it unset. +ansi = [ + { "id": "26", "x":86, "y": 160, "matrix": (5,7) }, # ESC + { "id": "24", "x":134, "y": 160 }, # ESC + { "id": "22", "x":200, "y": 154, "matrix": (5,3) }, + + { "id": "20", "x":275, "y": 154, "matrix": (5,2) }, # Each 75 apart in x + { "id": "19", "x":350, "y": 154, "matrix": (4,6) }, + { "id": "21", "x":425, "y": 154, "matrix": (4,3) }, + { "id": "23", "x":500, "y": 154, "matrix": (10,4) }, + { "id": "25", "x":575, "y": 154, "matrix": (10,3) }, + { "id": "27", "x":650, "y": 154, "matrix": (10,2) }, + { "id": "68", "x":725, "y": 154, "matrix": (15,1) }, + { "id": "75", "x":800, "y": 154, "matrix": (11,3) }, + { "id": "69", "x":875, "y": 154, "matrix": (8,4) }, + + { "id": "67", "x":935, "y": 158, "matrix": (8,6) }, # PrtScr + { "id": "72", "x":960, "y": 158 }, # PrtScr + { "id": "71", "x":1022, "y": 154, "matrix": (13,3) },# F12 + { "id": "73", "x":1088, "y": 160, "matrix": (1,0) }, # Del + { "id": "74", "x":1135, "y": 160 }, # Del + + # Second row + { "id": "17", "x":97, "y": 216, "matrix": (2,4) }, # Each 75 apart in x + { "id": "16", "x":172, "y": 216, "matrix": (2,5) }, + { "id": "14", "x":247, "y": 216, "matrix": (5,5) }, + { "id": "13", "x":322, "y": 216, "matrix": (4,5) }, + { "id": "12", "x":397, "y": 216, "matrix": (6,5) }, + { "id": "10", "x":472, "y": 216, "matrix": (6,4) }, + { "id": "15", "x":547, "y": 216, "matrix": (7,4) }, + { "id": "11", "x":622, "y": 216, "matrix": (7,5) }, + { "id": "18", "x":697, "y": 216, "matrix": (10,5) }, + { "id": "70", "x":772, "y": 216, "matrix": (8,5) }, + { "id": "62", "x":847, "y": 216, "matrix": (13,4) }, + { "id": "64", "x":922, "y": 216, "matrix": (13,2) }, + { "id": "63", "x":997, "y": 216, "matrix": (14,4) }, + + { "id": "65", "x":1067, "y": 224, "matrix": (14,5) }, # Backspace + { "id": "66", "x":1128, "y": 224 }, # Backspace + + # Third row + { "id": "2", "x":90, "y": 298, "matrix": (2,3) }, # Tab + { "id": "1", "x":140, "y": 298 }, # Tab + + { "id": "6", "x":207, "y": 290, "matrix": (2,0) }, # Each 75 apart in x + { "id": "4", "x":282, "y": 290, "matrix": (5,6) }, + { "id": "3", "x":357, "y": 290, "matrix": (4,2) }, + { "id": "5", "x":432, "y": 290, "matrix": (6,6) }, + { "id": "8", "x":507, "y": 290, "matrix": (6,3) }, + { "id": "9", "x":582, "y": 290, "matrix": (7,3) }, + { "id": "7", "x":657, "y": 290, "matrix": (7,6) }, + { "id": "59", "x":732, "y": 290, "matrix": (10,6) }, + { "id": "60", "x":807, "y": 290, "matrix": (8,3) }, + { "id": "61", "x":882, "y": 290, "matrix": (13,5) }, + { "id": "58", "x":957, "y": 290, "matrix": (13,6) }, + { "id": "55", "x":1032, "y": 290, "matrix": (14,6) }, + + { "id": "56", "x":1115, "y": 292, "matrix": (8,2) }, + + # Forth row + { "id": "45", "x":94, "y": 374 }, # Caps + { "id": "39", "x":123, "y": 367, "matrix": (4,4) }, # Caps + { "id": "43", "x":150, "y": 374 }, # Caps + + { "id": "37", "x":227, "y": 365, "matrix": (2,7) }, # Each 75 apart in x + { "id": "42", "x":302, "y": 365, "matrix": (5,4) }, + { "id": "38", "x":377, "y": 365, "matrix": (14,7) }, + { "id": "44", "x":452, "y": 365, "matrix": (6,7) }, + { "id": "40", "x":527, "y": 365, "matrix": (6,2) }, + { "id": "41", "x":602, "y": 365, "matrix": (7,2) }, + { "id": "50", "x":677, "y": 365, "matrix": (7,7) }, + { "id": "51", "x":752, "y": 365, "matrix": (10,7) }, + { "id": "52", "x":827, "y": 365, "matrix": (8,7) }, + { "id": "49", "x":902, "y": 365, "matrix": (13,7) }, + { "id": "53", "x":977, "y": 365, "matrix": (14,0) }, + + { "id": "54", "x":1050, "y": 365, "matrix": (14,1) }, # Enter + { "id": "57", "x":1131, "y": 373 }, # Enter + + # Fifth row + { "id": "33", "x":91, "y": 448 }, # Shift + { "id": "31", "x":113, "y": 448, "matrix": (9,1) }, # Shift + { "id": "29", "x":191, "y": 440 }, # Shift + + { "id": "28", "x":266, "y": 440, "matrix": (5,1) }, # Each 75 apart in x + { "id": "30", "x":341, "y": 440, "matrix": (5,0) }, + { "id": "32", "x":416, "y": 440, "matrix": (0,0) }, + { "id": "34", "x":491, "y": 440, "matrix": (6,0) }, + { "id": "36", "x":566, "y": 440, "matrix": (6,1) }, + { "id": "77", "x":641, "y": 440, "matrix": (7,1) }, + { "id": "78", "x":716, "y": 440, "matrix": (7,0) }, + { "id": "79", "x":791, "y": 440, "matrix": (10,0) }, + { "id": "76", "x":866, "y": 440, "matrix": (8,0) }, + { "id": "80", "x":941, "y": 440, "matrix": (13,0) }, + + { "id": "81", "x":1013, "y": 445 }, # Shift + { "id": "83", "x":1041, "y": 445, "matrix": (9,0) }, # Shift + { "id": "84", "x":1106, "y": 445 }, # Shift + { "id": "93", "x":1127, "y": 445 }, # Shift + + # Sixth row + { "id": "35", "x":89, "y": 522, "matrix": (12,1) }, # CTRL + { "id": "46", "x":124, "y": 522 }, # CTRL + { "id": "94", "x":191, "y": 515, "matrix": (2,2) }, + { "id": "47", "x":266, "y": 515, "matrix": (1,3) }, + { "id": "48", "x":341, "y": 515, "matrix": (3,1) }, + { "id": "95", "x":415, "y": 522 }, # Space + { "id": "96", "x":475, "y": 522 }, # Space + { "id": "97", "x":535, "y": 522, "matrix": (4,1) }, # Space + { "id": "86", "x":595, "y": 522 }, # Space + { "id": "87", "x":655, "y": 522 }, # Space + { "id": "88", "x":715, "y": 522 }, # Space + { "id": "85", "x":791, "y": 515, "matrix": (3,0) }, + { "id": "89", "x":865, "y": 515, "matrix": (12,0) }, + { "id": "90", "x":945, "y": 542, "matrix": (11,6) }, + { "id": "91", "x":1033, "y": 534, "matrix": (8,1) }, # Down + { "id": "82", "x":1033, "y": 510, "matrix": (13,1) }, # Up + { "id": "92", "x":1120, "y": 542, "matrix": (15,2) }, +] + +macropad = [ + { "id": "6", "x":1332, "y": 158, "matrix": (1,2) }, + { "id": "3", "x":1395, "y": 158, "matrix": (2,2) }, + { "id": "23", "x":1460, "y": 158, "matrix": (4,3) }, + { "id": "18", "x":1523, "y": 158, "matrix": (4,2) }, + + { "id": "5", "x":1332, "y": 219, "matrix": (0,0) }, + { "id": "1", "x":1395, "y": 219, "matrix": (4,0) }, + { "id": "21", "x":1460, "y": 219, "matrix": (1,1) }, + { "id": "19", "x":1523, "y": 219, "matrix": (6,1) }, + + { "id": "8", "x":1332, "y": 294, "matrix": (1,0) }, + { "id": "2", "x":1395, "y": 294, "matrix": (5,0) }, + { "id": "22", "x":1460, "y": 294, "matrix": (2,1) }, + { "id": "17", "x":1523, "y": 294, "matrix": (5,2) }, + + { "id": "7", "x":1332, "y": 368, "matrix": (2,0) }, + { "id": "4", "x":1395, "y": 368, "matrix": (6,0) }, + { "id": "24", "x":1460, "y": 368, "matrix": (3,1) }, + { "id": "20", "x":1523, "y": 368, "matrix": (7,1) }, + + { "id": "10", "x":1332, "y": 443, "matrix": (3,0) }, + { "id": "12", "x":1395, "y": 443, "matrix": (7,0) }, + { "id": "16", "x":1460, "y": 443, "matrix": (4,1) }, + { "id": "14", "x":1523, "y": 443, "matrix": (6,2) }, + + { "id": "9", "x":1332, "y": 519, "matrix": (0,1) }, + { "id": "11", "x":1395, "y": 519, "matrix": (7,2) }, + { "id": "15", "x":1460, "y": 519, "matrix": (5,1) }, + { "id": "13", "x":1523, "y": 519, "matrix": (0,2) }, +] + +# Recommended by QMK to be the (x,y) range of position values +LED_MAX = (224.0, 64.0) + +NO_LED = 255 + +# Map LEDs to keyboard matrix and normalize LED coordinates +def normalize(layout): + led_to_el = [[NO_LED for _ in range(MATRIX_COLS)] for _ in range(MATRIX_ROWS)] + # Find smallest (offset) and largest (max) values + offset_x = layout[0]['x'] + offset_y = layout[0]['y'] + max_x = layout[-1]['x'] + max_y = layout[-1]['y'] + for v in layout: + if v['x'] < offset_x: + offset_x = v['x'] + if v['y'] < offset_y: + offset_y = v['y'] + if v['x'] > max_x: + max_x = v['x'] + if v['y'] > max_y: + max_y = v['y'] + # Ratio of coordinates in the input data vs QMK's reference rectangle + x_ratio = LED_MAX[0] / (max_x - offset_x) + y_ratio = LED_MAX[1] / (max_y - offset_y) + + # Normalize LED coordinates by scaling and translating + normalized = OrderedDict() + for v in sorted(layout, key=lambda item: int(item['id'])): + x = x_ratio * (v['x'] - offset_x) + y = y_ratio * (v['y'] - offset_y) + + normalized[int(v['id'])] = (x, y) + + if 'matrix' in v: + if not v['matrix'] or v['matrix'] == (): + continue + (matrix_x,matrix_y) = v['matrix'] + # Map LED IDs to keyboard matrix + # Turn LED index into 0-indexed + led_to_el[matrix_y][matrix_x] = int(v['id']) - 1 + return led_to_el, normalized + +# Turn the data to C code that can be used in QMK's keymap.c +def print_matrix(layout, led_to_el, normalized): + print("led_config_t g_led_config = { {") + print(" // Key Matrix to LED Index") + for row in led_to_el: + print(" {", end='') + for col in row: + if col == 255: + col = 'NO_LED' + print(f"{col: >6}, ", end='') + print("},") + + print("}, {") + print(" // LED Index to Physical Position") + for (i, (led_id, (x, y))) in enumerate(normalized.items()): + coords = f" {{ {int(x): >3}, {int(y): >3} }}," + print(f"{coords: <15} // LED {led_id}") + + print("}, {") + print(" // LED Index to Flag") + print(" ", end='') + for i in range(len(layout)): + # TODO: Support other LED flags + print(LED_FLAG_KEYLIGHT, end='') + if i + 1 == len(layout): + print() + break + else: + print(", ", end='') + if (i + 1) % 16 == 0: + print("\n ", end='') + print("} };") + +def main(data): + # Normalize data and convert to C code + led_to_el, normalized = normalize(data) + print_matrix(data, led_to_el, normalized) + + # Draw led positions to visually check them with the reference design + import matplotlib.pyplot as plt + a = [[x, y] for _i, (x, y) in normalized.items()] + scatter = plt.scatter(*zip(*a)) + ax = scatter.axes + ax.invert_yaxis() + plt.show() + +if __name__ == "__main__": + # Can choose which dataset to process + main(ansi) diff --git a/keyboards/framework/macropad/config.h b/keyboards/framework/macropad/config.h new file mode 100644 index 00000000000..82a35035b1e --- /dev/null +++ b/keyboards/framework/macropad/config.h @@ -0,0 +1,16 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#define MATRIX_COLS 8 +#define MATRIX_ROWS 4 + +#define DRIVER_COUNT 1 +#define DRIVER_ADDR_1 0b0100000 +#define RGB_MATRIX_LED_COUNT 24 +// Enable only the first 4 SW and disable software shutdown +// Otherwise voltage on SW pins without LEDs causes voltage rise and noise +#define ISSI_CONFIGURATION 0x71 + +// Limit current to ensure max current draw is just about 500mA +// when white at 100% brightness +#define ISSI_GLOBALCURRENT 185 diff --git a/keyboards/framework/macropad/info.json b/keyboards/framework/macropad/info.json new file mode 100644 index 00000000000..a40be330831 --- /dev/null +++ b/keyboards/framework/macropad/info.json @@ -0,0 +1,62 @@ +{ + "keyboard_name": "Laptop 16 RGB Macropad", + "manufacturer": "Framework", + "maintainer": "JohnAZoidberg", + "bootloader": "rp2040", + "features": { + "bootmagic": false, + "mousekey": false, + "extrakey": true, + "console": true, + "command": false, + "nkro": true, + "audio": false + }, + "debounce": 5, + "processor": "RP2040", + "url": "https://fr.mw/FRAKDNEN", + "usb": { + "device_version": "0.2.2", + "pid": "0x0013", + "vid": "0x32AC", + "force_nkro": true + }, + "backlight": { + "pin": "GP25" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "x": 0, "y": 0, "h": 0.75 }, + { "x": 1.25, "y": 0, "h": 0.75 }, + { "x": 2.5, "y": 0, "h": 0.75 }, + { "x": 3.75, "y": 0, "h": 0.75 }, + + { "x": 0, "y": 1, "h": 1.25 }, + { "x": 1.25, "y": 1, "h": 1.25 }, + { "x": 2.5, "y": 1, "h": 1.25 }, + { "x": 3.75, "y": 1, "h": 1.25 }, + + { "x": 0, "y": 2.5, "h": 1.25 }, + { "x": 1.25, "y": 2.5, "h": 1.25 }, + { "x": 2.5, "y": 2.5, "h": 1.25 }, + { "x": 3.75, "y": 2.5, "h": 1.25 }, + + { "x": 0, "y": 4, "h": 1.25 }, + { "x": 1.25, "y": 4, "h": 1.25 }, + { "x": 2.5, "y": 4, "h": 1.25 }, + { "x": 3.75, "y": 4, "h": 1.25 }, + + { "x": 0, "y": 5.5, "h": 1.25 }, + { "x": 1.25, "y": 5.5, "h": 1.25 }, + { "x": 2.5, "y": 5.5, "h": 1.25 }, + { "x": 3.75, "y": 5.5, "h": 1.25 }, + + { "x": 0, "y": 7, "w": 2.25, "h": 1.25 }, + { "x": 1.25, "y": 7, "h": 1.25 }, + { "x": 2.5, "y": 7, "h": 1.25 }, + { "x": 3.75, "y": 7, "h": 1.25 } + ] + } + } +} diff --git a/keyboards/framework/macropad/keymaps/default/keymap.c b/keyboards/framework/macropad/keymaps/default/keymap.c new file mode 100644 index 00000000000..c4fdfc82a7d --- /dev/null +++ b/keyboards/framework/macropad/keymaps/default/keymap.c @@ -0,0 +1,87 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───────┬───────┬───────┬───────┐ + * 4 keys │ RGB │RGB Nxt│ RGB + │ Sleep │ + * │Toggle │Effect │Brightn│ │ + * ├───────┼───────┼───────┼───────┤ + * 4 keys │Numpad │RGB Prv│ RGB - │ RGB BL│ + * │Layer │Effect │Brightn│ Step │ + * ├───────┼───────┼───────┼───────┤ + * 4 keys │ RGB + │ RGB + │ RGB + │ <-- │ + * │ Hue │ Sat │ Speed │ │ + * ├───────┼───────┼───────┼───────┤ + * 4 keys │ RGB - │ RGB - │ RGB - │ Enter │ + * │ Hue │ Sat │ Speed │ │ + * ├───────┼───────┼───────┼───────┤ + * 4 keys │ │ Up │ │ │ + * │ │ │ │ │ + * ├───────┼───────┼───────┼───────┤ + * 4 keys │ Left │ Down │ Right │ │ + * │ │ │ │ │ + * └───────┴───────┴───────┴───────┘ + * 24 total + */ + [0] = LAYOUT( + RGB_TOG, RGB_MOD, RGB_VAI, KC_SLEP, + TG(1), RGB_RMOD,RGB_VAD, BL_STEP, + RGB_HUI, RGB_SAI, RGB_SPI, KC_BSPC, + RGB_HUD, RGB_SAD, RGB_SPD, KC_ENT, + XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, + KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX + ), + /* Numpad + * ┌────┬────┬────┬────┐ + * 4 keys │Esc │Calc│ = │ <- │ + * ├────┼────┼────┼────┤ + * 4 keys │ │ / │ * │ - │ + * ├────┼────┼────┼────┤ + * 4 keys │ 7 │ 8 │ 9 │ + │ + * ├────┼────┼────┼────┤ + * 4 keys │ 4 │ 5 │ 6 │ + │ + * ├────┼────┼────┼────┤ + * 4 keys │ 1 │ 2 │ 3 │Entr│ + * ├────┼────┼────┼────┤ + * 4 keys │ 0 │ 0 │ . │Entr│ + * └────┴────┴────┴────┘ + * 24 total + */ + [1] = LAYOUT( + KC_ESC, KC_CALC, KC_EQL, KC_BSPC, + _______, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT + ), + /* Alphabet + * ┌────┬────┬────┬────┐ + * 4 keys │ A │ B │ C │ D │ + * ├────┼────┼────┼────┤ + * 4 keys │ E │ F │ G │ H │ + * ├────┼────┼────┼────┤ + * 4 keys │ I │ J │ K │ L │ + * ├────┼────┼────┼────┤ + * 4 keys │ M │ N │ O │ P │ + * ├────┼────┼────┼────┤ + * 4 keys │ Q │ R │ S │ T │ + * ├────┼────┼────┼────┤ + * 4 keys │ U │ V │ W │ X │ + * └────┴────┴────┴────┘ + * 24 total + */ + [2] = LAYOUT( + KC_A, KC_B, KC_C, KC_D, + KC_E, KC_F, KC_G, KC_H, + KC_I, KC_J, KC_K, KC_L, + KC_M, KC_N, KC_O, KC_P, + KC_Q, KC_R, KC_S, KC_T, + KC_U, KC_V, KC_W, KC_X + ) +}; +// clang-format on diff --git a/keyboards/framework/macropad/keymaps/esther/keymap.c b/keyboards/framework/macropad/keymaps/esther/keymap.c new file mode 100644 index 00000000000..4933f0bf61e --- /dev/null +++ b/keyboards/framework/macropad/keymaps/esther/keymap.c @@ -0,0 +1,63 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───────┬───────┬───────┬───────┐ + * 4 keys │ RGB + │ RGB - │RGB Nxt│RGB Prv│ + * │Brightn│Brightn│Effect │Effect │ + * ├───────┼───────┼───────┼───────┤ + * 4 keys │Numpad │ │ │ CTRL+A│ + * │Layer │ │ │ │ + * ├───────┼───────┼───────┼───────┤ + * 4 keys │ Enter │ │ │ Delete│ + * │ │ │ │ │ + * ├───────┼───────┼───────┼───────┤ + * 4 keys │ Save │ A │ V │ Cut │ + * │ │ │ │ │ + * ├───────┼───────┼───────┼───────┤ + * 4 keys │ + │ CTRL │ Undo │ Copy │ + * │ │ + │ │ │ + * ├───────┼───────┼───────┼───────┤ + * 4 keys │ - │ CTRL │ Redo │ Paste │ + * │ │ - │ │ │ + * └───────┴───────┴───────┴───────┴ + * 24 total + */ + [0] = LAYOUT( + RGB_VAI, RGB_VAD, RGB_MOD, RGB_RMOD, + TG(1), XXXXXXX, XXXXXXX, C(KC_A), + KC_ENT, XXXXXXX, XXXXXXX, KC_DEL, + C(KC_S), KC_A, KC_V, C(KC_X), + KC_PPLS, C(KC_EQL), C(KC_Z), C(KC_C), + KC_PMNS, C(KC_MINS),C(KC_Y), C(KC_V) + ), + /* Numpad + * ┌────┬────┬────┬────┐ + * 4 keys │Esc │Calc│ = │ <- │ + * ├────┼────┼────┼────┤ + * 4 keys │ Num│ / │ * │ - │ + * ├────┼────┼────┼────┤ + * 3 keys │ 7 │ 8 │ 9 │ + │ + * ├────┼────┼────┼────┤ + * 4 keys │ 4 │ 5 │ 6 │ + │ + * ├────┼────┼────┼────┤ + * 3 keys │ 1 │ 2 │ 3 │Entr│ + * ├────┼────┼────┼────┤ + * 3 keys │ 0 │ 0 │ . │Entr│ + * └────┼────┴────┴────┴ + * 21 total + */ + [1] = LAYOUT( + KC_ESC, KC_CALC, KC_EQL, KC_BSPC, + _______, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT + ) +}; +// clang-format on diff --git a/keyboards/framework/macropad/macropad.c b/keyboards/framework/macropad/macropad.c new file mode 100644 index 00000000000..0e396d977dc --- /dev/null +++ b/keyboards/framework/macropad/macropad.c @@ -0,0 +1,83 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// clang-format off +const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + // Re-arranged in LED ID order so it matches with the physical location array + {0, CS3_SW1, CS2_SW1, CS1_SW1}, // LED 1 + {0, CS3_SW2, CS2_SW2, CS1_SW2}, // LED 2 + {0, CS3_SW3, CS2_SW3, CS1_SW3}, // LED 3 + {0, CS3_SW4, CS2_SW4, CS1_SW4}, // LED 4 + + {0, CS6_SW1, CS5_SW1, CS4_SW1}, // LED 5 + {0, CS6_SW3, CS5_SW3, CS4_SW3}, // LED 6 + {0, CS6_SW4, CS5_SW4, CS4_SW4}, // LED 7 + {0, CS6_SW2, CS5_SW2, CS4_SW2}, // LED 8 + + {0, CS9_SW1, CS8_SW1, CS7_SW1}, // LED 9 + {0, CS9_SW2, CS8_SW2, CS7_SW2}, // LED 10 + {0, CS9_SW3, CS8_SW3, CS7_SW3}, // LED 11 + {0, CS9_SW4, CS8_SW4, CS7_SW4}, // LED 12 + + {0, CS12_SW1, CS11_SW1, CS10_SW1}, // LED 13 + {0, CS12_SW2, CS11_SW2, CS10_SW2}, // LED 14 + {0, CS12_SW3, CS11_SW3, CS10_SW3}, // LED 15 + {0, CS12_SW4, CS11_SW4, CS10_SW4}, // LED 16 + + {0, CS15_SW2, CS14_SW2, CS13_SW2}, // LED 17 + {0, CS15_SW3, CS14_SW3, CS13_SW3}, // LED 18 + {0, CS15_SW1, CS14_SW1, CS13_SW1}, // LED 19 + {0, CS15_SW4, CS14_SW4, CS13_SW4}, // LED 20 + + {0, CS18_SW1, CS17_SW1, CS16_SW1}, // LED 21 + {0, CS18_SW2, CS17_SW2, CS16_SW2}, // LED 22 + {0, CS18_SW3, CS17_SW3, CS16_SW3}, // LED 23 + {0, CS18_SW4, CS17_SW4, CS16_SW4}, // LED 24 +}; + +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 4, 7, 6, 9, 0, 1, 3, 11, }, + { 8, 20, 21, 23, 15, 14, 18, 19, }, + { 12, 5, 2, NO_LED, 17, 16, 13, 10, }, + {NO_LED, NO_LED, NO_LED, NO_LED, 22, NO_LED, NO_LED, NO_LED, }, +}, { + // LED Index to Physical Position + { 73, 10 }, // LED 1 + { 73, 24 }, // LED 2 + { 73, 0 }, // LED 3 + { 73, 37 }, // LED 4 + { 0, 10 }, // LED 5 + { 0, 0 }, // LED 6 + { 0, 37 }, // LED 7 + { 0, 24 }, // LED 8 + { 0, 64 }, // LED 9 + { 0, 50 }, // LED 10 + { 73, 64 }, // LED 11 + { 73, 50 }, // LED 12 + { 223, 64 }, // LED 13 + { 223, 50 }, // LED 14 + { 150, 64 }, // LED 15 + { 150, 50 }, // LED 16 + { 223, 24 }, // LED 17 + { 223, 0 }, // LED 18 + { 223, 10 }, // LED 19 + { 223, 37 }, // LED 20 + { 150, 10 }, // LED 21 + { 150, 24 }, // LED 22 + { 150, 0 }, // LED 23 + { 150, 37 }, // LED 24 +}, { + // LED Index to Flag + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4 +} }; +// clang-format on diff --git a/keyboards/framework/macropad/macropad.h b/keyboards/framework/macropad/macropad.h new file mode 100644 index 00000000000..3976c21740b --- /dev/null +++ b/keyboards/framework/macropad/macropad.h @@ -0,0 +1,18 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +// clang-format off +#define LAYOUT( \ + H1, H2, H3, H4, \ + K90, K95, K100, K105, \ + K91, K96, K101, K107, \ + K92, K97, K102, K106, \ + K93, K98, K103, K109, \ + K99, K110, K104, K108 \ +) \ +{ \ + { K90, K91, K92, K93, K95, K96, K97, K98 }, \ + { K99, K100, K101, K102, K103, K104, K105, K106 }, \ + { K108, H1, H2, KC_NO, H4, K107, K109, K110 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, H3, KC_NO, KC_NO, KC_NO }, \ +} diff --git a/keyboards/framework/macropad/rules.mk b/keyboards/framework/macropad/rules.mk new file mode 100644 index 00000000000..a98954a13dc --- /dev/null +++ b/keyboards/framework/macropad/rules.mk @@ -0,0 +1,2 @@ +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = IS31FL3743A diff --git a/keyboards/framework/matrix.c b/keyboards/framework/matrix.c new file mode 100644 index 00000000000..41d6d3bc98a --- /dev/null +++ b/keyboards/framework/matrix.c @@ -0,0 +1,335 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include +#include "debug.h" +#include "analog.h" +#include "print.h" +#include "quantum.h" +#include "hal_adc.h" +#include "chprintf.h" + +#include "matrix.h" +#include "framework.h" + +#define adc10ksample_t int + +// Mux GPIOs +#define MUX_A GP1 +#define MUX_B GP2 +#define MUX_C GP3 +#define MUX_ENABLE GP4 + +// Rows to ADC input +#define KSI0 2 +#define KSI1 0 +#define KSI2 1 +#define KSI3 3 + +// Columns to GPIOs +#define KSO0 GP8 +#define KSO1 GP9 +#define KSO2 GP10 +#define KSO3 GP11 +#define KSO4 GP12 +#define KSO5 GP13 +#define KSO6 GP14 +#define KSO7 GP15 +#define KSO8 GP21 +#define KSO9 GP20 +#define KSO10 GP19 +#define KSO11 GP18 +#define KSO12 GP17 +#define KSO13 GP16 +#define KSO14 GP23 +#define KSO15 GP22 + +#define ADC_CH2_PIN GP28 + +// Voltage threshold - anything below that counts as pressed +// 29000 = 2.9V * 10000 +const adc10ksample_t ADC_THRESHOLD = (adc10ksample_t)29000; + +bool have_slept = false; + +adc10ksample_t to_voltage(adcsample_t sample) { + int voltage = sample * 33000; + return voltage / 1023; +} + +/** + * Tell RP2040 ADC controller to initialize a specific GPIO for ADC input + */ +void adc_gpio_init(int gpio) { + assert(gpio >= GP26 && gpio <= GP28); +// Enable pull-up on GPIO input so that we always have high input +// Even on the rows that don't have the external pull-up. +// Otherwise they would be floating. +#define PAL_MODE_ADC_PULLUP (PAL_MODE_INPUT_ANALOG | PAL_RP_PAD_PUE) + palSetLineMode(gpio, PAL_MODE_ADC_PULLUP); +} + +/** + * Tell the mux to select a specific column + * + * Splits the positive integer (<=7) into its three component bits. + */ +static void mux_select_row(int row) { + assert(col >= 0 && col <= 7); + + // Not in order - need to remap them + // X0 - KSI1 + // X1 - KSI2 + // X2 - KSI0 + // X3 - KSI3 + // Only for keyboard, not for num-/grid-pad + // X4 - KSI4 + // X5 - KSI5 + // X6 - KSI6 + // X7 - KSI7 + int index = 0; + switch (row) { + case 0: + index = 2; + break; + case 1: + index = 0; + break; + case 2: + index = 1; + break; + default: + index = row; + break; + } + + int bits[] = {(index & 0x1) > 0, (index & 0x2) > 0, (index & 0x4) > 0}; + writePin(MUX_A, bits[0]); + writePin(MUX_B, bits[1]); + writePin(MUX_C, bits[2]); +} + +/** + * Based on the ADC value, update the matrix for this column + * */ +static bool interpret_adc_row(matrix_row_t cur_matrix[], adc10ksample_t voltage, int col, int row) { + bool changed = false; + + // By default the voltage is high (3.3V) + // When a key is pressed it causes the voltage to go down. + // But because every key is connected in a matrix, pressing multiple keys + // changes the voltage at every key again. So we can't check for a specific + // voltage but need to have a threshold. + bool key_state = false; + if (voltage < ADC_THRESHOLD) { + key_state = true; + } + + // Don't update matrix on Pico to avoid messing with the debug system + // Can't attach the matrix anyways + //#ifdef PICO_FL16 + //(void)key_state; + // return false; + //#endif + + matrix_row_t new_row = cur_matrix[row]; + if (key_state) { + new_row |= (1 << col); + } else { + new_row &= ~(1 << col); + } + changed = cur_matrix[row] != new_row; + if (key_state) { + uprintf("old row: %d\n", cur_matrix[row]); + uprintf("new row: %d\n", new_row); + } + cur_matrix[row] = new_row; + + return changed; +} + +/** + * Drive the GPIO for a column low or high. + */ +void drive_col(int col, bool high) { + assert(col >= 0 && col <= MATRIX_COLS); + int gpio = 0; + switch (col) { + case 0: + gpio = GP8; + break; + case 1: + gpio = GP9; + break; + case 2: + gpio = GP10; + break; + case 3: + gpio = GP11; + break; + case 4: + gpio = GP12; + break; + case 5: + gpio = GP13; + break; + case 6: + gpio = GP14; + break; + case 7: + gpio = GP15; + break; + case 8: + gpio = GP21; + break; + case 9: + gpio = GP20; + break; + case 10: + gpio = GP19; + break; + case 11: + gpio = GP18; + break; + case 12: + gpio = GP17; + break; + case 13: + gpio = GP16; + break; + case 14: + gpio = GP23; + break; + case 15: + gpio = GP22; + break; + default: + // Not supposed to happen + assert(false); + return; + } + + // Don't drive columns on pico because we're using these GPIOs for other purposes + //#ifdef PICO_FL16 + // (void)gpio; + // return; + //#endif + + if (high) { + // TODO: Could set up the pins with `setPinOutputOpenDrain` instead + writePinHigh(gpio); + } else { + writePinLow(gpio); + } +} + +/** + * Read a value from the ADC and print some debugging details + */ +static adc10ksample_t read_adc(void) { + // Can't use analogReadPin because it gets rid of the internal pullup on + // this pin, that we configure in matrix_init_custom + uint16_t val = adc_read(pinToMux(ADC_CH2_PIN)); + return to_voltage(val); +} + +/** + * Handle the host going to sleep or the keyboard being idle + * If the host is asleep the keyboard should reduce the scan rate and turn backlight off. + * + * If the host is awake but the keyboard is idle it should enter a low-power state + */ +bool handle_idle(void) { + bool asleep = !readPin(SLEEP_GPIO); + static uint8_t prev_asleep = -1; + if (prev_asleep != asleep) { + prev_asleep = asleep; + } +#ifdef RGB_MATRIX_ENABLE + if (rgb_matrix_get_suspend_state() != asleep) { + rgb_matrix_set_suspend_state(asleep); + } +#endif + return false; +} + +/** + * Overriding behavior of matrix_scan from quantum/matrix.c + */ +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + + if (handle_idle()) { + return false; + } + + // Drive all high to deselect them + for (int col = 0; col < MATRIX_COLS; col++) { + drive_col(col, true); + } + + // Go through every matrix column (KSO) and drive them low individually + // Then go through every matrix row (KSI), select it with the mux and check their ADC value + for (int col = 0; col < MATRIX_COLS; col++) { + // Drive column low so we can measure the resistors on each row in this column + drive_col(col, false); + for (int row = 0; row < MATRIX_ROWS; row++) { + // Read ADC for this row + mux_select_row(row); + + // Interpret ADC value as rows + changed |= interpret_adc_row(current_matrix, read_adc(), col, row); + } + + // Drive column high again + drive_col(col, true); + } + + return changed; +} + +/** + * Enable the ADC MUX + * + * TODO: Do we need a de-init? Probably not. + */ +static void adc_mux_init(void) { + setPinOutput(MUX_ENABLE); + writePinLow(MUX_ENABLE); + + setPinOutput(MUX_A); + setPinOutput(MUX_B); + setPinOutput(MUX_C); +} + +/** + * Overriding behavior of matrix_init from quantum/matrix.c + */ +void matrix_init_custom(void) { + adc_mux_init(); + adc_gpio_init(ADC_CH2_PIN); + + // KS0 - KSO7 for Keyboard and Numpad + setPinOutput(KSO0); + setPinOutput(KSO1); + setPinOutput(KSO2); + setPinOutput(KSO3); + setPinOutput(KSO4); + setPinOutput(KSO5); + setPinOutput(KSO6); + setPinOutput(KSO7); + // KS08 - KS015 for Keyboard only + setPinOutput(KSO8); + setPinOutput(KSO9); + setPinOutput(KSO10); + setPinOutput(KSO11); + setPinOutput(KSO12); + setPinOutput(KSO13); + setPinOutput(KSO14); + setPinOutput(KSO15); + + // Set unused pins to input to avoid interfering. They're hooked up to rows 5 and 6 + setPinInput(GP6); + setPinInput(GP7); +} diff --git a/keyboards/framework/matrix.h b/keyboards/framework/matrix.h new file mode 100644 index 00000000000..d730877dc5c --- /dev/null +++ b/keyboards/framework/matrix.h @@ -0,0 +1,6 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "quantum.h" diff --git a/keyboards/framework/mcuconf.h b/keyboards/framework/mcuconf.h new file mode 100644 index 00000000000..6370452922b --- /dev/null +++ b/keyboards/framework/mcuconf.h @@ -0,0 +1,29 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef RP_SIO_USE_UART0 +#define RP_SIO_USE_UART0 TRUE +#undef RP_SIO_USE_UART1 +#define RP_SIO_USE_UART1 FALSE + +// For RGB backlight +#undef RP_ADC_USE_ADC1 +#define RP_ADC_USE_ADC1 TRUE + +// For single-zone backlight +#undef RP_PWM_USE_PWM4 +#define RP_PWM_USE_PWM4 TRUE + +#undef RP_I2C_USE_I2C1 +#define RP_I2C_USE_I2C1 TRUE +/* + * IRQ system settings. + + * TODO: Default is 3, should it be 2? + */ +#undef RP_IRQ_ADC1_PRIORITY +#define RP_IRQ_ADC1_PRIORITY 2 diff --git a/keyboards/framework/numpad/config.h b/keyboards/framework/numpad/config.h new file mode 100644 index 00000000000..e01395b5e4c --- /dev/null +++ b/keyboards/framework/numpad/config.h @@ -0,0 +1,5 @@ +// Copyright 2022 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#define MATRIX_COLS 8 +#define MATRIX_ROWS 4 diff --git a/keyboards/framework/numpad/info.json b/keyboards/framework/numpad/info.json new file mode 100644 index 00000000000..ff26ec1c45e --- /dev/null +++ b/keyboards/framework/numpad/info.json @@ -0,0 +1,54 @@ +{ + "keyboard_name": "Laptop 16 Numpad Module", + "manufacturer": "Framework", + "maintainer": "JohnAZoidberg", + "bootloader": "rp2040", + "features": { + "bootmagic": false, + "mousekey": false, + "extrakey": true, + "console": true, + "command": false, + "nkro": true, + "audio": false + }, + "debounce": 5, + "processor": "RP2040", + "url": "https://fr.mw/FRAKDMEN", + "usb": { + "device_version": "0.2.2", + "pid": "0x0014", + "vid": "0x32AC", + "force_nkro": true + }, + "backlight": { + "pin": "GP25" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "ESC", "x": 0, "y": 0, "h": 0.75 }, + { "label": "+ -", "x": 1.25, "y": 0, "h": 0.75 }, + { "label": "=", "x": 2.5, "y": 0, "h": 0.75 }, + { "label": "<--", "x": 3.75, "y": 0, "h": 0.75 }, + { "label": "Num Lock", "x": 0, "y": 1, "h": 1.25 }, + { "label": "-", "x": 1.25, "y": 1, "h": 1.25 }, + { "label": "*", "x": 2.5, "y": 1, "h": 1.25 }, + { "label": "-", "x": 3.75, "y": 1, "h": 1.25 }, + { "label": "7", "x": 0, "y": 2.5, "h": 1.25 }, + { "label": "8", "x": 1.25, "y": 2.5, "h": 1.25 }, + { "label": "9", "x": 2.5, "y": 2.5, "h": 1.25 }, + { "label": "+", "x": 3.75, "y": 2.5, "h": 2.75 }, + { "label": "4", "x": 0, "y": 4, "h": 1.25 }, + { "label": "5", "x": 1.25, "y": 4, "h": 1.25 }, + { "label": "6", "x": 2.5, "y": 4, "h": 1.25 }, + { "label": "1", "x": 0, "y": 5.5, "h": 1.25 }, + { "label": "2", "x": 1.25, "y": 5.5, "h": 1.25 }, + { "label": "3", "x": 2.5, "y": 5.5, "h": 1.25 }, + { "label": "Enter", "x": 3.75, "y": 5.5, "h": 2.75 }, + { "label": "0", "x": 0, "y": 7, "w": 2.25, "h": 1.25 }, + { "label": ".", "x": 2.5, "y": 7, "h": 1.25 } + ] + }, + } +} diff --git a/keyboards/framework/numpad/keymaps/default/keymap.c b/keyboards/framework/numpad/keymaps/default/keymap.c new file mode 100644 index 00000000000..021b506ccf0 --- /dev/null +++ b/keyboards/framework/numpad/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +// Copyright 2022-2023 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌────┬────┬────┬────┐ + * 4 keys │Esc │Calc│ = │ <- │ + * ├────┼────┼────┼────┤ + * 4 keys │ Num│ / │ * │ - │ + * ├────┼────┼────┼────┤ + * 3 keys │ 7 │ 8 │ 9 │ │ + * ├────┼────┼────┤ │ + * 4 keys │ 4 │ 5 │ 6 │ + │ + * ├────┼────┼────┼────┤ + * 3 keys │ 1 │ 2 │ 3 │ │ + * ├────┴────┼────┤ │ + * 3 keys │ 0 │ . │Entr│ + * └─────────┴────┴────┴ + * 21 total + */ + [_NUMLOCK] = LAYOUT( + KC_ESC, KC_CALC, KC_EQL, KC_BSPC, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + /* + * Extra keys for when numlock is disabled. + * Numlock keys are passed through to the number layer, + * and automatically remapped by the OS. + * ┌────┬────┬────┬────┐ + * 4 keys │ │ │ │ │ + * ├────┼────┼────┼────┤ + * 4 keys │ │ │ │ │ + * ├────┼────┼────┼────┤ + * 3 keys │Home│ ↑ │PgUp│BL │ + * ├────┼────┼────┤Brtg│ + * 4 keys │ ← │ │ → │ | + * ├────┼────┼────┼────┤ + * 3 keys │End │ ↓ │PdDn│BL │ + * ├────┴────┼────┤Step│ + * 3 keys │ Insert │Del │ │ + * └─────────┴────┴────┴ + * 21 total + */ + [_FN] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, BL_BRTG, + _______, _______, _______, + _______, _______, BL_STEP + + ) + +}; +// clang-format on + +bool led_update_user(led_t led_state) { + // Change layer if numlock state changes, either triggered by OS or + // by numlock key on this keyboard + if (led_state.num_lock) { + layer_off(_FN); + } else { + layer_on(_FN); + } + return true; +} diff --git a/keyboards/framework/numpad/numpad.c b/keyboards/framework/numpad/numpad.c new file mode 100644 index 00000000000..2838df53915 --- /dev/null +++ b/keyboards/framework/numpad/numpad.c @@ -0,0 +1,14 @@ +// Copyright 2023 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" +#include "numpad.h" + +void keyboard_post_init_user(void) { + // Sync initial numlock state from the host + if (host_keyboard_led_state().num_lock) { + layer_on(_NUMLOCK); + } else { + layer_off(_FN); + } +} diff --git a/keyboards/framework/numpad/numpad.h b/keyboards/framework/numpad/numpad.h new file mode 100644 index 00000000000..001f5043dc8 --- /dev/null +++ b/keyboards/framework/numpad/numpad.h @@ -0,0 +1,24 @@ +// Copyright 2022-2023 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +// Same as macropad with a few keys removed +// clang-format off +#define LAYOUT( \ + H1, H2, H3, H4, \ + K90, K95, K100, K105, \ + K91, K96, K101, \ + K92, K97, K102, K106, \ + K93, K98, K103, \ + K99, K104, K108 \ +) \ +{ \ + { K90, K91, K92, K93, K95, K96, K97, K98 }, \ + { K99, K100, K101, K102, K103, K104, K105, K106 }, \ + { K108, H1, H2, KC_NO, H4, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, H3, KC_NO, KC_NO, KC_NO }, \ +} + +enum _layers { + _NUMLOCK, + _FN +}; diff --git a/keyboards/framework/numpad/rules.mk b/keyboards/framework/numpad/rules.mk new file mode 100644 index 00000000000..f31edcda205 --- /dev/null +++ b/keyboards/framework/numpad/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = pwm diff --git a/keyboards/framework/readme.md b/keyboards/framework/readme.md new file mode 100644 index 00000000000..9fc7ed292da --- /dev/null +++ b/keyboards/framework/readme.md @@ -0,0 +1,44 @@ +# Framework Laptop 16 Keyboard + +Keyboard input modules for the Framework Laptop 16. + +* Keyboard Maintainer: [Daniel Schaefer](https://github.com/JohnAZoidberg) +* Hardware Supported: Framework Laptop 16 Keyboard, Numpad and Macropad +* Hardware Availability: Soon available at https://frame.work/marketplace + +## Variants + +There are 5 different hardware variants with different number of keys and +backlight options. + +| Name | Size | Backlight | Keys | +| -------- | -------- | ---------- | ---- | +| ansi | Keyboard | RGB/White | 78 | +| iso | Keyboard | White | 79 | +| jis | Keyboard | White | 83 | +| numpad | Numpad | White | 21 | +| macropad | Numpad | RGB | 24 | + +Make example for this keyboard (after setting up your build environment): + + qmk compile -kb framework/ansi -km default + qmk compile -kb framework/iso -km default + qmk compile -kb framework/jis -km default + qmk compile -kb framework/numpad -km default + qmk compile -kb framework/macropad -km default + +Flashing example for the ANSI keyboard: + + qmk compile -kb framework/ansi -km default + +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: + +* **On Framework Laptop 16 Keyboard**: Hold down left ALT and right ALT while installing the module +* **On Framework Laptop 16 Numpad**: Hold down keys for 2 and 6 while installing the module +* **On Raspberry Pi Pico**: Hold down bootsel button when plugging in +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available \ No newline at end of file diff --git a/keyboards/framework/rules.mk b/keyboards/framework/rules.mk new file mode 100644 index 00000000000..3b8d9e87e74 --- /dev/null +++ b/keyboards/framework/rules.mk @@ -0,0 +1,21 @@ +# VIA support uses raw HID, don't need to enable it extra. +# Only when disabling VIA but still wanting to use RAW, need to enable it here. +VIA_ENABLE = yes +RAW_ENABLE = no + +# Enabled in info.json +# EXTRAKEY_ENABLE = yes # Audio control and System control + +# Enable for all. ANSI keyboard supports RGB and white, macropad only RGB, all others only white. +# No harm in enabling it for all. +# Also RP pico has the built-in LED wired to the same GPIO. Good for prototyping +BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = pwm + +# Custom matrix scanning code via ADC +CUSTOM_MATRIX = lite +SRC += matrix.c analog.c + +DEFAULT_FOLDER = framework/ansi + +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From 07c0618fe4f7fe525f8cc12a6cf85d649100bcaa Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 11:41:56 +0800 Subject: [PATCH 02/31] keyboards/framework: Clean up Signed-off-by: Daniel Schaefer --- keyboards/framework/build_all.sh | 6 - keyboards/framework/kle/README.md | 20 - keyboards/framework/kle/ansi_layout.json | 370 ----------------- keyboards/framework/kle/ansi_via.json | 359 ---------------- keyboards/framework/kle/iso_layout.json | 379 ----------------- keyboards/framework/kle/iso_via.json | 366 ----------------- keyboards/framework/kle/jis_layout.json | 411 ------------------- keyboards/framework/kle/jis_via.json | 392 ------------------ keyboards/framework/kle/macropad_layout.json | 133 ------ keyboards/framework/kle/macropad_via.json | 132 ------ keyboards/framework/kle/numpad_layout.json | 124 ------ keyboards/framework/kle/numpad_via.json | 118 ------ keyboards/framework/led.py | 281 ------------- 13 files changed, 3091 deletions(-) delete mode 100755 keyboards/framework/build_all.sh delete mode 100644 keyboards/framework/kle/README.md delete mode 100644 keyboards/framework/kle/ansi_layout.json delete mode 100644 keyboards/framework/kle/ansi_via.json delete mode 100644 keyboards/framework/kle/iso_layout.json delete mode 100644 keyboards/framework/kle/iso_via.json delete mode 100644 keyboards/framework/kle/jis_layout.json delete mode 100644 keyboards/framework/kle/jis_via.json delete mode 100644 keyboards/framework/kle/macropad_layout.json delete mode 100644 keyboards/framework/kle/macropad_via.json delete mode 100644 keyboards/framework/kle/numpad_layout.json delete mode 100644 keyboards/framework/kle/numpad_via.json delete mode 100755 keyboards/framework/led.py diff --git a/keyboards/framework/build_all.sh b/keyboards/framework/build_all.sh deleted file mode 100755 index adc5097084f..00000000000 --- a/keyboards/framework/build_all.sh +++ /dev/null @@ -1,6 +0,0 @@ -set -e -qmk compile -kb framework/ansi -km default -qmk compile -kb framework/iso -km default -qmk compile -kb framework/jis -km default -qmk compile -kb framework/numpad -km default -qmk compile -kb framework/macropad -km default diff --git a/keyboards/framework/kle/README.md b/keyboards/framework/kle/README.md deleted file mode 100644 index 9df8a071c46..00000000000 --- a/keyboards/framework/kle/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# KLE Layouts - -These files are generated by modeling our keyboard layouts in [KLE](http://www.keyboard-layout-editor.com). -That is then exported and converted to the format for `info.json`. -But to continue editing them, I kept the files here. Might be useful for the future. - -| Layout | Standard KLE Layout | VIA KLE Layout | VIA Design | -| -------- | ---------------------- | ------------------- | -------------------------- | -| ANSI | `ansi_layout.json` | `ansi_via.json` | `via_ansi_design.json` | -| ISO | `iso_layout.json` | `iso_layout.json` | `via_iso_design.json` | -| JIS | `jis_layout.json` | `jis_via.json` | `via_jis_design.json` | -| Numpad | `numpad_layout.json` | `numpad_via.json` | `via_numpad_design.json` | -| Macropad | `macropad_layout.json` | `macropad_via.json` | `via_macropad_design.json` | - -- The Standard KLE Layout is just downloaded from KLE. -- The VIA KLE Layout has matrix positions as labels instead of the actual key labels. -- VIA Design is the VIA KLE layout embedded in to a VIA compatible JSON file. - -The VIA Design file can be imported into VIA, then it will discover the -keyboard. This should be submitted to the VIA [keyboard repository](https://github.com/the-via/keyboards). diff --git a/keyboards/framework/kle/ansi_layout.json b/keyboards/framework/kle/ansi_layout.json deleted file mode 100644 index 1cbf107e2e9..00000000000 --- a/keyboards/framework/kle/ansi_layout.json +++ /dev/null @@ -1,370 +0,0 @@ -[ - [ - { - "a": 6, - "w": 1.25, - "h": 0.5 - }, - "Esc", - { - "x": 0.25, - "h": 0.5 - }, - "F1", - { - "x": 0.25, - "h": 0.5 - }, - "F2", - { - "x": 0.25, - "h": 0.5 - }, - "F3", - { - "x": 0.25, - "h": 0.5 - }, - "F4", - { - "x": 0.25, - "h": 0.5 - }, - "F5", - { - "x": 0.25, - "h": 0.5 - }, - "F6", - { - "x": 0.25, - "h": 0.5 - }, - "F7", - { - "x": 0.25, - "h": 0.5 - }, - "F8", - { - "x": 0.25, - "h": 0.5 - }, - "F9", - { - "x": 0.25, - "h": 0.5 - }, - "F10", - { - "x": 0.25, - "h": 0.5 - }, - "F11", - { - "x": 0.25, - "h": 0.5 - }, - "F12", - { - "x": 0.25, - "a": 5, - "w": 1.75, - "h": 0.5 - }, - "Delete" - ], - [ - { - "y": -0.25, - "a": 4 - }, - "~\n`", - { - "x": 0.25 - }, - "!\n1", - { - "x": 0.25 - }, - "@\n2", - { - "x": 0.25 - }, - "#\n3", - { - "x": 0.25 - }, - "$\n4", - { - "x": 0.25 - }, - "%\n5", - { - "x": 0.25 - }, - "^\n6", - { - "x": 0.25 - }, - "&\n7", - { - "x": 0.25 - }, - "*\n8", - { - "x": 0.25 - }, - "(\n9", - { - "x": 0.25 - }, - ")\n0", - { - "x": 0.25 - }, - "_\n-", - { - "x": 0.25 - }, - "+\n=", - { - "x": 0.25, - "a": 6, - "w": 2 - }, - "Backspace" - ], - [ - { - "y": 0.25, - "a": 4, - "w": 1.5 - }, - "Tab", - { - "x": 0.25 - }, - "Q", - { - "x": 0.25 - }, - "W", - { - "x": 0.25 - }, - "E", - { - "x": 0.25 - }, - "R", - { - "x": 0.25 - }, - "T", - { - "x": 0.25 - }, - "Y", - { - "x": 0.25 - }, - "U", - { - "x": 0.25 - }, - "I", - { - "x": 0.25 - }, - "O", - { - "x": 0.25 - }, - "P", - { - "x": 0.25 - }, - "{\n[", - { - "x": 0.25 - }, - "}\n]", - { - "x": 0.25, - "w": 1.5 - }, - "|\n\\" - ], - [ - { - "y": 0.25, - "w": 1.75 - }, - "Caps Lock", - { - "x": 0.25 - }, - "A", - { - "x": 0.25 - }, - "S", - { - "x": 0.25 - }, - "D", - { - "x": 0.25 - }, - "F", - { - "x": 0.25 - }, - "G", - { - "x": 0.25 - }, - "H", - { - "x": 0.25 - }, - "J", - { - "x": 0.25 - }, - "K", - { - "x": 0.25 - }, - "L", - { - "x": 0.25 - }, - ":\n;", - { - "x": 0.25 - }, - "\"\n'", - { - "x": 0.25, - "a": 6, - "w": 2.5 - }, - "Enter" - ], - [ - { - "y": 0.25, - "w": 2.5 - }, - "Shift", - { - "x": 0.25, - "a": 4 - }, - "Z", - { - "x": 0.25 - }, - "X", - { - "x": 0.25 - }, - "C", - { - "x": 0.25 - }, - "V", - { - "x": 0.25 - }, - "B", - { - "x": 0.25 - }, - "N", - { - "x": 0.25 - }, - "M", - { - "x": 0.25 - }, - "<\n,", - { - "x": 0.25 - }, - ">\n.", - { - "x": 0.25 - }, - "?\n/", - { - "x": 0.25, - "a": 6, - "w": 3 - }, - "Shift" - ], - [ - { - "y": 0.25, - "w": 1.25 - }, - "Ctrl", - { - "x": 0.25 - }, - "Fn", - { - "x": 0.25 - }, - "Win", - { - "x": 0.25 - }, - "Alt", - { - "x": 0.25, - "a": 7, - "w": 6 - }, - "", - { - "x": 0.25, - "a": 6 - }, - "Alt", - { - "x": 0.25 - }, - "Ctrl", - { - "x": 0.25, - "a": 7, - "w": 1.25 - }, - "←", - { - "x": 0.25, - "w": 1.25, - "h": 0.5 - }, - "↑", - { - "x": 0.25, - "w": 1.25 - }, - "→" - ], - [ - { - "y": -0.5, - "x": 15.5, - "w": 1.25, - "h": 0.5 - }, - "↓" - ] -] \ No newline at end of file diff --git a/keyboards/framework/kle/ansi_via.json b/keyboards/framework/kle/ansi_via.json deleted file mode 100644 index 0d33a6bf88b..00000000000 --- a/keyboards/framework/kle/ansi_via.json +++ /dev/null @@ -1,359 +0,0 @@ -[ - [ - { - "w": 1.25, - "h": 0.5 - }, - "7,5", - { - "x": 0.25, - "h": 0.5 - }, - "3,5", - { - "x": 0.25, - "h": 0.5 - }, - "2,5", - { - "x": 0.25, - "h": 0.5 - }, - "6,4", - { - "x": 0.25, - "h": 0.5 - }, - "3,4", - { - "x": 0.25, - "h": 0.5 - }, - "4,10", - { - "x": 0.25, - "h": 0.5 - }, - "3,10", - { - "x": 0.25, - "h": 0.5 - }, - "2,10", - { - "x": 0.25, - "h": 0.5 - }, - "1,15", - { - "x": 0.25, - "h": 0.5 - }, - "3,11", - { - "x": 0.25, - "h": 0.5 - }, - "4,8", - { - "x": 0.25, - "h": 0.5 - }, - "6,8", - { - "x": 0.25, - "h": 0.5 - }, - "3,15", - { - "x": 0.25, - "w": 1.75, - "h": 0.5 - }, - "0,1" - ], - [ - { - "y": -0.25 - }, - "4,2", - { - "x": 0.25 - }, - "5,2", - { - "x": 0.25 - }, - "5,5", - { - "x": 0.25 - }, - "5,4", - { - "x": 0.25 - }, - "5,6", - { - "x": 0.25 - }, - "4,6", - { - "x": 0.25 - }, - "4,7", - { - "x": 0.25 - }, - "5,7", - { - "x": 0.25 - }, - "5,10", - { - "x": 0.25 - }, - "5,8", - { - "x": 0.25 - }, - "4,13", - { - "x": 0.25 - }, - "2,13", - { - "x": 0.25 - }, - "4,14", - { - "x": 0.25, - "w": 2 - }, - "5,14" - ], - [ - { - "y": 0.25, - "w": 1.5 - }, - "3,2", - { - "x": 0.25 - }, - "0,2", - { - "x": 0.25 - }, - "6,5", - { - "x": 0.25 - }, - "2,4", - { - "x": 0.25 - }, - "6,6", - { - "x": 0.25 - }, - "3,6", - { - "x": 0.25 - }, - "3,7", - { - "x": 0.25 - }, - "6,7", - { - "x": 0.25 - }, - "6,10", - { - "x": 0.25 - }, - "3,8", - { - "x": 0.25 - }, - "5,13", - { - "x": 0.25 - }, - "6,13", - { - "x": 0.25 - }, - "6,14", - { - "x": 0.25, - "w": 1.5 - }, - "2,8" - ], - [ - { - "y": 0.25, - "w": 1.75 - }, - "4,4", - { - "x": 0.25 - }, - "7,2", - { - "x": 0.25 - }, - "4,5", - { - "x": 0.25 - }, - "7,14", - { - "x": 0.25 - }, - "7,6", - { - "x": 0.25 - }, - "2,6", - { - "x": 0.25 - }, - "2,7", - { - "x": 0.25 - }, - "7,7", - { - "x": 0.25 - }, - "7,10", - { - "x": 0.25 - }, - "7,8", - { - "x": 0.25 - }, - "7,13", - { - "x": 0.25 - }, - "0,14", - { - "x": 0.25, - "w": 2.5 - }, - "1,14" - ], - [ - { - "y": 0.25, - "w": 2.5 - }, - "1,9", - { - "x": 0.25 - }, - "1,5", - { - "x": 0.25 - }, - "0,5", - { - "x": 0.25 - }, - "0,0", - { - "x": 0.25 - }, - "0,6", - { - "x": 0.25 - }, - "1,6", - { - "x": 0.25 - }, - "1,7", - { - "x": 0.25 - }, - "0,7", - { - "x": 0.25 - }, - "0,10", - { - "x": 0.25 - }, - "0,8", - { - "x": 0.25 - }, - "0,13", - { - "x": 0.25, - "w": 3 - }, - "0,9" - ], - [ - { - "y": 0.25, - "w": 1.25 - }, - "1,12", - { - "x": 0.25 - }, - "2,2", - { - "x": 0.25 - }, - "3,1", - { - "x": 0.25 - }, - "1,3", - { - "x": 0.25, - "w": 6 - }, - "1,4", - { - "x": 0.25 - }, - "0,3", - { - "x": 0.25 - }, - "0,12", - { - "x": 0.25, - "w": 1.25 - }, - "6,11", - { - "x": 0.25, - "w": 1.25, - "h": 0.5 - }, - "1,13", - { - "x": 0.25, - "w": 1.25 - }, - "2,15" - ], - [ - { - "y": -0.5, - "x": 15.5, - "w": 1.25, - "h": 0.5 - }, - "1,8" - ] -] diff --git a/keyboards/framework/kle/iso_layout.json b/keyboards/framework/kle/iso_layout.json deleted file mode 100644 index 4e91663d365..00000000000 --- a/keyboards/framework/kle/iso_layout.json +++ /dev/null @@ -1,379 +0,0 @@ -[ - [ - { - "a": 6, - "w": 1.25, - "h": 0.5 - }, - "Esc", - { - "x": 0.25, - "h": 0.5 - }, - "F1", - { - "x": 0.25, - "h": 0.5 - }, - "F2", - { - "x": 0.25, - "h": 0.5 - }, - "F3", - { - "x": 0.25, - "h": 0.5 - }, - "F4", - { - "x": 0.25, - "h": 0.5 - }, - "F5", - { - "x": 0.25, - "h": 0.5 - }, - "F6", - { - "x": 0.25, - "h": 0.5 - }, - "F7", - { - "x": 0.25, - "h": 0.5 - }, - "F8", - { - "x": 0.25, - "h": 0.5 - }, - "F9", - { - "x": 0.25, - "h": 0.5 - }, - "F10", - { - "x": 0.25, - "h": 0.5 - }, - "F11", - { - "x": 0.25, - "h": 0.5 - }, - "F12", - { - "x": 0.25, - "a": 5, - "w": 1.75, - "h": 0.5 - }, - "Delete" - ], - [ - { - "y": -0.25, - "a": 4 - }, - "~\n`", - { - "x": 0.25 - }, - "!\n1", - { - "x": 0.25 - }, - "\"\n2", - { - "x": 0.25 - }, - "\n3", - { - "x": 0.25 - }, - "$\n4", - { - "x": 0.25 - }, - "%\n5", - { - "x": 0.25 - }, - "^\n6", - { - "x": 0.25 - }, - "&\n7", - { - "x": 0.25 - }, - "*\n8", - { - "x": 0.25 - }, - "(\n9", - { - "x": 0.25 - }, - ")\n0", - { - "x": 0.25 - }, - "_\n-", - { - "x": 0.25 - }, - "+\n=", - { - "x": 0.25, - "a": 6, - "w": 2 - }, - "Backspace" - ], - [ - { - "y": 0.25, - "a": 4, - "w": 1.5 - }, - "Tab", - { - "x": 0.25 - }, - "Q", - { - "x": 0.25 - }, - "W", - { - "x": 0.25 - }, - "E", - { - "x": 0.25 - }, - "R", - { - "x": 0.25 - }, - "T", - { - "x": 0.25 - }, - "Y", - { - "x": 0.25 - }, - "U", - { - "x": 0.25 - }, - "I", - { - "x": 0.25 - }, - "O", - { - "x": 0.25 - }, - "P", - { - "x": 0.25 - }, - "{\n[", - { - "x": 0.25 - }, - "}\n]", - { - "x": 0.5, - "a": 7, - "w": 1.25, - "h": 2.25, - "w2": 1.5, - "h2": 1.25, - "x2": -0.25 - }, - "Enter" - ], - [ - { - "y": 0.25, - "a": 4, - "w": 1.75 - }, - "Caps Lock", - { - "x": 0.25 - }, - "A", - { - "x": 0.25 - }, - "S", - { - "x": 0.25 - }, - "D", - { - "x": 0.25 - }, - "F", - { - "x": 0.25 - }, - "G", - { - "x": 0.25 - }, - "H", - { - "x": 0.25 - }, - "J", - { - "x": 0.25 - }, - "K", - { - "x": 0.25 - }, - "L", - { - "x": 0.25 - }, - ":\n;", - { - "x": 0.25 - }, - "@\n'", - { - "x": 0.25 - }, - "~\n#" - ], - [ - { - "y": 0.25, - "a": 6, - "w": 1.25 - }, - "Shift", - { - "x": 0.25, - "a": 4 - }, - "|\n\\", - { - "x": 0.25 - }, - "Z", - { - "x": 0.25 - }, - "X", - { - "x": 0.25 - }, - "C", - { - "x": 0.25 - }, - "V", - { - "x": 0.25 - }, - "B", - { - "x": 0.25 - }, - "N", - { - "x": 0.25 - }, - "M", - { - "x": 0.25 - }, - "<\n,", - { - "x": 0.25 - }, - ">\n.", - { - "x": 0.25 - }, - "?\n/", - { - "x": 0.25, - "a": 6, - "w": 3 - }, - "Shift" - ], - [ - { - "y": 0.25, - "w": 1.25 - }, - "Ctrl", - { - "x": 0.25 - }, - "Fn", - { - "x": 0.25 - }, - "Win", - { - "x": 0.25 - }, - "Alt", - { - "x": 0.25, - "a": 7, - "w": 6 - }, - "", - { - "x": 0.25, - "a": 6 - }, - "Alt", - { - "x": 0.25 - }, - "Ctrl", - { - "x": 0.25, - "a": 7, - "w": 1.25 - }, - "←", - { - "x": 0.25, - "w": 1.25, - "h": 0.5 - }, - "↑", - { - "x": 0.25, - "w": 1.25 - }, - "→" - ], - [ - { - "y": -0.5, - "x": 15.5, - "w": 1.25, - "h": 0.5 - }, - "↓" - ] -] \ No newline at end of file diff --git a/keyboards/framework/kle/iso_via.json b/keyboards/framework/kle/iso_via.json deleted file mode 100644 index 755ea3e7c4b..00000000000 --- a/keyboards/framework/kle/iso_via.json +++ /dev/null @@ -1,366 +0,0 @@ -[ - [ - { - "w": 1.25, - "h": 0.5 - }, - "7,5", - { - "x": 0.25, - "h": 0.5 - }, - "3,5", - { - "x": 0.25, - "h": 0.5 - }, - "2,5", - { - "x": 0.25, - "h": 0.5 - }, - "6,4", - { - "x": 0.25, - "h": 0.5 - }, - "3,4", - { - "x": 0.25, - "h": 0.5 - }, - "4,10", - { - "x": 0.25, - "h": 0.5 - }, - "3,10", - { - "x": 0.25, - "h": 0.5 - }, - "2,10", - { - "x": 0.25, - "h": 0.5 - }, - "1,15", - { - "x": 0.25, - "h": 0.5 - }, - "3,11", - { - "x": 0.25, - "h": 0.5 - }, - "4,8", - { - "x": 0.25, - "h": 0.5 - }, - "6,8", - { - "x": 0.25, - "h": 0.5 - }, - "3,15", - { - "x": 0.25, - "w": 1.75, - "h": 0.5 - }, - "0,1" - ], - [ - { - "y": -0.25 - }, - "4,2", - { - "x": 0.25 - }, - "5,2", - { - "x": 0.25 - }, - "5,5", - { - "x": 0.25 - }, - "5,4", - { - "x": 0.25 - }, - "5,6", - { - "x": 0.25 - }, - "4,6", - { - "x": 0.25 - }, - "4,7", - { - "x": 0.25 - }, - "5,7", - { - "x": 0.25 - }, - "5,10", - { - "x": 0.25 - }, - "5,8", - { - "x": 0.25 - }, - "4,13", - { - "x": 0.25 - }, - "2,13", - { - "x": 0.25 - }, - "4,14", - { - "x": 0.25, - "w": 2 - }, - "5,14" - ], - [ - { - "y": 0.25, - "w": 1.5 - }, - "3,2", - { - "x": 0.25 - }, - "0,2", - { - "x": 0.25 - }, - "6,5", - { - "x": 0.25 - }, - "2,4", - { - "x": 0.25 - }, - "6,6", - { - "x": 0.25 - }, - "3,6", - { - "x": 0.25 - }, - "3,7", - { - "x": 0.25 - }, - "6,7", - { - "x": 0.25 - }, - "6,10", - { - "x": 0.25 - }, - "3,8", - { - "x": 0.25 - }, - "5,13", - { - "x": 0.25 - }, - "6,13", - { - "x": 0.25 - }, - "6,14", - { - "x": 0.5, - "w": 1.25, - "h": 2.25, - "w2": 1.5, - "h2": 1.25, - "x2": -0.25 - }, - "1,14" - ], - [ - { - "y": 0.25, - "w": 1.75 - }, - "4,4", - { - "x": 0.25 - }, - "7,2", - { - "x": 0.25 - }, - "4,5", - { - "x": 0.25 - }, - "7,14", - { - "x": 0.25 - }, - "7,6", - { - "x": 0.25 - }, - "2,6", - { - "x": 0.25 - }, - "2,7", - { - "x": 0.25 - }, - "7,7", - { - "x": 0.25 - }, - "7,10", - { - "x": 0.25 - }, - "7,8", - { - "x": 0.25 - }, - "7,13", - { - "x": 0.25 - }, - "0,14", - { - "x": 0.25 - }, - "2,8" - ], - [ - { - "y": 0.25, - "w": 1.25 - }, - "1,9", - { - "x": 0.25 - }, - "5,11", - { - "x": 0.25 - }, - "1,5", - { - "x": 0.25 - }, - "0,5", - { - "x": 0.25 - }, - "0,0", - { - "x": 0.25 - }, - "0,6", - { - "x": 0.25 - }, - "1,6", - { - "x": 0.25 - }, - "1,7", - { - "x": 0.25 - }, - "0,7", - { - "x": 0.25 - }, - "0,10", - { - "x": 0.25 - }, - "0,8", - { - "x": 0.25 - }, - "0,13", - { - "x": 0.25, - "w": 3 - }, - "0,9" - ], - [ - { - "y": 0.25, - "w": 1.25 - }, - "1,12", - { - "x": 0.25 - }, - "2,2", - { - "x": 0.25 - }, - "3,1", - { - "x": 0.25 - }, - "1,3", - { - "x": 0.25, - "w": 6 - }, - "1,4", - { - "x": 0.25 - }, - "0,3", - { - "x": 0.25 - }, - "0,12", - { - "x": 0.25, - "w": 1.25 - }, - "6,11", - { - "x": 0.25, - "w": 1.25, - "h": 0.5 - }, - "1,13", - { - "x": 0.25, - "w": 1.25 - }, - "2,15" - ], - [ - { - "y": -0.5, - "x": 15.5, - "w": 1.25, - "h": 0.5 - }, - "1,8" - ] -] diff --git a/keyboards/framework/kle/jis_layout.json b/keyboards/framework/kle/jis_layout.json deleted file mode 100644 index c28ceac6b47..00000000000 --- a/keyboards/framework/kle/jis_layout.json +++ /dev/null @@ -1,411 +0,0 @@ -[ - { - "pcb": false, - "plate": false - }, - [ - { - "a": 6, - "w": 1.25, - "h": 0.5 - }, - "Esc", - { - "x": 0.25, - "h": 0.5 - }, - "F1", - { - "x": 0.25, - "h": 0.5 - }, - "F2", - { - "x": 0.25, - "h": 0.5 - }, - "F3", - { - "x": 0.25, - "h": 0.5 - }, - "F4", - { - "x": 0.25, - "h": 0.5 - }, - "F5", - { - "x": 0.25, - "h": 0.5 - }, - "F6", - { - "x": 0.25, - "h": 0.5 - }, - "F7", - { - "x": 0.25, - "h": 0.5 - }, - "F8", - { - "x": 0.25, - "h": 0.5 - }, - "F9", - { - "x": 0.25, - "h": 0.5 - }, - "F10", - { - "x": 0.25, - "h": 0.5 - }, - "F11", - { - "x": 0.25, - "h": 0.5 - }, - "F12", - { - "x": 0.25, - "a": 5, - "w": 1.75, - "h": 0.5 - }, - "Delete" - ], - [ - { - "y": -0.25, - "a": 4 - }, - "~\n`", - { - "x": 0.25 - }, - "!\n1", - { - "x": 0.25 - }, - "\"\n2", - { - "x": 0.25 - }, - "\n3", - { - "x": 0.25 - }, - "$\n4", - { - "x": 0.25 - }, - "%\n5", - { - "x": 0.25 - }, - "^\n6", - { - "x": 0.25 - }, - "&\n7", - { - "x": 0.25 - }, - "*\n8", - { - "x": 0.25 - }, - "(\n9", - { - "x": 0.25 - }, - ")\n0", - { - "x": 0.25 - }, - "_\n-", - { - "x": 0.25 - }, - "+\n=", - { - "x": 0.25, - "a": 7, - "w": 0.5, - "w2": 0.75 - }, - "", - { - "x": 0.25, - "a": 6, - "w": 1.25 - }, - "Backsp" - ], - [ - { - "y": 0.25, - "a": 4, - "w": 1.5 - }, - "Tab", - { - "x": 0.25 - }, - "Q", - { - "x": 0.25 - }, - "W", - { - "x": 0.25 - }, - "E", - { - "x": 0.25 - }, - "R", - { - "x": 0.25 - }, - "T", - { - "x": 0.25 - }, - "Y", - { - "x": 0.25 - }, - "U", - { - "x": 0.25 - }, - "I", - { - "x": 0.25 - }, - "O", - { - "x": 0.25 - }, - "P", - { - "x": 0.25 - }, - "{\n[", - { - "x": 0.25 - }, - "}\n]", - { - "x": 0.5, - "a": 7, - "w": 1.25, - "h": 2.25, - "w2": 1.5, - "h2": 1.25, - "x2": -0.25 - }, - "Enter" - ], - [ - { - "y": 0.25, - "a": 4, - "w": 1.75 - }, - "Caps Lock", - { - "x": 0.25 - }, - "A", - { - "x": 0.25 - }, - "S", - { - "x": 0.25 - }, - "D", - { - "x": 0.25 - }, - "F", - { - "x": 0.25 - }, - "G", - { - "x": 0.25 - }, - "H", - { - "x": 0.25 - }, - "J", - { - "x": 0.25 - }, - "K", - { - "x": 0.25 - }, - "L", - { - "x": 0.25 - }, - ":\n;", - { - "x": 0.25 - }, - "@\n'", - { - "x": 0.25 - }, - "~\n#" - ], - [ - { - "y": 0.25, - "a": 6, - "w": 2.5 - }, - "Shift", - { - "x": 0.25, - "a": 4 - }, - "Z", - { - "x": 0.25 - }, - "X", - { - "x": 0.25 - }, - "C", - { - "x": 0.25 - }, - "V", - { - "x": 0.25 - }, - "B", - { - "x": 0.25 - }, - "N", - { - "x": 0.25 - }, - "M", - { - "x": 0.25 - }, - "<\n,", - { - "x": 0.25 - }, - ">\n.", - { - "x": 0.25 - }, - "?\n/", - { - "x": 0.25, - "a": 7 - }, - "", - { - "x": 0.25, - "a": 6, - "w": 1.75 - }, - "Shift" - ], - [ - { - "y": 0.25, - "w": 1.25 - }, - "Ctrl", - { - "x": 0.25 - }, - "Fn", - { - "x": 0.25 - }, - "Win", - { - "x": 0.25 - }, - "Alt", - { - "x": 0.25, - "a": 7, - "w": 0.5, - "w2": 0.75 - }, - "", - { - "x": 0.25, - "w": 3.75 - }, - "", - { - "x": 0.25, - "w": 0.5, - "w2": 0.75, - "x2": -0.25 - }, - "", - { - "x": 0.25, - "w": 0.5, - "w2": 0.75, - "x2": -0.25 - }, - "", - { - "x": 0.25, - "a": 6 - }, - "Alt", - { - "x": 0.25 - }, - "Ctrl", - { - "x": 0.25, - "a": 7, - "w": 1.25 - }, - "←", - { - "x": 0.25, - "w": 1.25, - "h": 0.5 - }, - "↑", - { - "x": 0.25, - "w": 1.25 - }, - "→" - ], - [ - { - "y": -0.5, - "x": 15.5, - "w": 1.25, - "h": 0.5 - }, - "↓" - ] -] \ No newline at end of file diff --git a/keyboards/framework/kle/jis_via.json b/keyboards/framework/kle/jis_via.json deleted file mode 100644 index c5fa1390838..00000000000 --- a/keyboards/framework/kle/jis_via.json +++ /dev/null @@ -1,392 +0,0 @@ -[ - [ - { - "w": 1.25, - "h": 0.5 - }, - "7,5", - { - "x": 0.25, - "h": 0.5 - }, - "3,5", - { - "x": 0.25, - "h": 0.5 - }, - "2,5", - { - "x": 0.25, - "h": 0.5 - }, - "6,4", - { - "x": 0.25, - "h": 0.5 - }, - "3,4", - { - "x": 0.25, - "h": 0.5 - }, - "4,10", - { - "x": 0.25, - "h": 0.5 - }, - "3,10", - { - "x": 0.25, - "h": 0.5 - }, - "2,10", - { - "x": 0.25, - "h": 0.5 - }, - "1,15", - { - "x": 0.25, - "h": 0.5 - }, - "3,11", - { - "x": 0.25, - "h": 0.5 - }, - "4,8", - { - "x": 0.25, - "h": 0.5 - }, - "6,8", - { - "x": 0.25, - "h": 0.5 - }, - "3,15", - { - "x": 0.25, - "w": 1.75, - "h": 0.5 - }, - "0,1" - ], - [ - { - "y": -0.25 - }, - "4,2", - { - "x": 0.25 - }, - "5,2", - { - "x": 0.25 - }, - "5,5", - { - "x": 0.25 - }, - "5,4", - { - "x": 0.25 - }, - "5,6", - { - "x": 0.25 - }, - "4,6", - { - "x": 0.25 - }, - "4,7", - { - "x": 0.25 - }, - "5,7", - { - "x": 0.25 - }, - "5,10", - { - "x": 0.25 - }, - "5,8", - { - "x": 0.25 - }, - "4,13", - { - "x": 0.25 - }, - "2,13", - { - "x": 0.25 - }, - "4,14", - { - "x": 0.25, - "w": 0.5, - "w2": 0.75 - }, - "0,15", - { - "x": 0.25, - "w": 1.25 - }, - "5,14" - ], - [ - { - "y": 0.25, - "w": 1.5 - }, - "3,2", - { - "x": 0.25 - }, - "0,2", - { - "x": 0.25 - }, - "6,5", - { - "x": 0.25 - }, - "2,4", - { - "x": 0.25 - }, - "6,6", - { - "x": 0.25 - }, - "3,6", - { - "x": 0.25 - }, - "3,7", - { - "x": 0.25 - }, - "6,7", - { - "x": 0.25 - }, - "6,10", - { - "x": 0.25 - }, - "3,8", - { - "x": 0.25 - }, - "5,13", - { - "x": 0.25 - }, - "6,13", - { - "x": 0.25 - }, - "6,14", - { - "x": 0.5, - "w": 1.25, - "h": 2.25, - "w2": 1.5, - "h2": 1.25, - "x2": -0.25 - }, - "1,14" - ], - [ - { - "y": 0.25, - "w": 1.75 - }, - "4,4", - { - "x": 0.25 - }, - "7,2", - { - "x": 0.25 - }, - "4,5", - { - "x": 0.25 - }, - "7,14", - { - "x": 0.25 - }, - "7,6", - { - "x": 0.25 - }, - "2,6", - { - "x": 0.25 - }, - "2,7", - { - "x": 0.25 - }, - "7,7", - { - "x": 0.25 - }, - "7,10", - { - "x": 0.25 - }, - "7,8", - { - "x": 0.25 - }, - "7,13", - { - "x": 0.25 - }, - "0,14", - { - "x": 0.25 - }, - "2,8" - ], - [ - { - "y": 0.25, - "w": 2.5 - }, - "1,9", - { - "x": 0.25 - }, - "1,5", - { - "x": 0.25 - }, - "0,5", - { - "x": 0.25 - }, - "0,0", - { - "x": 0.25 - }, - "0,6", - { - "x": 0.25 - }, - "1,6", - { - "x": 0.25 - }, - "1,7", - { - "x": 0.25 - }, - "0,7", - { - "x": 0.25 - }, - "0,10", - { - "x": 0.25 - }, - "0,8", - { - "x": 0.25 - }, - "0,13", - { - "x": 0.25 - }, - "4,11", - { - "x": 0.25, - "w": 1.75 - }, - "0,9" - ], - [ - { - "y": 0.25, - "w": 1.25 - }, - "1,12", - { - "x": 0.25 - }, - "2,2", - { - "x": 0.25 - }, - "3,1", - { - "x": 0.25 - }, - "1,3", - { - "x": 0.25, - "w": 0.5, - "w2": 0.75 - }, - "6,2", - { - "x": 0.25, - "w": 3.75 - }, - "1,4", - { - "x": 0.25, - "w": 0.5, - "w2": 0.75, - "x2": -0.25 - }, - "1,11", - { - "x": 0.25, - "w": 0.5, - "w2": 0.75, - "x2": -0.25 - }, - "0,11", - { - "x": 0.25 - }, - "0,3", - { - "x": 0.25 - }, - "0,12", - { - "x": 0.25, - "w": 1.25 - }, - "6,11", - { - "x": 0.25, - "w": 1.25, - "h": 0.5 - }, - "1,13", - { - "x": 0.25, - "w": 1.25 - }, - "2,15" - ], - [ - { - "y": -0.5, - "x": 15.5, - "w": 1.25, - "h": 0.5 - }, - "1,8" - ] -] diff --git a/keyboards/framework/kle/macropad_layout.json b/keyboards/framework/kle/macropad_layout.json deleted file mode 100644 index 512c79293fe..00000000000 --- a/keyboards/framework/kle/macropad_layout.json +++ /dev/null @@ -1,133 +0,0 @@ -[ - [ - { - "a": 7, - "h": 0.75 - }, - "", - { - "x": 0.25, - "h": 0.75 - }, - "", - { - "x": 0.25, - "h": 0.75 - }, - "", - { - "x": 0.25, - "h": 0.75 - }, - "" - ], - [ - { - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "" - ], - [ - { - "y": 0.5, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "" - ], - [ - { - "y": 0.5, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "" - ], - [ - { - "y": 0.5, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "" - ], - [ - { - "y": 0.5, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "", - { - "x": 0.25, - "h": 1.25 - }, - "" - ] -] \ No newline at end of file diff --git a/keyboards/framework/kle/macropad_via.json b/keyboards/framework/kle/macropad_via.json deleted file mode 100644 index b9f050b5fed..00000000000 --- a/keyboards/framework/kle/macropad_via.json +++ /dev/null @@ -1,132 +0,0 @@ -[ - [ - { - "h": 0.75 - }, - "2,1", - { - "x": 0.25, - "h": 0.75 - }, - "2,2", - { - "x": 0.25, - "h": 0.75 - }, - "3,4", - { - "x": 0.25, - "h": 0.75 - }, - "2,4" - ], - [ - { - "h": 1.25 - }, - "0,0", - { - "x": 0.25, - "h": 1.25 - }, - "0,4", - { - "x": 0.25, - "h": 1.25 - }, - "1,1", - { - "x": 0.25, - "h": 1.25 - }, - "1,6" - ], - [ - { - "y": 0.5, - "h": 1.25 - }, - "0,1", - { - "x": 0.25, - "h": 1.25 - }, - "0,5", - { - "x": 0.25, - "h": 1.25 - }, - "1,2", - { - "x": 0.25, - "h": 1.25 - }, - "2,5" - ], - [ - { - "y": 0.5, - "h": 1.25 - }, - "0,2", - { - "x": 0.25, - "h": 1.25 - }, - "0,6", - { - "x": 0.25, - "h": 1.25 - }, - "1,3", - { - "x": 0.25, - "h": 1.25 - }, - "1,7" - ], - [ - { - "y": 0.5, - "h": 1.25 - }, - "0,3", - { - "x": 0.25, - "h": 1.25 - }, - "0,7", - { - "x": 0.25, - "h": 1.25 - }, - "1,4", - { - "x": 0.25, - "h": 1.25 - }, - "2,6" - ], - [ - { - "y": 0.5, - "h": 1.25 - }, - "1,0", - { - "x": 0.25, - "h": 1.25 - }, - "2,7", - { - "x": 0.25, - "h": 1.25 - }, - "1,5", - { - "x": 0.25, - "h": 1.25 - }, - "2,0" - ] -] diff --git a/keyboards/framework/kle/numpad_layout.json b/keyboards/framework/kle/numpad_layout.json deleted file mode 100644 index 7e51408cfe1..00000000000 --- a/keyboards/framework/kle/numpad_layout.json +++ /dev/null @@ -1,124 +0,0 @@ -[ - [ - { - "a": 6, - "h": 0.75 - }, - "ESC", - { - "x": 0.25, - "a": 4, - "h": 0.75 - }, - "+ -\nx /", - { - "x": 0.25, - "a": 7, - "h": 0.75 - }, - "=", - { - "x": 0.25, - "h": 0.75 - }, - "<--" - ], - [ - { - "a": 4, - "h": 1.25 - }, - "Num Lock", - { - "x": 0.25, - "a": 7, - "h": 1.25 - }, - "-", - { - "x": 0.25, - "h": 1.25 - }, - "*", - { - "x": 0.25, - "h": 1.25 - }, - "-" - ], - [ - { - "y": 0.5, - "a": 4, - "h": 1.25 - }, - "7\nHome", - { - "x": 0.25, - "h": 1.25 - }, - "8\n↑", - { - "x": 0.25, - "h": 1.25 - }, - "9\nPgUp", - { - "x": 0.25, - "h": 2.75 - }, - "+" - ], - [ - { - "y": 0.5, - "h": 1.25 - }, - "4\n←", - { - "x": 0.25, - "h": 1.25 - }, - "5", - { - "x": 0.25, - "h": 1.25 - }, - "6\n→" - ], - [ - { - "y": 0.5, - "h": 1.25 - }, - "1\nEnd", - { - "x": 0.25, - "h": 1.25 - }, - "2\n↓", - { - "x": 0.25, - "h": 1.25 - }, - "3\nPgDn", - { - "x": 0.25, - "h": 2.75 - }, - "Enter" - ], - [ - { - "y": 0.5, - "w": 2.25, - "h": 1.25 - }, - "0\nIns", - { - "x": 0.25, - "h": 1.25 - }, - ".\nDel" - ] -] \ No newline at end of file diff --git a/keyboards/framework/kle/numpad_via.json b/keyboards/framework/kle/numpad_via.json deleted file mode 100644 index 999eb7de01f..00000000000 --- a/keyboards/framework/kle/numpad_via.json +++ /dev/null @@ -1,118 +0,0 @@ -[ - [ - { - "h": 0.75 - }, - "2,1", - { - "x": 0.25, - "h": 0.75 - }, - "2,2", - { - "x": 0.25, - "h": 0.75 - }, - "3,4", - { - "x": 0.25, - "h": 0.75 - }, - "2,4" - ], - [ - { - "h": 1.25 - }, - "0,0", - { - "x": 0.25, - "h": 1.25 - }, - "0,4", - { - "x": 0.25, - "h": 1.25 - }, - "1,1", - { - "x": 0.25, - "h": 1.25 - }, - "1,6" - ], - [ - { - "y": 0.5, - "h": 1.25 - }, - "0,1", - { - "x": 0.25, - "h": 1.25 - }, - "0,5", - { - "x": 0.25, - "h": 1.25 - }, - "1,2", - { - "x": 0.25, - "h": 2.75 - }, - "1,7" - ], - [ - { - "y": 0.5, - "h": 1.25 - }, - "0,2", - { - "x": 0.25, - "h": 1.25 - }, - "0,6", - { - "x": 0.25, - "h": 1.25 - }, - "1,3" - ], - [ - { - "y": 0.5, - "h": 1.25 - }, - "0,3", - { - "x": 0.25, - "h": 1.25 - }, - "0,7", - { - "x": 0.25, - "h": 1.25 - }, - "1,4", - { - "x": 0.25, - "h": 2.75 - }, - "2,0" - ], - [ - { - "y": 0.5, - "w": 2.25, - "h": 1.25 - }, - "1,0", - { - "x": 0.25, - "h": 1.25 - }, - "1,5" - ] -] \ No newline at end of file diff --git a/keyboards/framework/led.py b/keyboards/framework/led.py deleted file mode 100755 index f1fcc628c73..00000000000 --- a/keyboards/framework/led.py +++ /dev/null @@ -1,281 +0,0 @@ -#!/usr/bin/env python3 -""" -Generate C code for the common configuration of the RBG matrix feature of QMK - -Reference: https://docs.qmk.fm/#/feature_rgb_matrix?id=common-configuration - -To use adjust `ansi` variable, run it and use the printed output. - -All LEDs are set as type LED_FLAG_KEYLIGHT. That's good enough for us. -All our LEDs are behind keys. However, LED_FLAG_MODIFIER might be useful for -some keys. Not sure what that means, though. -""" - -from collections import OrderedDict - -# Rows and columns in the electrical keyboard matrix. -# Equivalent to QMK's macros: MATRIX_ROWS and MATRIX_COLS -# Keyboard -MATRIX_ROWS = 8 -MATRIX_COLS = 16 -# Macropad -#MATRIX_ROWS = 4 -#MATRIX_COLS = 8 - -LED_FLAG_NONE = 0x00 -LED_FLAG_MODIFIER = 0x01 -LED_FLAG_UNDERGLOW = 0x02 -LED_FLAG_KEYLIGHT = 0x04 -LED_FLAG_INDICATOR = 0x08 - -# This structure is (manually) taken from a picture of the LED positions. -# The coordinates don't need to be translated or scaled. This script takes care of that. -# I loaded the PDF into GIMP and just took the coordinates. -# id: LED id, of where it's connected to the LED controller -# x: x coordinate of the LED -# y: y coordinate of the LED -# matrix: The keyboard matrix coordinate of the key this LED belongs to. -# Only one LED per key needs this. Other's can keep it unset. -ansi = [ - { "id": "26", "x":86, "y": 160, "matrix": (5,7) }, # ESC - { "id": "24", "x":134, "y": 160 }, # ESC - { "id": "22", "x":200, "y": 154, "matrix": (5,3) }, - - { "id": "20", "x":275, "y": 154, "matrix": (5,2) }, # Each 75 apart in x - { "id": "19", "x":350, "y": 154, "matrix": (4,6) }, - { "id": "21", "x":425, "y": 154, "matrix": (4,3) }, - { "id": "23", "x":500, "y": 154, "matrix": (10,4) }, - { "id": "25", "x":575, "y": 154, "matrix": (10,3) }, - { "id": "27", "x":650, "y": 154, "matrix": (10,2) }, - { "id": "68", "x":725, "y": 154, "matrix": (15,1) }, - { "id": "75", "x":800, "y": 154, "matrix": (11,3) }, - { "id": "69", "x":875, "y": 154, "matrix": (8,4) }, - - { "id": "67", "x":935, "y": 158, "matrix": (8,6) }, # PrtScr - { "id": "72", "x":960, "y": 158 }, # PrtScr - { "id": "71", "x":1022, "y": 154, "matrix": (13,3) },# F12 - { "id": "73", "x":1088, "y": 160, "matrix": (1,0) }, # Del - { "id": "74", "x":1135, "y": 160 }, # Del - - # Second row - { "id": "17", "x":97, "y": 216, "matrix": (2,4) }, # Each 75 apart in x - { "id": "16", "x":172, "y": 216, "matrix": (2,5) }, - { "id": "14", "x":247, "y": 216, "matrix": (5,5) }, - { "id": "13", "x":322, "y": 216, "matrix": (4,5) }, - { "id": "12", "x":397, "y": 216, "matrix": (6,5) }, - { "id": "10", "x":472, "y": 216, "matrix": (6,4) }, - { "id": "15", "x":547, "y": 216, "matrix": (7,4) }, - { "id": "11", "x":622, "y": 216, "matrix": (7,5) }, - { "id": "18", "x":697, "y": 216, "matrix": (10,5) }, - { "id": "70", "x":772, "y": 216, "matrix": (8,5) }, - { "id": "62", "x":847, "y": 216, "matrix": (13,4) }, - { "id": "64", "x":922, "y": 216, "matrix": (13,2) }, - { "id": "63", "x":997, "y": 216, "matrix": (14,4) }, - - { "id": "65", "x":1067, "y": 224, "matrix": (14,5) }, # Backspace - { "id": "66", "x":1128, "y": 224 }, # Backspace - - # Third row - { "id": "2", "x":90, "y": 298, "matrix": (2,3) }, # Tab - { "id": "1", "x":140, "y": 298 }, # Tab - - { "id": "6", "x":207, "y": 290, "matrix": (2,0) }, # Each 75 apart in x - { "id": "4", "x":282, "y": 290, "matrix": (5,6) }, - { "id": "3", "x":357, "y": 290, "matrix": (4,2) }, - { "id": "5", "x":432, "y": 290, "matrix": (6,6) }, - { "id": "8", "x":507, "y": 290, "matrix": (6,3) }, - { "id": "9", "x":582, "y": 290, "matrix": (7,3) }, - { "id": "7", "x":657, "y": 290, "matrix": (7,6) }, - { "id": "59", "x":732, "y": 290, "matrix": (10,6) }, - { "id": "60", "x":807, "y": 290, "matrix": (8,3) }, - { "id": "61", "x":882, "y": 290, "matrix": (13,5) }, - { "id": "58", "x":957, "y": 290, "matrix": (13,6) }, - { "id": "55", "x":1032, "y": 290, "matrix": (14,6) }, - - { "id": "56", "x":1115, "y": 292, "matrix": (8,2) }, - - # Forth row - { "id": "45", "x":94, "y": 374 }, # Caps - { "id": "39", "x":123, "y": 367, "matrix": (4,4) }, # Caps - { "id": "43", "x":150, "y": 374 }, # Caps - - { "id": "37", "x":227, "y": 365, "matrix": (2,7) }, # Each 75 apart in x - { "id": "42", "x":302, "y": 365, "matrix": (5,4) }, - { "id": "38", "x":377, "y": 365, "matrix": (14,7) }, - { "id": "44", "x":452, "y": 365, "matrix": (6,7) }, - { "id": "40", "x":527, "y": 365, "matrix": (6,2) }, - { "id": "41", "x":602, "y": 365, "matrix": (7,2) }, - { "id": "50", "x":677, "y": 365, "matrix": (7,7) }, - { "id": "51", "x":752, "y": 365, "matrix": (10,7) }, - { "id": "52", "x":827, "y": 365, "matrix": (8,7) }, - { "id": "49", "x":902, "y": 365, "matrix": (13,7) }, - { "id": "53", "x":977, "y": 365, "matrix": (14,0) }, - - { "id": "54", "x":1050, "y": 365, "matrix": (14,1) }, # Enter - { "id": "57", "x":1131, "y": 373 }, # Enter - - # Fifth row - { "id": "33", "x":91, "y": 448 }, # Shift - { "id": "31", "x":113, "y": 448, "matrix": (9,1) }, # Shift - { "id": "29", "x":191, "y": 440 }, # Shift - - { "id": "28", "x":266, "y": 440, "matrix": (5,1) }, # Each 75 apart in x - { "id": "30", "x":341, "y": 440, "matrix": (5,0) }, - { "id": "32", "x":416, "y": 440, "matrix": (0,0) }, - { "id": "34", "x":491, "y": 440, "matrix": (6,0) }, - { "id": "36", "x":566, "y": 440, "matrix": (6,1) }, - { "id": "77", "x":641, "y": 440, "matrix": (7,1) }, - { "id": "78", "x":716, "y": 440, "matrix": (7,0) }, - { "id": "79", "x":791, "y": 440, "matrix": (10,0) }, - { "id": "76", "x":866, "y": 440, "matrix": (8,0) }, - { "id": "80", "x":941, "y": 440, "matrix": (13,0) }, - - { "id": "81", "x":1013, "y": 445 }, # Shift - { "id": "83", "x":1041, "y": 445, "matrix": (9,0) }, # Shift - { "id": "84", "x":1106, "y": 445 }, # Shift - { "id": "93", "x":1127, "y": 445 }, # Shift - - # Sixth row - { "id": "35", "x":89, "y": 522, "matrix": (12,1) }, # CTRL - { "id": "46", "x":124, "y": 522 }, # CTRL - { "id": "94", "x":191, "y": 515, "matrix": (2,2) }, - { "id": "47", "x":266, "y": 515, "matrix": (1,3) }, - { "id": "48", "x":341, "y": 515, "matrix": (3,1) }, - { "id": "95", "x":415, "y": 522 }, # Space - { "id": "96", "x":475, "y": 522 }, # Space - { "id": "97", "x":535, "y": 522, "matrix": (4,1) }, # Space - { "id": "86", "x":595, "y": 522 }, # Space - { "id": "87", "x":655, "y": 522 }, # Space - { "id": "88", "x":715, "y": 522 }, # Space - { "id": "85", "x":791, "y": 515, "matrix": (3,0) }, - { "id": "89", "x":865, "y": 515, "matrix": (12,0) }, - { "id": "90", "x":945, "y": 542, "matrix": (11,6) }, - { "id": "91", "x":1033, "y": 534, "matrix": (8,1) }, # Down - { "id": "82", "x":1033, "y": 510, "matrix": (13,1) }, # Up - { "id": "92", "x":1120, "y": 542, "matrix": (15,2) }, -] - -macropad = [ - { "id": "6", "x":1332, "y": 158, "matrix": (1,2) }, - { "id": "3", "x":1395, "y": 158, "matrix": (2,2) }, - { "id": "23", "x":1460, "y": 158, "matrix": (4,3) }, - { "id": "18", "x":1523, "y": 158, "matrix": (4,2) }, - - { "id": "5", "x":1332, "y": 219, "matrix": (0,0) }, - { "id": "1", "x":1395, "y": 219, "matrix": (4,0) }, - { "id": "21", "x":1460, "y": 219, "matrix": (1,1) }, - { "id": "19", "x":1523, "y": 219, "matrix": (6,1) }, - - { "id": "8", "x":1332, "y": 294, "matrix": (1,0) }, - { "id": "2", "x":1395, "y": 294, "matrix": (5,0) }, - { "id": "22", "x":1460, "y": 294, "matrix": (2,1) }, - { "id": "17", "x":1523, "y": 294, "matrix": (5,2) }, - - { "id": "7", "x":1332, "y": 368, "matrix": (2,0) }, - { "id": "4", "x":1395, "y": 368, "matrix": (6,0) }, - { "id": "24", "x":1460, "y": 368, "matrix": (3,1) }, - { "id": "20", "x":1523, "y": 368, "matrix": (7,1) }, - - { "id": "10", "x":1332, "y": 443, "matrix": (3,0) }, - { "id": "12", "x":1395, "y": 443, "matrix": (7,0) }, - { "id": "16", "x":1460, "y": 443, "matrix": (4,1) }, - { "id": "14", "x":1523, "y": 443, "matrix": (6,2) }, - - { "id": "9", "x":1332, "y": 519, "matrix": (0,1) }, - { "id": "11", "x":1395, "y": 519, "matrix": (7,2) }, - { "id": "15", "x":1460, "y": 519, "matrix": (5,1) }, - { "id": "13", "x":1523, "y": 519, "matrix": (0,2) }, -] - -# Recommended by QMK to be the (x,y) range of position values -LED_MAX = (224.0, 64.0) - -NO_LED = 255 - -# Map LEDs to keyboard matrix and normalize LED coordinates -def normalize(layout): - led_to_el = [[NO_LED for _ in range(MATRIX_COLS)] for _ in range(MATRIX_ROWS)] - # Find smallest (offset) and largest (max) values - offset_x = layout[0]['x'] - offset_y = layout[0]['y'] - max_x = layout[-1]['x'] - max_y = layout[-1]['y'] - for v in layout: - if v['x'] < offset_x: - offset_x = v['x'] - if v['y'] < offset_y: - offset_y = v['y'] - if v['x'] > max_x: - max_x = v['x'] - if v['y'] > max_y: - max_y = v['y'] - # Ratio of coordinates in the input data vs QMK's reference rectangle - x_ratio = LED_MAX[0] / (max_x - offset_x) - y_ratio = LED_MAX[1] / (max_y - offset_y) - - # Normalize LED coordinates by scaling and translating - normalized = OrderedDict() - for v in sorted(layout, key=lambda item: int(item['id'])): - x = x_ratio * (v['x'] - offset_x) - y = y_ratio * (v['y'] - offset_y) - - normalized[int(v['id'])] = (x, y) - - if 'matrix' in v: - if not v['matrix'] or v['matrix'] == (): - continue - (matrix_x,matrix_y) = v['matrix'] - # Map LED IDs to keyboard matrix - # Turn LED index into 0-indexed - led_to_el[matrix_y][matrix_x] = int(v['id']) - 1 - return led_to_el, normalized - -# Turn the data to C code that can be used in QMK's keymap.c -def print_matrix(layout, led_to_el, normalized): - print("led_config_t g_led_config = { {") - print(" // Key Matrix to LED Index") - for row in led_to_el: - print(" {", end='') - for col in row: - if col == 255: - col = 'NO_LED' - print(f"{col: >6}, ", end='') - print("},") - - print("}, {") - print(" // LED Index to Physical Position") - for (i, (led_id, (x, y))) in enumerate(normalized.items()): - coords = f" {{ {int(x): >3}, {int(y): >3} }}," - print(f"{coords: <15} // LED {led_id}") - - print("}, {") - print(" // LED Index to Flag") - print(" ", end='') - for i in range(len(layout)): - # TODO: Support other LED flags - print(LED_FLAG_KEYLIGHT, end='') - if i + 1 == len(layout): - print() - break - else: - print(", ", end='') - if (i + 1) % 16 == 0: - print("\n ", end='') - print("} };") - -def main(data): - # Normalize data and convert to C code - led_to_el, normalized = normalize(data) - print_matrix(data, led_to_el, normalized) - - # Draw led positions to visually check them with the reference design - import matplotlib.pyplot as plt - a = [[x, y] for _i, (x, y) in normalized.items()] - scatter = plt.scatter(*zip(*a)) - ax = scatter.axes - ax.invert_yaxis() - plt.show() - -if __name__ == "__main__": - # Can choose which dataset to process - main(ansi) From 185917c031b78a87e9ad282590dabb55ca4db504 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 12:48:22 +0800 Subject: [PATCH 03/31] fl16: Use pre-defined constants Our schematic uses these custom names but they just map to the per-controller names. Signed-off-by: Daniel Schaefer --- keyboards/framework/ansi/ansi.c | 365 +++++++++----------------------- 1 file changed, 97 insertions(+), 268 deletions(-) diff --git a/keyboards/framework/ansi/ansi.c b/keyboards/framework/ansi/ansi.c index 27679d5e984..0a26c24fef4 100644 --- a/keyboards/framework/ansi/ansi.c +++ b/keyboards/framework/ansi/ansi.c @@ -3,177 +3,6 @@ #include QMK_KEYBOARD_H -#define CS19_SW12 0x00 -#define CS20_SW12 0x01 -#define CS21_SW12 0x02 -#define CS22_SW12 0x03 -#define CS23_SW12 0x04 -#define CS24_SW12 0x05 -#define CS25_SW12 0x06 -#define CS26_SW12 0x07 -#define CS27_SW12 0x08 -#define CS28_SW12 0x09 -#define CS29_SW12 0x0A -#define CS30_SW12 0x0B -#define CS31_SW12 0x0C -#define CS32_SW12 0x0D -#define CS33_SW12 0x0E -#define CS34_SW12 0x0F -#define CS35_SW12 0x10 -#define CS36_SW12 0x11 - -#define CS19_SW13 0x12 -#define CS20_SW13 0x13 -#define CS21_SW13 0x14 -#define CS22_SW13 0x15 -#define CS23_SW13 0x16 -#define CS24_SW13 0x17 -#define CS25_SW13 0x18 -#define CS26_SW13 0x19 -#define CS27_SW13 0x1A -#define CS28_SW13 0x1B -#define CS29_SW13 0x1C -#define CS30_SW13 0x1D -#define CS31_SW13 0x1E -#define CS32_SW13 0x1F -#define CS33_SW13 0x20 -#define CS34_SW13 0x21 -#define CS35_SW13 0x22 -#define CS36_SW13 0x23 - -#define CS19_SW14 0x24 -#define CS20_SW14 0x25 -#define CS21_SW14 0x26 -#define CS22_SW14 0x27 -#define CS23_SW14 0x28 -#define CS24_SW14 0x29 -#define CS25_SW14 0x2A -#define CS26_SW14 0x2B -#define CS27_SW14 0x2C -#define CS28_SW14 0x2D -#define CS29_SW14 0x2E -#define CS30_SW14 0x2F -#define CS31_SW14 0x30 -#define CS32_SW14 0x31 -#define CS33_SW14 0x32 -#define CS34_SW14 0x33 -#define CS35_SW14 0x34 -#define CS36_SW14 0x35 - -#define CS19_SW15 0x36 -#define CS20_SW15 0x37 -#define CS21_SW15 0x38 -#define CS22_SW15 0x39 -#define CS23_SW15 0x3A -#define CS24_SW15 0x3B -#define CS25_SW15 0x3C -#define CS26_SW15 0x3D -#define CS27_SW15 0x3E -#define CS28_SW15 0x3F -#define CS29_SW15 0x40 -#define CS30_SW15 0x41 -#define CS31_SW15 0x42 -#define CS32_SW15 0x43 -#define CS33_SW15 0x44 -#define CS34_SW15 0x45 -#define CS35_SW15 0x46 -#define CS36_SW15 0x47 - -#define CS19_SW16 0x48 -#define CS20_SW16 0x49 -#define CS21_SW16 0x4A -#define CS22_SW16 0x4B -#define CS23_SW16 0x4C -#define CS24_SW16 0x4D -#define CS25_SW16 0x4E -#define CS26_SW16 0x4F -#define CS27_SW16 0x50 -#define CS28_SW16 0x51 -#define CS29_SW16 0x52 -#define CS30_SW16 0x53 -#define CS31_SW16 0x54 -#define CS32_SW16 0x55 -#define CS33_SW16 0x56 -#define CS34_SW16 0x57 -#define CS35_SW16 0x58 -#define CS36_SW16 0x59 - -#define CS19_SW17 0x5A -#define CS20_SW17 0x5B -#define CS21_SW17 0x5C -#define CS22_SW17 0x5D -#define CS23_SW17 0x5E -#define CS24_SW17 0x5F -#define CS25_SW17 0x60 -#define CS26_SW17 0x61 -#define CS27_SW17 0x62 -#define CS28_SW17 0x63 -#define CS29_SW17 0x64 -#define CS30_SW17 0x65 -#define CS31_SW17 0x66 -#define CS32_SW17 0x67 -#define CS33_SW17 0x68 -#define CS34_SW17 0x69 -#define CS35_SW17 0x6A -#define CS36_SW17 0x6B - -#define CS19_SW18 0x6C -#define CS20_SW18 0x6D -#define CS21_SW18 0x6E -#define CS22_SW18 0x6F -#define CS23_SW18 0x70 -#define CS24_SW18 0x71 -#define CS25_SW18 0x72 -#define CS26_SW18 0x73 -#define CS27_SW18 0x74 -#define CS28_SW18 0x75 -#define CS29_SW18 0x76 -#define CS30_SW18 0x77 -#define CS31_SW18 0x78 -#define CS32_SW18 0x79 -#define CS33_SW18 0x7A -#define CS34_SW18 0x7B -#define CS35_SW18 0x7C -#define CS36_SW18 0x7D - -#define CS19_SW19 0x7E -#define CS20_SW19 0x7F -#define CS21_SW19 0x80 -#define CS22_SW19 0x81 -#define CS23_SW19 0x82 -#define CS24_SW19 0x83 -#define CS25_SW19 0x84 -#define CS26_SW19 0x85 -#define CS27_SW19 0x86 -#define CS28_SW19 0x87 -#define CS29_SW19 0x88 -#define CS30_SW19 0x89 -#define CS31_SW19 0x8A -#define CS32_SW19 0x8B -#define CS33_SW19 0x8C -#define CS34_SW19 0x8D -#define CS35_SW19 0x8E -#define CS36_SW19 0x8F - -#define CS19_SW20 0x90 -#define CS20_SW20 0x91 -#define CS21_SW20 0x92 -#define CS22_SW20 0x93 -#define CS23_SW20 0x94 -#define CS24_SW20 0x95 -#define CS25_SW20 0x96 -#define CS26_SW20 0x97 -#define CS27_SW20 0x98 -#define CS28_SW20 0x99 -#define CS29_SW20 0x9A -#define CS30_SW20 0x9B -#define CS31_SW20 0x9C -#define CS32_SW20 0x9D -#define CS33_SW20 0x9E -#define CS34_SW20 0x9F -#define CS35_SW20 0xA0 -#define CS36_SW20 0xA1 - // clang-format off // TODO: Should have attribute __flash. But won't compile if I add it const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { @@ -184,114 +13,114 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { * | | | B location * | | | | */ // Re-arranged in LED ID order so it matches with the physical location array - {0, CS3_SW6, CS2_SW6, CS1_SW6}, // LED 1 - {0, CS3_SW8, CS2_SW8, CS1_SW8}, // LED 2 - {0, CS3_SW1, CS2_SW1, CS1_SW1}, // LED 3 - {0, CS3_SW2, CS2_SW2, CS1_SW2}, // LED 4 - {0, CS3_SW3, CS2_SW3, CS1_SW3}, // LED 5 - {0, CS3_SW4, CS2_SW4, CS1_SW4}, // LED 6 - {0, CS3_SW9, CS2_SW9, CS1_SW9}, // LED 7 - {0, CS3_SW5, CS2_SW5, CS1_SW5}, // LED 8 - {0, CS3_SW7, CS2_SW7, CS1_SW7}, // LED 9 + {0, CS3_SW6, CS2_SW6, CS1_SW6}, // LED 1 + {0, CS3_SW8, CS2_SW8, CS1_SW8}, // LED 2 + {0, CS3_SW1, CS2_SW1, CS1_SW1}, // LED 3 + {0, CS3_SW2, CS2_SW2, CS1_SW2}, // LED 4 + {0, CS3_SW3, CS2_SW3, CS1_SW3}, // LED 5 + {0, CS3_SW4, CS2_SW4, CS1_SW4}, // LED 6 + {0, CS3_SW9, CS2_SW9, CS1_SW9}, // LED 7 + {0, CS3_SW5, CS2_SW5, CS1_SW5}, // LED 8 + {0, CS3_SW7, CS2_SW7, CS1_SW7}, // LED 9 - {0, CS6_SW3, CS5_SW3, CS4_SW3}, // LED 10 - {0, CS6_SW7, CS5_SW7, CS4_SW7}, // LED 11 - {0, CS6_SW1, CS5_SW1, CS4_SW1}, // LED 12 - {0, CS6_SW2, CS5_SW2, CS4_SW2}, // LED 13 - {0, CS6_SW4, CS5_SW4, CS4_SW4}, // LED 14 - {0, CS6_SW5, CS5_SW5, CS4_SW5}, // LED 15 - {0, CS6_SW6, CS5_SW6, CS4_SW6}, // LED 16 - {0, CS6_SW8, CS5_SW8, CS4_SW8}, // LED 17 - {0, CS6_SW9, CS5_SW9, CS4_SW9}, // LED 18 + {0, CS6_SW3, CS5_SW3, CS4_SW3}, // LED 10 + {0, CS6_SW7, CS5_SW7, CS4_SW7}, // LED 11 + {0, CS6_SW1, CS5_SW1, CS4_SW1}, // LED 12 + {0, CS6_SW2, CS5_SW2, CS4_SW2}, // LED 13 + {0, CS6_SW4, CS5_SW4, CS4_SW4}, // LED 14 + {0, CS6_SW5, CS5_SW5, CS4_SW5}, // LED 15 + {0, CS6_SW6, CS5_SW6, CS4_SW6}, // LED 16 + {0, CS6_SW8, CS5_SW8, CS4_SW8}, // LED 17 + {0, CS6_SW9, CS5_SW9, CS4_SW9}, // LED 18 - {0, CS9_SW1, CS8_SW1, CS7_SW1}, // LED 19 - {0, CS9_SW2, CS8_SW2, CS7_SW2}, // LED 20 - {0, CS9_SW3, CS8_SW3, CS7_SW3}, // LED 21 - {0, CS9_SW4, CS8_SW4, CS7_SW4}, // LED 22 - {0, CS9_SW5, CS8_SW5, CS7_SW5}, // LED 23 - {0, CS9_SW6, CS8_SW6, CS7_SW6}, // LED 24 - {0, CS9_SW7, CS8_SW7, CS7_SW7}, // LED 25 - {0, CS9_SW8, CS8_SW8, CS7_SW8}, // LED 26 - {0, CS9_SW9, CS8_SW9, CS7_SW9}, // LED 27 + {0, CS9_SW1, CS8_SW1, CS7_SW1}, // LED 19 + {0, CS9_SW2, CS8_SW2, CS7_SW2}, // LED 20 + {0, CS9_SW3, CS8_SW3, CS7_SW3}, // LED 21 + {0, CS9_SW4, CS8_SW4, CS7_SW4}, // LED 22 + {0, CS9_SW5, CS8_SW5, CS7_SW5}, // LED 23 + {0, CS9_SW6, CS8_SW6, CS7_SW6}, // LED 24 + {0, CS9_SW7, CS8_SW7, CS7_SW7}, // LED 25 + {0, CS9_SW8, CS8_SW8, CS7_SW8}, // LED 26 + {0, CS9_SW9, CS8_SW9, CS7_SW9}, // LED 27 - {0, CS12_SW1, CS11_SW1, CS10_SW1}, // LED 28 - {0, CS12_SW2, CS11_SW2, CS10_SW2}, // LED 29 - {0, CS12_SW3, CS11_SW3, CS10_SW3}, // LED 30 - {0, CS12_SW4, CS11_SW4, CS10_SW4}, // LED 31 - {0, CS12_SW5, CS11_SW5, CS10_SW5}, // LED 32 - {0, CS12_SW6, CS11_SW6, CS10_SW6}, // LED 33 - {0, CS12_SW7, CS11_SW7, CS10_SW7}, // LED 34 - {0, CS12_SW8, CS11_SW8, CS10_SW8}, // LED 35 - {0, CS12_SW9, CS11_SW9, CS10_SW9}, // LED 36 + {0, CS12_SW1, CS11_SW1, CS10_SW1}, // LED 28 + {0, CS12_SW2, CS11_SW2, CS10_SW2}, // LED 29 + {0, CS12_SW3, CS11_SW3, CS10_SW3}, // LED 30 + {0, CS12_SW4, CS11_SW4, CS10_SW4}, // LED 31 + {0, CS12_SW5, CS11_SW5, CS10_SW5}, // LED 32 + {0, CS12_SW6, CS11_SW6, CS10_SW6}, // LED 33 + {0, CS12_SW7, CS11_SW7, CS10_SW7}, // LED 34 + {0, CS12_SW8, CS11_SW8, CS10_SW8}, // LED 35 + {0, CS12_SW9, CS11_SW9, CS10_SW9}, // LED 36 - {0, CS15_SW2, CS14_SW2, CS13_SW2}, // LED 37 - {0, CS15_SW3, CS14_SW3, CS13_SW3}, // LED 38 - {0, CS15_SW6, CS14_SW6, CS13_SW6}, // LED 39 - {0, CS15_SW7, CS14_SW7, CS13_SW7}, // LED 40 - {0, CS15_SW9, CS14_SW9, CS13_SW9}, // LED 41 - {0, CS15_SW1, CS14_SW1, CS13_SW1}, // LED 42 - {0, CS15_SW4, CS14_SW4, CS13_SW4}, // LED 43 - {0, CS15_SW5, CS14_SW5, CS13_SW5}, // LED 44 - {0, CS15_SW8, CS14_SW8, CS13_SW8}, // LED 45 + {0, CS15_SW2, CS14_SW2, CS13_SW2}, // LED 37 + {0, CS15_SW3, CS14_SW3, CS13_SW3}, // LED 38 + {0, CS15_SW6, CS14_SW6, CS13_SW6}, // LED 39 + {0, CS15_SW7, CS14_SW7, CS13_SW7}, // LED 40 + {0, CS15_SW9, CS14_SW9, CS13_SW9}, // LED 41 + {0, CS15_SW1, CS14_SW1, CS13_SW1}, // LED 42 + {0, CS15_SW4, CS14_SW4, CS13_SW4}, // LED 43 + {0, CS15_SW5, CS14_SW5, CS13_SW5}, // LED 44 + {0, CS15_SW8, CS14_SW8, CS13_SW8}, // LED 45 - {0, CS18_SW1, CS17_SW1, CS16_SW1}, // LED 46 - {0, CS18_SW2, CS17_SW2, CS16_SW2}, // LED 47 - {0, CS18_SW3, CS17_SW3, CS16_SW3}, // LED 48 + {0, CS18_SW1, CS17_SW1, CS16_SW1}, // LED 46 + {0, CS18_SW2, CS17_SW2, CS16_SW2}, // LED 47 + {0, CS18_SW3, CS17_SW3, CS16_SW3}, // LED 48 - {1, CS21_SW12, CS20_SW12, CS19_SW12}, // LED 49 - {1, CS21_SW13, CS20_SW13, CS19_SW13}, // LED 50 - {1, CS21_SW14, CS20_SW14, CS19_SW14}, // LED 51 - {1, CS21_SW15, CS20_SW15, CS19_SW15}, // LED 52 - {1, CS21_SW16, CS20_SW16, CS19_SW16}, // LED 53 - {1, CS21_SW17, CS20_SW17, CS19_SW17}, // LED 54 - {1, CS21_SW18, CS20_SW18, CS19_SW18}, // LED 55 - {1, CS21_SW19, CS20_SW19, CS19_SW19}, // LED 56 - {1, CS21_SW20, CS20_SW20, CS19_SW20}, // LED 57 + {1, CS3_SW1, CS2_SW1, CS1_SW1}, // LED 49 + {1, CS3_SW2, CS2_SW2, CS1_SW2}, // LED 50 + {1, CS3_SW3, CS2_SW3, CS1_SW3}, // LED 51 + {1, CS3_SW4, CS2_SW4, CS1_SW4}, // LED 52 + {1, CS3_SW5, CS2_SW5, CS1_SW5}, // LED 53 + {1, CS3_SW6, CS2_SW6, CS1_SW6}, // LED 54 + {1, CS3_SW7, CS2_SW7, CS1_SW7}, // LED 55 + {1, CS3_SW8, CS2_SW8, CS1_SW8}, // LED 56 + {1, CS3_SW9, CS2_SW9, CS1_SW9}, // LED 57 - {1, CS24_SW12, CS23_SW12, CS22_SW12}, // LED 58 - {1, CS24_SW13, CS23_SW13, CS22_SW13}, // LED 59 - {1, CS24_SW14, CS23_SW14, CS22_SW14}, // LED 60 - {1, CS24_SW15, CS23_SW15, CS22_SW15}, // LED 61 - {1, CS24_SW16, CS23_SW16, CS22_SW16}, // LED 62 - {1, CS24_SW17, CS23_SW17, CS22_SW17}, // LED 63 - {1, CS24_SW18, CS23_SW18, CS22_SW18}, // LED 64 - {1, CS24_SW19, CS23_SW19, CS22_SW19}, // LED 65 - {1, CS24_SW20, CS23_SW20, CS22_SW20}, // LED 66 + {1, CS6_SW1, CS5_SW1, CS4_SW1}, // LED 58 + {1, CS6_SW2, CS5_SW2, CS4_SW2}, // LED 59 + {1, CS6_SW3, CS5_SW3, CS4_SW3}, // LED 60 + {1, CS6_SW4, CS5_SW4, CS4_SW4}, // LED 61 + {1, CS6_SW5, CS5_SW5, CS4_SW5}, // LED 62 + {1, CS6_SW6, CS5_SW6, CS4_SW6}, // LED 63 + {1, CS6_SW7, CS5_SW7, CS4_SW7}, // LED 64 + {1, CS6_SW8, CS5_SW8, CS4_SW8}, // LED 65 + {1, CS6_SW9, CS5_SW9, CS4_SW9}, // LED 66 - {1, CS27_SW12, CS26_SW12, CS25_SW12}, // LED 67 - {1, CS27_SW13, CS26_SW13, CS25_SW13}, // LED 68 - {1, CS27_SW15, CS26_SW15, CS25_SW15}, // LED 69 - {1, CS27_SW16, CS26_SW16, CS25_SW16}, // LED 70 - {1, CS27_SW17, CS26_SW17, CS25_SW17}, // LED 71 - {1, CS27_SW18, CS26_SW18, CS25_SW18}, // LED 72 - {1, CS27_SW19, CS26_SW19, CS25_SW19}, // LED 73 - {1, CS27_SW20, CS26_SW20, CS25_SW20}, // LED 74 - {1, CS27_SW14, CS26_SW14, CS25_SW14}, // LED 75 + {1, CS9_SW1, CS8_SW1, CS7_SW1}, // LED 67 + {1, CS9_SW2, CS8_SW2, CS7_SW2}, // LED 68 + {1, CS9_SW4, CS8_SW4, CS7_SW4}, // LED 69 + {1, CS9_SW5, CS8_SW5, CS7_SW5}, // LED 70 + {1, CS9_SW6, CS8_SW6, CS7_SW6}, // LED 71 + {1, CS9_SW7, CS8_SW7, CS7_SW7}, // LED 72 + {1, CS9_SW8, CS8_SW8, CS7_SW8}, // LED 73 + {1, CS9_SW9, CS8_SW9, CS7_SW9}, // LED 74 + {1, CS9_SW3, CS8_SW3, CS7_SW3}, // LED 75 - {1, CS30_SW12, CS29_SW12, CS28_SW12}, // LED 76 - {1, CS30_SW13, CS29_SW13, CS28_SW13}, // LED 77 - {1, CS30_SW14, CS29_SW14, CS28_SW14}, // LED 78 - {1, CS30_SW15, CS29_SW15, CS28_SW15}, // LED 79 - {1, CS30_SW16, CS29_SW16, CS28_SW16}, // LED 80 - {1, CS30_SW17, CS29_SW17, CS28_SW17}, // LED 81 - {1, CS30_SW18, CS29_SW18, CS28_SW18}, // LED 82 - {1, CS30_SW19, CS29_SW19, CS28_SW19}, // LED 83 - {1, CS30_SW20, CS29_SW20, CS28_SW20}, // LED 84 + {1, CS12_SW1, CS11_SW1, CS10_SW1}, // LED 76 + {1, CS12_SW2, CS11_SW2, CS10_SW2}, // LED 77 + {1, CS12_SW3, CS11_SW3, CS10_SW3}, // LED 78 + {1, CS12_SW4, CS11_SW4, CS10_SW4}, // LED 79 + {1, CS12_SW5, CS11_SW5, CS10_SW5}, // LED 80 + {1, CS12_SW6, CS11_SW6, CS10_SW6}, // LED 81 + {1, CS12_SW7, CS11_SW7, CS10_SW7}, // LED 82 + {1, CS12_SW8, CS11_SW8, CS10_SW8}, // LED 83 + {1, CS12_SW9, CS11_SW9, CS10_SW9}, // LED 84 - {1, CS33_SW12, CS32_SW12, CS31_SW12}, // LED 85 - {1, CS33_SW13, CS32_SW13, CS31_SW13}, // LED 86 - {1, CS33_SW14, CS32_SW14, CS31_SW14}, // LED 87 - {1, CS33_SW15, CS32_SW15, CS31_SW15}, // LED 88 - {1, CS33_SW16, CS32_SW16, CS31_SW16}, // LED 89 - {1, CS33_SW17, CS32_SW17, CS31_SW17}, // LED 90 - {1, CS33_SW18, CS32_SW18, CS31_SW18}, // LED 91 - {1, CS33_SW19, CS32_SW19, CS31_SW19}, // LED 92 - {1, CS33_SW20, CS32_SW20, CS31_SW20}, // LED 93 + {1, CS15_SW1, CS14_SW1, CS13_SW1}, // LED 85 + {1, CS15_SW2, CS14_SW2, CS13_SW2}, // LED 86 + {1, CS15_SW3, CS14_SW3, CS13_SW3}, // LED 87 + {1, CS15_SW4, CS14_SW4, CS13_SW4}, // LED 88 + {1, CS15_SW5, CS14_SW5, CS13_SW5}, // LED 89 + {1, CS15_SW6, CS14_SW6, CS13_SW6}, // LED 90 + {1, CS15_SW7, CS14_SW7, CS13_SW7}, // LED 91 + {1, CS15_SW8, CS14_SW8, CS13_SW8}, // LED 92 + {1, CS15_SW9, CS14_SW9, CS13_SW9}, // LED 93 - {1, CS36_SW12, CS35_SW12, CS34_SW12}, // LED 94 - {1, CS36_SW13, CS35_SW13, CS34_SW13}, // LED 95 - {1, CS36_SW14, CS35_SW14, CS34_SW14}, // LED 96 - {1, CS36_SW15, CS35_SW15, CS34_SW15}, // LED 97 + {1, CS18_SW1, CS17_SW1, CS16_SW1}, // LED 94 + {1, CS18_SW2, CS17_SW2, CS16_SW2}, // LED 95 + {1, CS18_SW3, CS17_SW3, CS16_SW3}, // LED 96 + {1, CS18_SW4, CS17_SW4, CS16_SW4}, // LED 97 }; led_config_t g_led_config = { { From b287a1ee43117c7ca143a95e03a74fcfd2b7ad3f Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 13:06:25 +0800 Subject: [PATCH 04/31] keyboards/framework: Remove RGB support on some variants Need to wait for PR #21343 to hit master. Signed-off-by: Daniel Schaefer --- keyboards/framework/ansi/ansi.c | 241 ------------------------ keyboards/framework/ansi/rules.mk | 3 +- keyboards/framework/macropad/macropad.c | 79 -------- keyboards/framework/macropad/rules.mk | 3 +- 4 files changed, 4 insertions(+), 322 deletions(-) diff --git a/keyboards/framework/ansi/ansi.c b/keyboards/framework/ansi/ansi.c index 0a26c24fef4..d5cb507b040 100644 --- a/keyboards/framework/ansi/ansi.c +++ b/keyboards/framework/ansi/ansi.c @@ -2,244 +2,3 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H - -// clang-format off -// TODO: Should have attribute __flash. But won't compile if I add it -const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - // Re-arranged in LED ID order so it matches with the physical location array - {0, CS3_SW6, CS2_SW6, CS1_SW6}, // LED 1 - {0, CS3_SW8, CS2_SW8, CS1_SW8}, // LED 2 - {0, CS3_SW1, CS2_SW1, CS1_SW1}, // LED 3 - {0, CS3_SW2, CS2_SW2, CS1_SW2}, // LED 4 - {0, CS3_SW3, CS2_SW3, CS1_SW3}, // LED 5 - {0, CS3_SW4, CS2_SW4, CS1_SW4}, // LED 6 - {0, CS3_SW9, CS2_SW9, CS1_SW9}, // LED 7 - {0, CS3_SW5, CS2_SW5, CS1_SW5}, // LED 8 - {0, CS3_SW7, CS2_SW7, CS1_SW7}, // LED 9 - - {0, CS6_SW3, CS5_SW3, CS4_SW3}, // LED 10 - {0, CS6_SW7, CS5_SW7, CS4_SW7}, // LED 11 - {0, CS6_SW1, CS5_SW1, CS4_SW1}, // LED 12 - {0, CS6_SW2, CS5_SW2, CS4_SW2}, // LED 13 - {0, CS6_SW4, CS5_SW4, CS4_SW4}, // LED 14 - {0, CS6_SW5, CS5_SW5, CS4_SW5}, // LED 15 - {0, CS6_SW6, CS5_SW6, CS4_SW6}, // LED 16 - {0, CS6_SW8, CS5_SW8, CS4_SW8}, // LED 17 - {0, CS6_SW9, CS5_SW9, CS4_SW9}, // LED 18 - - {0, CS9_SW1, CS8_SW1, CS7_SW1}, // LED 19 - {0, CS9_SW2, CS8_SW2, CS7_SW2}, // LED 20 - {0, CS9_SW3, CS8_SW3, CS7_SW3}, // LED 21 - {0, CS9_SW4, CS8_SW4, CS7_SW4}, // LED 22 - {0, CS9_SW5, CS8_SW5, CS7_SW5}, // LED 23 - {0, CS9_SW6, CS8_SW6, CS7_SW6}, // LED 24 - {0, CS9_SW7, CS8_SW7, CS7_SW7}, // LED 25 - {0, CS9_SW8, CS8_SW8, CS7_SW8}, // LED 26 - {0, CS9_SW9, CS8_SW9, CS7_SW9}, // LED 27 - - {0, CS12_SW1, CS11_SW1, CS10_SW1}, // LED 28 - {0, CS12_SW2, CS11_SW2, CS10_SW2}, // LED 29 - {0, CS12_SW3, CS11_SW3, CS10_SW3}, // LED 30 - {0, CS12_SW4, CS11_SW4, CS10_SW4}, // LED 31 - {0, CS12_SW5, CS11_SW5, CS10_SW5}, // LED 32 - {0, CS12_SW6, CS11_SW6, CS10_SW6}, // LED 33 - {0, CS12_SW7, CS11_SW7, CS10_SW7}, // LED 34 - {0, CS12_SW8, CS11_SW8, CS10_SW8}, // LED 35 - {0, CS12_SW9, CS11_SW9, CS10_SW9}, // LED 36 - - {0, CS15_SW2, CS14_SW2, CS13_SW2}, // LED 37 - {0, CS15_SW3, CS14_SW3, CS13_SW3}, // LED 38 - {0, CS15_SW6, CS14_SW6, CS13_SW6}, // LED 39 - {0, CS15_SW7, CS14_SW7, CS13_SW7}, // LED 40 - {0, CS15_SW9, CS14_SW9, CS13_SW9}, // LED 41 - {0, CS15_SW1, CS14_SW1, CS13_SW1}, // LED 42 - {0, CS15_SW4, CS14_SW4, CS13_SW4}, // LED 43 - {0, CS15_SW5, CS14_SW5, CS13_SW5}, // LED 44 - {0, CS15_SW8, CS14_SW8, CS13_SW8}, // LED 45 - - {0, CS18_SW1, CS17_SW1, CS16_SW1}, // LED 46 - {0, CS18_SW2, CS17_SW2, CS16_SW2}, // LED 47 - {0, CS18_SW3, CS17_SW3, CS16_SW3}, // LED 48 - - {1, CS3_SW1, CS2_SW1, CS1_SW1}, // LED 49 - {1, CS3_SW2, CS2_SW2, CS1_SW2}, // LED 50 - {1, CS3_SW3, CS2_SW3, CS1_SW3}, // LED 51 - {1, CS3_SW4, CS2_SW4, CS1_SW4}, // LED 52 - {1, CS3_SW5, CS2_SW5, CS1_SW5}, // LED 53 - {1, CS3_SW6, CS2_SW6, CS1_SW6}, // LED 54 - {1, CS3_SW7, CS2_SW7, CS1_SW7}, // LED 55 - {1, CS3_SW8, CS2_SW8, CS1_SW8}, // LED 56 - {1, CS3_SW9, CS2_SW9, CS1_SW9}, // LED 57 - - {1, CS6_SW1, CS5_SW1, CS4_SW1}, // LED 58 - {1, CS6_SW2, CS5_SW2, CS4_SW2}, // LED 59 - {1, CS6_SW3, CS5_SW3, CS4_SW3}, // LED 60 - {1, CS6_SW4, CS5_SW4, CS4_SW4}, // LED 61 - {1, CS6_SW5, CS5_SW5, CS4_SW5}, // LED 62 - {1, CS6_SW6, CS5_SW6, CS4_SW6}, // LED 63 - {1, CS6_SW7, CS5_SW7, CS4_SW7}, // LED 64 - {1, CS6_SW8, CS5_SW8, CS4_SW8}, // LED 65 - {1, CS6_SW9, CS5_SW9, CS4_SW9}, // LED 66 - - {1, CS9_SW1, CS8_SW1, CS7_SW1}, // LED 67 - {1, CS9_SW2, CS8_SW2, CS7_SW2}, // LED 68 - {1, CS9_SW4, CS8_SW4, CS7_SW4}, // LED 69 - {1, CS9_SW5, CS8_SW5, CS7_SW5}, // LED 70 - {1, CS9_SW6, CS8_SW6, CS7_SW6}, // LED 71 - {1, CS9_SW7, CS8_SW7, CS7_SW7}, // LED 72 - {1, CS9_SW8, CS8_SW8, CS7_SW8}, // LED 73 - {1, CS9_SW9, CS8_SW9, CS7_SW9}, // LED 74 - {1, CS9_SW3, CS8_SW3, CS7_SW3}, // LED 75 - - {1, CS12_SW1, CS11_SW1, CS10_SW1}, // LED 76 - {1, CS12_SW2, CS11_SW2, CS10_SW2}, // LED 77 - {1, CS12_SW3, CS11_SW3, CS10_SW3}, // LED 78 - {1, CS12_SW4, CS11_SW4, CS10_SW4}, // LED 79 - {1, CS12_SW5, CS11_SW5, CS10_SW5}, // LED 80 - {1, CS12_SW6, CS11_SW6, CS10_SW6}, // LED 81 - {1, CS12_SW7, CS11_SW7, CS10_SW7}, // LED 82 - {1, CS12_SW8, CS11_SW8, CS10_SW8}, // LED 83 - {1, CS12_SW9, CS11_SW9, CS10_SW9}, // LED 84 - - {1, CS15_SW1, CS14_SW1, CS13_SW1}, // LED 85 - {1, CS15_SW2, CS14_SW2, CS13_SW2}, // LED 86 - {1, CS15_SW3, CS14_SW3, CS13_SW3}, // LED 87 - {1, CS15_SW4, CS14_SW4, CS13_SW4}, // LED 88 - {1, CS15_SW5, CS14_SW5, CS13_SW5}, // LED 89 - {1, CS15_SW6, CS14_SW6, CS13_SW6}, // LED 90 - {1, CS15_SW7, CS14_SW7, CS13_SW7}, // LED 91 - {1, CS15_SW8, CS14_SW8, CS13_SW8}, // LED 92 - {1, CS15_SW9, CS14_SW9, CS13_SW9}, // LED 93 - - {1, CS18_SW1, CS17_SW1, CS16_SW1}, // LED 94 - {1, CS18_SW2, CS17_SW2, CS16_SW2}, // LED 95 - {1, CS18_SW3, CS17_SW3, CS16_SW3}, // LED 96 - {1, CS18_SW4, CS17_SW4, CS16_SW4}, // LED 97 -}; - -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 31, 72, 5, 84, NO_LED, 29, 33, 77, 75, 82, 78, NO_LED, 88, 79, 52, NO_LED, }, - {NO_LED, NO_LED, NO_LED, 47, 96, 27, 35, 76, 90, 30, NO_LED, NO_LED, 34, 81, 53, 67, }, - {NO_LED, NO_LED, 93, NO_LED, 2, 19, 39, 40, 55, NO_LED, 26, NO_LED, NO_LED, 63, NO_LED, 91, }, - {NO_LED, 46, 1, NO_LED, 20, 21, 7, 8, 59, NO_LED, 24, 74, NO_LED, 70, NO_LED, NO_LED, }, - {NO_LED, NO_LED, 16, NO_LED, 38, 41, 9, 14, 68, NO_LED, 22, NO_LED, NO_LED, 61, 62, NO_LED, }, - {NO_LED, NO_LED, 15, NO_LED, 12, 13, 11, 10, 69, NO_LED, 17, NO_LED, NO_LED, 60, 64, NO_LED, }, - {NO_LED, NO_LED, NO_LED, NO_LED, 18, 3, 4, 6, 66, NO_LED, 58, 89, NO_LED, 57, 54, NO_LED, }, - {NO_LED, NO_LED, 36, NO_LED, NO_LED, 25, 43, 49, 51, NO_LED, 50, NO_LED, NO_LED, 48, 37, NO_LED, }, -}, { - // LED Index to Physical Position - { 11, 23 }, // LED 1 - { 0, 23 }, // LED 2 - { 57, 22 }, // LED 3 - { 41, 22 }, // LED 4 - { 73, 22 }, // LED 5 - { 25, 22 }, // LED 6 - { 121, 22 }, // LED 7 - { 89, 22 }, // LED 8 - { 105, 22 }, // LED 9 - { 82, 10 }, // LED 10 - { 114, 10 }, // LED 11 - { 66, 10 }, // LED 12 - { 50, 10 }, // LED 13 - { 34, 10 }, // LED 14 - { 98, 10 }, // LED 15 - { 18, 10 }, // LED 16 - { 2, 10 }, // LED 17 - { 130, 10 }, // LED 18 - { 56, 0 }, // LED 19 - { 40, 0 }, // LED 20 - { 72, 0 }, // LED 21 - { 24, 0 }, // LED 22 - { 88, 0 }, // LED 23 - { 10, 0 }, // LED 24 - { 104, 0 }, // LED 25 - { 0, 0 }, // LED 26 - { 120, 0 }, // LED 27 - { 38, 47 }, // LED 28 - { 22, 47 }, // LED 29 - { 54, 47 }, // LED 30 - { 5, 48 }, // LED 31 - { 70, 47 }, // LED 32 - { 1, 48 }, // LED 33 - { 86, 47 }, // LED 34 - { 0, 60 }, // LED 35 - { 102, 47 }, // LED 36 - { 30, 34 }, // LED 37 - { 62, 34 }, // LED 38 - { 7, 35 }, // LED 39 - { 94, 34 }, // LED 40 - { 110, 34 }, // LED 41 - { 46, 34 }, // LED 42 - { 13, 36 }, // LED 43 - { 78, 34 }, // LED 44 - { 1, 36 }, // LED 45 - { 8, 60 }, // LED 46 - { 38, 59 }, // LED 47 - { 54, 59 }, // LED 48 - { 174, 34 }, // LED 49 - { 126, 34 }, // LED 50 - { 142, 34 }, // LED 51 - { 158, 34 }, // LED 52 - { 190, 34 }, // LED 53 - { 205, 34 }, // LED 54 - { 202, 22 }, // LED 55 - { 219, 22 }, // LED 56 - { 223, 36 }, // LED 57 - { 185, 22 }, // LED 58 - { 137, 22 }, // LED 59 - { 153, 22 }, // LED 60 - { 169, 22 }, // LED 61 - { 162, 10 }, // LED 62 - { 194, 10 }, // LED 63 - { 178, 10 }, // LED 64 - { 209, 11 }, // LED 65 - { 222, 11 }, // LED 66 - { 181, 0 }, // LED 67 - { 136, 0 }, // LED 68 - { 168, 0 }, // LED 69 - { 146, 10 }, // LED 70 - { 199, 0 }, // LED 71 - { 186, 0 }, // LED 72 - { 213, 0 }, // LED 73 - { 224, 0 }, // LED 74 - { 152, 0 }, // LED 75 - { 166, 47 }, // LED 76 - { 118, 47 }, // LED 77 - { 134, 47 }, // LED 78 - { 150, 47 }, // LED 79 - { 182, 47 }, // LED 80 - { 197, 48 }, // LED 81 - { 202, 58 }, // LED 82 - { 203, 48 }, // LED 83 - { 217, 48 }, // LED 84 - { 150, 59 }, // LED 85 - { 108, 60 }, // LED 86 - { 121, 60 }, // LED 87 - { 134, 60 }, // LED 88 - { 166, 59 }, // LED 89 - { 183, 64 }, // LED 90 - { 202, 62 }, // LED 91 - { 220, 64 }, // LED 92 - { 222, 48 }, // LED 93 - { 22, 59 }, // LED 94 - { 70, 60 }, // LED 95 - { 83, 60 }, // LED 96 - { 95, 60 }, // LED 97 -}, { - // LED Index to Flag - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4 -} }; -// clang-format on diff --git a/keyboards/framework/ansi/rules.mk b/keyboards/framework/ansi/rules.mk index 68d6023391e..1cf0e488128 100644 --- a/keyboards/framework/ansi/rules.mk +++ b/keyboards/framework/ansi/rules.mk @@ -1,4 +1,5 @@ # Debugging (enabled in info.json) #CONSOLE_ENABLE = yes -RGB_MATRIX_ENABLE = yes +# TODO: Wait for PR #21343 to hit master +RGB_MATRIX_ENABLE = no RGB_MATRIX_DRIVER = IS31FL3743A diff --git a/keyboards/framework/macropad/macropad.c b/keyboards/framework/macropad/macropad.c index 0e396d977dc..d5cb507b040 100644 --- a/keyboards/framework/macropad/macropad.c +++ b/keyboards/framework/macropad/macropad.c @@ -2,82 +2,3 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H - -// clang-format off -const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - // Re-arranged in LED ID order so it matches with the physical location array - {0, CS3_SW1, CS2_SW1, CS1_SW1}, // LED 1 - {0, CS3_SW2, CS2_SW2, CS1_SW2}, // LED 2 - {0, CS3_SW3, CS2_SW3, CS1_SW3}, // LED 3 - {0, CS3_SW4, CS2_SW4, CS1_SW4}, // LED 4 - - {0, CS6_SW1, CS5_SW1, CS4_SW1}, // LED 5 - {0, CS6_SW3, CS5_SW3, CS4_SW3}, // LED 6 - {0, CS6_SW4, CS5_SW4, CS4_SW4}, // LED 7 - {0, CS6_SW2, CS5_SW2, CS4_SW2}, // LED 8 - - {0, CS9_SW1, CS8_SW1, CS7_SW1}, // LED 9 - {0, CS9_SW2, CS8_SW2, CS7_SW2}, // LED 10 - {0, CS9_SW3, CS8_SW3, CS7_SW3}, // LED 11 - {0, CS9_SW4, CS8_SW4, CS7_SW4}, // LED 12 - - {0, CS12_SW1, CS11_SW1, CS10_SW1}, // LED 13 - {0, CS12_SW2, CS11_SW2, CS10_SW2}, // LED 14 - {0, CS12_SW3, CS11_SW3, CS10_SW3}, // LED 15 - {0, CS12_SW4, CS11_SW4, CS10_SW4}, // LED 16 - - {0, CS15_SW2, CS14_SW2, CS13_SW2}, // LED 17 - {0, CS15_SW3, CS14_SW3, CS13_SW3}, // LED 18 - {0, CS15_SW1, CS14_SW1, CS13_SW1}, // LED 19 - {0, CS15_SW4, CS14_SW4, CS13_SW4}, // LED 20 - - {0, CS18_SW1, CS17_SW1, CS16_SW1}, // LED 21 - {0, CS18_SW2, CS17_SW2, CS16_SW2}, // LED 22 - {0, CS18_SW3, CS17_SW3, CS16_SW3}, // LED 23 - {0, CS18_SW4, CS17_SW4, CS16_SW4}, // LED 24 -}; - -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 4, 7, 6, 9, 0, 1, 3, 11, }, - { 8, 20, 21, 23, 15, 14, 18, 19, }, - { 12, 5, 2, NO_LED, 17, 16, 13, 10, }, - {NO_LED, NO_LED, NO_LED, NO_LED, 22, NO_LED, NO_LED, NO_LED, }, -}, { - // LED Index to Physical Position - { 73, 10 }, // LED 1 - { 73, 24 }, // LED 2 - { 73, 0 }, // LED 3 - { 73, 37 }, // LED 4 - { 0, 10 }, // LED 5 - { 0, 0 }, // LED 6 - { 0, 37 }, // LED 7 - { 0, 24 }, // LED 8 - { 0, 64 }, // LED 9 - { 0, 50 }, // LED 10 - { 73, 64 }, // LED 11 - { 73, 50 }, // LED 12 - { 223, 64 }, // LED 13 - { 223, 50 }, // LED 14 - { 150, 64 }, // LED 15 - { 150, 50 }, // LED 16 - { 223, 24 }, // LED 17 - { 223, 0 }, // LED 18 - { 223, 10 }, // LED 19 - { 223, 37 }, // LED 20 - { 150, 10 }, // LED 21 - { 150, 24 }, // LED 22 - { 150, 0 }, // LED 23 - { 150, 37 }, // LED 24 -}, { - // LED Index to Flag - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4 -} }; -// clang-format on diff --git a/keyboards/framework/macropad/rules.mk b/keyboards/framework/macropad/rules.mk index a98954a13dc..894753ca32b 100644 --- a/keyboards/framework/macropad/rules.mk +++ b/keyboards/framework/macropad/rules.mk @@ -1,2 +1,3 @@ -RGB_MATRIX_ENABLE = yes +# TODO: Wait for PR #21343 to hit master +RGB_MATRIX_ENABLE = no RGB_MATRIX_DRIVER = IS31FL3743A From 118429dcb9e2845e50ef2a04ccfdf9040013ea09 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 13:18:54 +0800 Subject: [PATCH 05/31] keyboards/framework: Update URLs to already working ones Previous URLs are not set up yet. Signed-off-by: Daniel Schaefer --- keyboards/framework/ansi/info.json | 2 +- keyboards/framework/iso/info.json | 2 +- keyboards/framework/jis/info.json | 2 +- keyboards/framework/macropad/info.json | 2 +- keyboards/framework/numpad/info.json | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/framework/ansi/info.json b/keyboards/framework/ansi/info.json index 95a5cacc06a..299e04002c7 100644 --- a/keyboards/framework/ansi/info.json +++ b/keyboards/framework/ansi/info.json @@ -14,7 +14,7 @@ }, "debounce": 5, "processor": "RP2040", - "url": "https://fr.mw/FRAKDKEN", + "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040", "usb": { "device_version": "0.2.2", "pid": "0x0012", diff --git a/keyboards/framework/iso/info.json b/keyboards/framework/iso/info.json index a698f650c82..d835b7328b8 100644 --- a/keyboards/framework/iso/info.json +++ b/keyboards/framework/iso/info.json @@ -14,7 +14,7 @@ }, "debounce": 5, "processor": "RP2040", - "url": "https://fr.mw/FRAKDKEN", + "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040", "usb": { "device_version": "0.2.2", "pid": "0x0018", diff --git a/keyboards/framework/jis/info.json b/keyboards/framework/jis/info.json index 5716251d2a8..92c93530556 100644 --- a/keyboards/framework/jis/info.json +++ b/keyboards/framework/jis/info.json @@ -14,7 +14,7 @@ }, "debounce": 5, "processor": "RP2040", - "url": "https://fr.mw/FRAKDKEN", + "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040", "usb": { "device_version": "0.2.2", "pid": "0x0019", diff --git a/keyboards/framework/macropad/info.json b/keyboards/framework/macropad/info.json index a40be330831..253e046a08e 100644 --- a/keyboards/framework/macropad/info.json +++ b/keyboards/framework/macropad/info.json @@ -14,7 +14,7 @@ }, "debounce": 5, "processor": "RP2040", - "url": "https://fr.mw/FRAKDNEN", + "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040", "usb": { "device_version": "0.2.2", "pid": "0x0013", diff --git a/keyboards/framework/numpad/info.json b/keyboards/framework/numpad/info.json index ff26ec1c45e..475d101586b 100644 --- a/keyboards/framework/numpad/info.json +++ b/keyboards/framework/numpad/info.json @@ -14,7 +14,7 @@ }, "debounce": 5, "processor": "RP2040", - "url": "https://fr.mw/FRAKDMEN", + "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040", "usb": { "device_version": "0.2.2", "pid": "0x0014", @@ -49,6 +49,6 @@ { "label": "0", "x": 0, "y": 7, "w": 2.25, "h": 1.25 }, { "label": ".", "x": 2.5, "y": 7, "h": 1.25 } ] - }, + } } } From 095721eb8170dab7cf026ca226037397a3fd3d18 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 13:51:44 +0800 Subject: [PATCH 06/31] keyboards/framework/macropad: Data driven layout Signed-off-by: Daniel Schaefer --- keyboards/framework/framework.h | 2 -- keyboards/framework/macropad/info.json | 48 ++++++++++++------------- keyboards/framework/macropad/macropad.h | 18 ---------- 3 files changed, 24 insertions(+), 44 deletions(-) delete mode 100644 keyboards/framework/macropad/macropad.h diff --git a/keyboards/framework/framework.h b/keyboards/framework/framework.h index a11430fceb4..40247f0095b 100644 --- a/keyboards/framework/framework.h +++ b/keyboards/framework/framework.h @@ -13,8 +13,6 @@ # include "jis.h" #elif KEYBOARD_framework_numpad # include "numpad.h" -#elif KEYBOARD_framework_macropad -# include "macropad.h" #endif enum framework_keycodes { diff --git a/keyboards/framework/macropad/info.json b/keyboards/framework/macropad/info.json index 253e046a08e..4e4c344574d 100644 --- a/keyboards/framework/macropad/info.json +++ b/keyboards/framework/macropad/info.json @@ -27,35 +27,35 @@ "layouts": { "LAYOUT": { "layout": [ - { "x": 0, "y": 0, "h": 0.75 }, - { "x": 1.25, "y": 0, "h": 0.75 }, - { "x": 2.5, "y": 0, "h": 0.75 }, - { "x": 3.75, "y": 0, "h": 0.75 }, + { "matrix": [ 2, 1], "x": 0, "y": 0, "h": 0.75 }, + { "matrix": [ 2, 2], "x": 1.25, "y": 0, "h": 0.75 }, + { "matrix": [ 3, 4], "x": 2.5, "y": 0, "h": 0.75 }, + { "matrix": [ 2, 4], "x": 3.75, "y": 0, "h": 0.75 }, - { "x": 0, "y": 1, "h": 1.25 }, - { "x": 1.25, "y": 1, "h": 1.25 }, - { "x": 2.5, "y": 1, "h": 1.25 }, - { "x": 3.75, "y": 1, "h": 1.25 }, + { "matrix": [ 0, 0], "x": 0, "y": 1, "h": 1.25 }, + { "matrix": [ 0, 4], "x": 1.25, "y": 1, "h": 1.25 }, + { "matrix": [ 1, 1], "x": 2.5, "y": 1, "h": 1.25 }, + { "matrix": [ 1, 6], "x": 3.75, "y": 1, "h": 1.25 }, - { "x": 0, "y": 2.5, "h": 1.25 }, - { "x": 1.25, "y": 2.5, "h": 1.25 }, - { "x": 2.5, "y": 2.5, "h": 1.25 }, - { "x": 3.75, "y": 2.5, "h": 1.25 }, + { "matrix": [ 0, 1], "x": 0, "y": 2.5, "h": 1.25 }, + { "matrix": [ 0, 5], "x": 1.25, "y": 2.5, "h": 1.25 }, + { "matrix": [ 1, 2], "x": 2.5, "y": 2.5, "h": 1.25 }, + { "matrix": [ 2, 5], "x": 3.75, "y": 2.5, "h": 1.25 }, - { "x": 0, "y": 4, "h": 1.25 }, - { "x": 1.25, "y": 4, "h": 1.25 }, - { "x": 2.5, "y": 4, "h": 1.25 }, - { "x": 3.75, "y": 4, "h": 1.25 }, + { "matrix": [ 0, 2], "x": 0, "y": 4, "h": 1.25 }, + { "matrix": [ 0, 6], "x": 1.25, "y": 4, "h": 1.25 }, + { "matrix": [ 1, 3], "x": 2.5, "y": 4, "h": 1.25 }, + { "matrix": [ 1, 7], "x": 3.75, "y": 4, "h": 1.25 }, - { "x": 0, "y": 5.5, "h": 1.25 }, - { "x": 1.25, "y": 5.5, "h": 1.25 }, - { "x": 2.5, "y": 5.5, "h": 1.25 }, - { "x": 3.75, "y": 5.5, "h": 1.25 }, + { "matrix": [ 0, 3], "x": 0, "y": 5.5, "h": 1.25 }, + { "matrix": [ 0, 7], "x": 1.25, "y": 5.5, "h": 1.25 }, + { "matrix": [ 1, 4], "x": 2.5, "y": 5.5, "h": 1.25 }, + { "matrix": [ 2, 6], "x": 3.75, "y": 5.5, "h": 1.25 }, - { "x": 0, "y": 7, "w": 2.25, "h": 1.25 }, - { "x": 1.25, "y": 7, "h": 1.25 }, - { "x": 2.5, "y": 7, "h": 1.25 }, - { "x": 3.75, "y": 7, "h": 1.25 } + { "matrix": [ 1, 0], "x": 0, "y": 7, "w": 2.25, "h": 1.25 }, + { "matrix": [ 2, 7], "x": 1.25, "y": 7, "h": 1.25 }, + { "matrix": [ 1, 5], "x": 2.5, "y": 7, "h": 1.25 }, + { "matrix": [ 2, 0], "x": 3.75, "y": 7, "h": 1.25 } ] } } diff --git a/keyboards/framework/macropad/macropad.h b/keyboards/framework/macropad/macropad.h deleted file mode 100644 index 3976c21740b..00000000000 --- a/keyboards/framework/macropad/macropad.h +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -// clang-format off -#define LAYOUT( \ - H1, H2, H3, H4, \ - K90, K95, K100, K105, \ - K91, K96, K101, K107, \ - K92, K97, K102, K106, \ - K93, K98, K103, K109, \ - K99, K110, K104, K108 \ -) \ -{ \ - { K90, K91, K92, K93, K95, K96, K97, K98 }, \ - { K99, K100, K101, K102, K103, K104, K105, K106 }, \ - { K108, H1, H2, KC_NO, H4, K107, K109, K110 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, H3, KC_NO, KC_NO, KC_NO }, \ -} From a89d053080304e15326917057e8228f3ded07373 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 13:57:19 +0800 Subject: [PATCH 07/31] keyboards/framework/numpad: Use datadriven layout Signed-off-by: Daniel Schaefer --- keyboards/framework/numpad/info.json | 47 +++++++++++++++------------- keyboards/framework/numpad/numpad.h | 17 ---------- 2 files changed, 26 insertions(+), 38 deletions(-) diff --git a/keyboards/framework/numpad/info.json b/keyboards/framework/numpad/info.json index 475d101586b..ea62ff5c400 100644 --- a/keyboards/framework/numpad/info.json +++ b/keyboards/framework/numpad/info.json @@ -27,27 +27,32 @@ "layouts": { "LAYOUT": { "layout": [ - { "label": "ESC", "x": 0, "y": 0, "h": 0.75 }, - { "label": "+ -", "x": 1.25, "y": 0, "h": 0.75 }, - { "label": "=", "x": 2.5, "y": 0, "h": 0.75 }, - { "label": "<--", "x": 3.75, "y": 0, "h": 0.75 }, - { "label": "Num Lock", "x": 0, "y": 1, "h": 1.25 }, - { "label": "-", "x": 1.25, "y": 1, "h": 1.25 }, - { "label": "*", "x": 2.5, "y": 1, "h": 1.25 }, - { "label": "-", "x": 3.75, "y": 1, "h": 1.25 }, - { "label": "7", "x": 0, "y": 2.5, "h": 1.25 }, - { "label": "8", "x": 1.25, "y": 2.5, "h": 1.25 }, - { "label": "9", "x": 2.5, "y": 2.5, "h": 1.25 }, - { "label": "+", "x": 3.75, "y": 2.5, "h": 2.75 }, - { "label": "4", "x": 0, "y": 4, "h": 1.25 }, - { "label": "5", "x": 1.25, "y": 4, "h": 1.25 }, - { "label": "6", "x": 2.5, "y": 4, "h": 1.25 }, - { "label": "1", "x": 0, "y": 5.5, "h": 1.25 }, - { "label": "2", "x": 1.25, "y": 5.5, "h": 1.25 }, - { "label": "3", "x": 2.5, "y": 5.5, "h": 1.25 }, - { "label": "Enter", "x": 3.75, "y": 5.5, "h": 2.75 }, - { "label": "0", "x": 0, "y": 7, "w": 2.25, "h": 1.25 }, - { "label": ".", "x": 2.5, "y": 7, "h": 1.25 } + { "matrix": [ 2, 1], "label": "ESC", "x": 0, "y": 0, "h": 0.75 }, + { "matrix": [ 2, 2], "label": "+ -", "x": 1.25, "y": 0, "h": 0.75 }, + { "matrix": [ 3, 4], "label": "=", "x": 2.5, "y": 0, "h": 0.75 }, + { "matrix": [ 2, 4], "label": "<--", "x": 3.75, "y": 0, "h": 0.75 }, + + { "matrix": [ 0, 0], "label": "Num Lock", "x": 0, "y": 1, "h": 1.25 }, + { "matrix": [ 0, 4], "label": "-", "x": 1.25, "y": 1, "h": 1.25 }, + { "matrix": [ 1, 1], "label": "*", "x": 2.5, "y": 1, "h": 1.25 }, + { "matrix": [ 1, 6], "label": "-", "x": 3.75, "y": 1, "h": 1.25 }, + + { "matrix": [ 0, 1], "label": "7", "x": 0, "y": 2.5, "h": 1.25 }, + { "matrix": [ 0, 5], "label": "8", "x": 1.25, "y": 2.5, "h": 1.25 }, + { "matrix": [ 1, 2], "label": "9", "x": 2.5, "y": 2.5, "h": 1.25 }, + + { "matrix": [ 0, 2], "label": "4", "x": 0, "y": 4, "h": 1.25 }, + { "matrix": [ 0, 6], "label": "5", "x": 1.25, "y": 4, "h": 1.25 }, + { "matrix": [ 1, 3], "label": "6", "x": 2.5, "y": 4, "h": 1.25 }, + { "matrix": [ 1, 7], "label": "+", "x": 3.75, "y": 2.5, "h": 2.75 }, + + { "matrix": [ 0, 3], "label": "1", "x": 0, "y": 5.5, "h": 1.25 }, + { "matrix": [ 0, 7], "label": "2", "x": 1.25, "y": 5.5, "h": 1.25 }, + { "matrix": [ 1, 4], "label": "3", "x": 2.5, "y": 5.5, "h": 1.25 }, + + { "matrix": [ 1, 0], "label": "0", "x": 0, "y": 7, "w": 2.25, "h": 1.25 }, + { "matrix": [ 2, 7], "label": ".", "x": 2.5, "y": 7, "h": 1.25 } + { "matrix": [ 1, 5], "label": "Enter", "x": 3.75, "y": 5.5, "h": 2.75 }, ] } } diff --git a/keyboards/framework/numpad/numpad.h b/keyboards/framework/numpad/numpad.h index 001f5043dc8..50ef2eb2640 100644 --- a/keyboards/framework/numpad/numpad.h +++ b/keyboards/framework/numpad/numpad.h @@ -1,23 +1,6 @@ // Copyright 2022-2023 Framework Computer // SPDX-License-Identifier: GPL-2.0-or-later -// Same as macropad with a few keys removed -// clang-format off -#define LAYOUT( \ - H1, H2, H3, H4, \ - K90, K95, K100, K105, \ - K91, K96, K101, \ - K92, K97, K102, K106, \ - K93, K98, K103, \ - K99, K104, K108 \ -) \ -{ \ - { K90, K91, K92, K93, K95, K96, K97, K98 }, \ - { K99, K100, K101, K102, K103, K104, K105, K106 }, \ - { K108, H1, H2, KC_NO, H4, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, H3, KC_NO, KC_NO, KC_NO }, \ -} - enum _layers { _NUMLOCK, _FN From aa2f41b5a65ef738396d4c97fc653ef852d1f57b Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 13:57:43 +0800 Subject: [PATCH 08/31] keyboards/framework: numpad has no numlock LED Signed-off-by: Daniel Schaefer --- keyboards/framework/config.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/keyboards/framework/config.h b/keyboards/framework/config.h index fde442e8b05..653cd54f0b7 100644 --- a/keyboards/framework/config.h +++ b/keyboards/framework/config.h @@ -32,9 +32,6 @@ # define LED_CAPS_LOCK_PIN GP24 #elif KEYBOARD_framework_jis # define LED_CAPS_LOCK_PIN GP24 -#elif KEYBOARD_framework_numpad -# define LED_NUM_LOCK_PIN GP24 -#elif KEYBOARD_framework_macropad #endif // PWM single one backlight configuration From 23779a66d4cc85e1cccfe5e338b04720ba7f3674 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 14:14:27 +0800 Subject: [PATCH 09/31] keyboards/framework/ansi: Use datadriven layout Signed-off-by: Daniel Schaefer --- keyboards/framework/ansi/ansi.h | 23 ----- keyboards/framework/ansi/info.json | 161 +++++++++++++++-------------- keyboards/framework/framework.h | 4 +- 3 files changed, 84 insertions(+), 104 deletions(-) delete mode 100644 keyboards/framework/ansi/ansi.h diff --git a/keyboards/framework/ansi/ansi.h b/keyboards/framework/ansi/ansi.h deleted file mode 100644 index b6839b9da44..00000000000 --- a/keyboards/framework/ansi/ansi.h +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -// The layouts are all mostly the same, except for the extra keys that the different layouts have -// clang-format off -#define LAYOUT( \ - K110, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122, K123, K76, \ - K1, K2, K3, K4, K5, K6, K7, K8, K9, K10, K11, K12, K13, K15, \ - K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K43, \ - K44, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K57, \ - K58, K59, K127, K60, K61, K62, K64, K79, K83, K84, K89 \ -) \ -{ \ - { K48, K76, K17, K62, KC_NO, K47, K49, K52, K54, K57, K53, KC_NO, K64, K55, K41, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, K60, K61, K46, K50, K51, K84, K44, KC_NO, KC_NO, K58, K83, K43, K119 }, \ - { KC_NO, KC_NO, K59, KC_NO, K19, K113, K35, K36, K29, KC_NO, K118, KC_NO, KC_NO, K12, KC_NO, K89 }, \ - { KC_NO, K127, K16, KC_NO, K115, K112, K21, K22, K25, KC_NO, K117, K120, KC_NO, K123, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, K1, KC_NO, K30, K32, K6, K7, K121, KC_NO, K116, KC_NO, KC_NO, K11, K13, KC_NO }, \ - { KC_NO, KC_NO, K2, KC_NO, K4, K3, K5, K8, K10, KC_NO, K9, KC_NO, KC_NO, K26, K15, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K114, K18, K20, K23, K122, KC_NO, K24, K79, KC_NO, K27, K28, KC_NO }, \ - { KC_NO, KC_NO, K31, KC_NO, KC_NO, K110, K34, K37, K39, KC_NO, K38, KC_NO, KC_NO, K40, K33, KC_NO } \ -} diff --git a/keyboards/framework/ansi/info.json b/keyboards/framework/ansi/info.json index 299e04002c7..4920b3ecd92 100644 --- a/keyboards/framework/ansi/info.json +++ b/keyboards/framework/ansi/info.json @@ -30,84 +30,89 @@ "layouts": { "LAYOUT": { "layout": [ - { "label": "Esc", "x": 0, "y": 0, "w": 1.25, "h": 0.5 }, - { "label": "F1", "x": 1.5, "y": 0, "h": 0.5 }, - { "label": "F2", "x": 2.75, "y": 0, "h": 0.5 }, - { "label": "F3", "x": 4, "y": 0, "h": 0.5 }, - { "label": "F4", "x": 5.25, "y": 0, "h": 0.5 }, - { "label": "F5", "x": 6.5, "y": 0, "h": 0.5 }, - { "label": "F6", "x": 7.75, "y": 0, "h": 0.5 }, - { "label": "F7", "x": 9, "y": 0, "h": 0.5 }, - { "label": "F8", "x": 10.25, "y": 0, "h": 0.5 }, - { "label": "F9", "x": 11.5, "y": 0, "h": 0.5 }, - { "label": "F10", "x": 12.75, "y": 0, "h": 0.5 }, - { "label": "F11", "x": 14, "y": 0, "h": 0.5 }, - { "label": "F12", "x": 15.25, "y": 0, "h": 0.5 }, - { "label": "Delete", "x": 16.5, "y": 0, "w": 1.75, "h": 0.5 }, - { "label": "~", "x": 0, "y": 0.75 }, - { "label": "!", "x": 1.25, "y": 0.75 }, - { "label": "@", "x": 2.5, "y": 0.75 }, - { "label": "#", "x": 3.75, "y": 0.75 }, - { "label": "$", "x": 5, "y": 0.75 }, - { "label": "%", "x": 6.25, "y": 0.75 }, - { "label": "^", "x": 7.5, "y": 0.75 }, - { "label": "&", "x": 8.75, "y": 0.75 }, - { "label": "*", "x": 10, "y": 0.75 }, - { "label": "(", "x": 11.25, "y": 0.75 }, - { "label": ")", "x": 12.5, "y": 0.75 }, - { "label": "_", "x": 13.75, "y": 0.75 }, - { "label": "+", "x": 15, "y": 0.75 }, - { "label": "Backspace", "x": 16.25, "y": 0.75, "w": 2 }, - { "label": "Tab", "x": 0, "y": 2, "w": 1.5 }, - { "label": "Q", "x": 1.75, "y": 2 }, - { "label": "W", "x": 3, "y": 2 }, - { "label": "E", "x": 4.25, "y": 2 }, - { "label": "R", "x": 5.5, "y": 2 }, - { "label": "T", "x": 6.75, "y": 2 }, - { "label": "Y", "x": 8, "y": 2 }, - { "label": "U", "x": 9.25, "y": 2 }, - { "label": "I", "x": 10.5, "y": 2 }, - { "label": "O", "x": 11.75, "y": 2 }, - { "label": "P", "x": 13, "y": 2 }, - { "label": "{", "x": 14.25, "y": 2 }, - { "label": "}", "x": 15.5, "y": 2 }, - { "label": "|", "x": 16.75, "y": 2, "w": 1.5 }, - { "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, - { "label": "A", "x": 2, "y": 3.25 }, - { "label": "S", "x": 3.25, "y": 3.25 }, - { "label": "D", "x": 4.5, "y": 3.25 }, - { "label": "F", "x": 5.75, "y": 3.25 }, - { "label": "G", "x": 7, "y": 3.25 }, - { "label": "H", "x": 8.25, "y": 3.25 }, - { "label": "J", "x": 9.5, "y": 3.25 }, - { "label": "K", "x": 10.75, "y": 3.25 }, - { "label": "L", "x": 12, "y": 3.25 }, - { "label": ":", "x": 13.25, "y": 3.25 }, - { "label": "\"", "x": 14.5, "y": 3.25 }, - { "label": "Enter", "x": 15.75, "y": 3.25, "w": 2.5 }, - { "label": "Shift", "x": 0, "y": 4.5, "w": 2.5 }, - { "label": "Z", "x": 2.75, "y": 4.5 }, - { "label": "X", "x": 4, "y": 4.5 }, - { "label": "C", "x": 5.25, "y": 4.5 }, - { "label": "V", "x": 6.5, "y": 4.5 }, - { "label": "B", "x": 7.75, "y": 4.5 }, - { "label": "N", "x": 9, "y": 4.5 }, - { "label": "M", "x": 10.25, "y": 4.5 }, - { "label": "<", "x": 11.5, "y": 4.5 }, - { "label": ">", "x": 12.75, "y": 4.5 }, - { "label": "?", "x": 14, "y": 4.5 }, - { "label": "Shift", "x": 15.25, "y": 4.5, "w": 3 }, - { "label": "Ctrl", "x": 0, "y": 5.75, "w": 1.25 }, - { "label": "Fn", "x": 1.5, "y": 5.75 }, - { "label": "Win", "x": 2.75, "y": 5.75 }, - { "label": "Alt", "x": 4, "y": 5.75 }, - { "x": 5.25, "y": 5.75, "w": 6 }, - { "label": "Alt", "x": 11.5, "y": 5.75 }, - { "label": "Ctrl", "x": 12.75, "y": 5.75 }, - { "label": "←", "x": 14, "y": 5.75, "w": 1.25 }, - { "label": "↑", "x": 15.5, "y": 5.75, "w": 1.25, "h": 0.5 }, - { "label": "→", "x": 17, "y": 5.75, "w": 1.25 }, - { "label": "↓", "x": 15.5, "y": 6.25, "w": 1.25, "h": 0.5 } + { "matrix": [7, 5], "label": "Esc", "x": 0, "y": 0, "w": 1.25, "h": 0.5 }, + { "matrix": [3, 5], "label": "F1", "x": 1.5, "y": 0, "h": 0.5 }, + { "matrix": [2, 5], "label": "F2", "x": 2.75, "y": 0, "h": 0.5 }, + { "matrix": [6, 4], "label": "F3", "x": 4, "y": 0, "h": 0.5 }, + { "matrix": [3, 4], "label": "F4", "x": 5.25, "y": 0, "h": 0.5 }, + { "matrix": [4, 10], "label": "F5", "x": 6.5, "y": 0, "h": 0.5 }, + { "matrix": [3, 10], "label": "F6", "x": 7.75, "y": 0, "h": 0.5 }, + { "matrix": [2, 10], "label": "F7", "x": 9, "y": 0, "h": 0.5 }, + { "matrix": [1, 15], "label": "F8", "x": 10.25, "y": 0, "h": 0.5 }, + { "matrix": [3, 11], "label": "F9", "x": 11.5, "y": 0, "h": 0.5 }, + { "matrix": [4, 8], "label": "F10", "x": 12.75, "y": 0, "h": 0.5 }, + { "matrix": [6, 8], "label": "F11", "x": 14, "y": 0, "h": 0.5 }, + { "matrix": [3, 13], "label": "F12", "x": 15.25, "y": 0, "h": 0.5 }, + { "matrix": [0, 1], "label": "Delete", "x": 16.5, "y": 0, "w": 1.75, "h": 0.5 }, + + { "matrix": [4, 2], "label": "~", "x": 0, "y": 0.75 }, + { "matrix": [5, 2], "label": "!", "x": 1.25, "y": 0.75 }, + { "matrix": [5, 5], "label": "@", "x": 2.5, "y": 0.75 }, + { "matrix": [5, 4], "label": "#", "x": 3.75, "y": 0.75 }, + { "matrix": [5, 6], "label": "$", "x": 5, "y": 0.75 }, + { "matrix": [4, 6], "label": "%", "x": 6.25, "y": 0.75 }, + { "matrix": [4, 7], "label": "^", "x": 7.5, "y": 0.75 }, + { "matrix": [5, 7], "label": "&", "x": 8.75, "y": 0.75 }, + { "matrix": [5, 10], "label": "*", "x": 10, "y": 0.75 }, + { "matrix": [5, 8], "label": "(", "x": 11.25, "y": 0.75 }, + { "matrix": [4, 13], "label": ")", "x": 12.5, "y": 0.75 }, + { "matrix": [2, 13], "label": "_", "x": 13.75, "y": 0.75 }, + { "matrix": [4, 14], "label": "+", "x": 15, "y": 0.75 }, + { "matrix": [5, 14], "label": "Backspace", "x": 16.25, "y": 0.75, "w": 2 }, + + { "matrix": [3, 2], "label": "Tab", "x": 0, "y": 2, "w": 1.5 }, + { "matrix": [0, 2], "label": "Q", "x": 1.75, "y": 2 }, + { "matrix": [6, 5], "label": "W", "x": 3, "y": 2 }, + { "matrix": [2, 4], "label": "E", "x": 4.25, "y": 2 }, + { "matrix": [6, 6], "label": "R", "x": 5.5, "y": 2 }, + { "matrix": [3, 6], "label": "T", "x": 6.75, "y": 2 }, + { "matrix": [3, 7], "label": "Y", "x": 8, "y": 2 }, + { "matrix": [6, 7], "label": "U", "x": 9.25, "y": 2 }, + { "matrix": [6, 10], "label": "I", "x": 10.5, "y": 2 }, + { "matrix": [3, 8], "label": "O", "x": 11.75, "y": 2 }, + { "matrix": [5, 13], "label": "P", "x": 13, "y": 2 }, + { "matrix": [6, 13], "label": "{", "x": 14.25, "y": 2 }, + { "matrix": [6, 14], "label": "}", "x": 15.5, "y": 2 }, + { "matrix": [2, 8], "label": "|", "x": 16.75, "y": 2, "w": 1.5 }, + + { "matrix": [4, 4], "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, + { "matrix": [7, 2], "label": "A", "x": 2, "y": 3.25 }, + { "matrix": [4, 5], "label": "S", "x": 3.25, "y": 3.25 }, + { "matrix": [7, 14], "label": "D", "x": 4.5, "y": 3.25 }, + { "matrix": [7, 6], "label": "F", "x": 5.75, "y": 3.25 }, + { "matrix": [2, 6], "label": "G", "x": 7, "y": 3.25 }, + { "matrix": [2, 7], "label": "H", "x": 8.25, "y": 3.25 }, + { "matrix": [7, 7], "label": "J", "x": 9.5, "y": 3.25 }, + { "matrix": [7, 10], "label": "K", "x": 10.75, "y": 3.25 }, + { "matrix": [7, 8], "label": "L", "x": 12, "y": 3.25 }, + { "matrix": [7, 13], "label": ":", "x": 13.25, "y": 3.25 }, + { "matrix": [0, 14], "label": "\"", "x": 14.5, "y": 3.25 }, + { "matrix": [1, 14], "label": "Enter", "x": 15.75, "y": 3.25, "w": 2.5 }, + + { "matrix": [1, 9], "label": "Shift", "x": 0, "y": 4.5, "w": 2.5 }, + { "matrix": [1, 5], "label": "Z", "x": 2.75, "y": 4.5 }, + { "matrix": [0, 5], "label": "X", "x": 4, "y": 4.5 }, + { "matrix": [0, 0], "label": "C", "x": 5.25, "y": 4.5 }, + { "matrix": [0, 6], "label": "V", "x": 6.5, "y": 4.5 }, + { "matrix": [1, 6], "label": "B", "x": 7.75, "y": 4.5 }, + { "matrix": [1, 7], "label": "N", "x": 9, "y": 4.5 }, + { "matrix": [0, 7], "label": "M", "x": 10.25, "y": 4.5 }, + { "matrix": [0, 10], "label": "<", "x": 11.5, "y": 4.5 }, + { "matrix": [0, 8], "label": ">", "x": 12.75, "y": 4.5 }, + { "matrix": [0, 13], "label": "?", "x": 14, "y": 4.5 }, + { "matrix": [0, 9], "label": "Shift", "x": 15.25, "y": 4.5, "w": 3 }, + + { "matrix": [1, 12], "label": "Ctrl", "x": 0, "y": 5.75, "w": 1.25 }, + { "matrix": [2, 2], "label": "Fn", "x": 1.5, "y": 5.75 }, + { "matrix": [3, 1], "label": "Win", "x": 2.75, "y": 5.75 }, + { "matrix": [1, 3], "label": "Alt", "x": 4, "y": 5.75 }, + { "matrix": [1, 4], "label": "Space", "x": 5.25, "y": 5.75, "w": 6 }, + { "matrix": [0, 3], "label": "Alt", "x": 11.5, "y": 5.75 }, + { "matrix": [0, 12], "label": "Ctrl", "x": 12.75, "y": 5.75 }, + { "matrix": [6, 11], "label": "←", "x": 14, "y": 5.75, "w": 1.25 }, + { "matrix": [1, 13], "label": "↑", "x": 15.5, "y": 5.75, "w": 1.25, "h": 0.5 }, + { "matrix": [1, 8], "label": "→", "x": 17, "y": 5.75, "w": 1.25 }, + { "matrix": [2, 15], "label": "↓", "x": 15.5, "y": 6.25, "w": 1.25, "h": 0.5 } ] } } diff --git a/keyboards/framework/framework.h b/keyboards/framework/framework.h index 40247f0095b..12949398915 100644 --- a/keyboards/framework/framework.h +++ b/keyboards/framework/framework.h @@ -5,9 +5,7 @@ #include "quantum.h" -#ifdef KEYBOARD_framework_ansi -# include "ansi.h" -#elif KEYBOARD_framework_iso +#if KEYBOARD_framework_iso # include "iso.h" #elif KEYBOARD_framework_jis # include "jis.h" From d4f5b9d3883e9abb9da736458dc1399e6ffd45c9 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 14:46:45 +0800 Subject: [PATCH 10/31] keyboards/framework/iso: Use datadriven layout Signed-off-by: Daniel Schaefer --- keyboards/framework/framework.h | 4 +- keyboards/framework/iso/info.json | 163 +++++++++++++++--------------- keyboards/framework/iso/iso.h | 23 ----- 3 files changed, 85 insertions(+), 105 deletions(-) delete mode 100644 keyboards/framework/iso/iso.h diff --git a/keyboards/framework/framework.h b/keyboards/framework/framework.h index 12949398915..f352bbc198e 100644 --- a/keyboards/framework/framework.h +++ b/keyboards/framework/framework.h @@ -5,9 +5,7 @@ #include "quantum.h" -#if KEYBOARD_framework_iso -# include "iso.h" -#elif KEYBOARD_framework_jis +#if KEYBOARD_framework_jis # include "jis.h" #elif KEYBOARD_framework_numpad # include "numpad.h" diff --git a/keyboards/framework/iso/info.json b/keyboards/framework/iso/info.json index d835b7328b8..89ee7464480 100644 --- a/keyboards/framework/iso/info.json +++ b/keyboards/framework/iso/info.json @@ -27,85 +27,90 @@ "layouts": { "LAYOUT": { "layout": [ - { "label": "Esc", "x": 0, "y": 0, "w": 1.25, "h": 0.5 }, - { "label": "F1", "x": 1.5, "y": 0, "h": 0.5 }, - { "label": "F2", "x": 2.75, "y": 0, "h": 0.5 }, - { "label": "F3", "x": 4, "y": 0, "h": 0.5 }, - { "label": "F4", "x": 5.25, "y": 0, "h": 0.5 }, - { "label": "F5", "x": 6.5, "y": 0, "h": 0.5 }, - { "label": "F6", "x": 7.75, "y": 0, "h": 0.5 }, - { "label": "F7", "x": 9, "y": 0, "h": 0.5 }, - { "label": "F8", "x": 10.25, "y": 0, "h": 0.5 }, - { "label": "F9", "x": 11.5, "y": 0, "h": 0.5 }, - { "label": "F10", "x": 12.75, "y": 0, "h": 0.5 }, - { "label": "F11", "x": 14, "y": 0, "h": 0.5 }, - { "label": "F12", "x": 15.25, "y": 0, "h": 0.5 }, - { "label": "Delete", "x": 16.5, "y": 0, "w": 1.75, "h": 0.5 }, - { "label": "~", "x": 0, "y": 0.75 }, - { "label": "!", "x": 1.25, "y": 0.75 }, - { "label": "\"", "x": 2.5, "y": 0.75 }, - { "label": "", "x": 3.75, "y": 0.75 }, - { "label": "$", "x": 5, "y": 0.75 }, - { "label": "%", "x": 6.25, "y": 0.75 }, - { "label": "^", "x": 7.5, "y": 0.75 }, - { "label": "&", "x": 8.75, "y": 0.75 }, - { "label": "*", "x": 10, "y": 0.75 }, - { "label": "(", "x": 11.25, "y": 0.75 }, - { "label": ")", "x": 12.5, "y": 0.75 }, - { "label": "_", "x": 13.75, "y": 0.75 }, - { "label": "+", "x": 15, "y": 0.75 }, - { "label": "Backspace", "x": 16.25, "y": 0.75, "w": 2 }, - { "label": "Tab", "x": 0, "y": 2, "w": 1.5 }, - { "label": "Q", "x": 1.75, "y": 2 }, - { "label": "W", "x": 3, "y": 2 }, - { "label": "E", "x": 4.25, "y": 2 }, - { "label": "R", "x": 5.5, "y": 2 }, - { "label": "T", "x": 6.75, "y": 2 }, - { "label": "Y", "x": 8, "y": 2 }, - { "label": "U", "x": 9.25, "y": 2 }, - { "label": "I", "x": 10.5, "y": 2 }, - { "label": "O", "x": 11.75, "y": 2 }, - { "label": "P", "x": 13, "y": 2 }, - { "label": "{", "x": 14.25, "y": 2 }, - { "label": "}", "x": 15.5, "y": 2 }, - { "label": "Enter", "x": 17, "y": 2, "w": 1.25, "h": 2.25 }, - { "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, - { "label": "A", "x": 2, "y": 3.25 }, - { "label": "S", "x": 3.25, "y": 3.25 }, - { "label": "D", "x": 4.5, "y": 3.25 }, - { "label": "F", "x": 5.75, "y": 3.25 }, - { "label": "G", "x": 7, "y": 3.25 }, - { "label": "H", "x": 8.25, "y": 3.25 }, - { "label": "J", "x": 9.5, "y": 3.25 }, - { "label": "K", "x": 10.75, "y": 3.25 }, - { "label": "L", "x": 12, "y": 3.25 }, - { "label": ":", "x": 13.25, "y": 3.25 }, - { "label": "@", "x": 14.5, "y": 3.25 }, - { "label": "~", "x": 15.75, "y": 3.25 }, - { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, - { "label": "|", "x": 1.5, "y": 4.5 }, - { "label": "Z", "x": 2.75, "y": 4.5 }, - { "label": "X", "x": 4, "y": 4.5 }, - { "label": "C", "x": 5.25, "y": 4.5 }, - { "label": "V", "x": 6.5, "y": 4.5 }, - { "label": "B", "x": 7.75, "y": 4.5 }, - { "label": "N", "x": 9, "y": 4.5 }, - { "label": "M", "x": 10.25, "y": 4.5 }, - { "label": "<", "x": 11.5, "y": 4.5 }, - { "label": ">", "x": 12.75, "y": 4.5 }, - { "label": "?", "x": 14, "y": 4.5 }, - { "label": "Shift", "x": 15.25, "y": 4.5, "w": 3 }, - { "label": "Ctrl", "x": 0, "y": 5.75, "w": 1.25 }, - { "label": "Fn", "x": 1.5, "y": 5.75 }, - { "label": "Win", "x": 2.75, "y": 5.75 }, - { "label": "Alt", "x": 4, "y": 5.75 }, - { "x": 5.25, "y": 5.75, "w": 6 }, - { "label": "Alt", "x": 11.5, "y": 5.75 }, - { "label": "Ctrl", "x": 12.75, "y": 5.75 }, - { "label": "←", "x": 14, "y": 5.75, "w": 1.25 }, - { "label": "↑", "x": 15.5, "y": 5.75, "w": 1.25, "h": 0.5 }, - { "label": "→", "x": 17, "y": 5.75, "w": 1.25 }, - { "label": "↓", "x": 15.5, "y": 6.25, "w": 1.25, "h": 0.5 } + { "matrix": [7, 5], "label": "Esc", "x": 0, "y": 0, "w": 1.25, "h": 0.5 }, + { "matrix": [3, 5], "label": "F1", "x": 1.5, "y": 0, "h": 0.5 }, + { "matrix": [2, 5], "label": "F2", "x": 2.75, "y": 0, "h": 0.5 }, + { "matrix": [6, 4], "label": "F3", "x": 4, "y": 0, "h": 0.5 }, + { "matrix": [3, 4], "label": "F4", "x": 5.25, "y": 0, "h": 0.5 }, + { "matrix": [4, 10], "label": "F5", "x": 6.5, "y": 0, "h": 0.5 }, + { "matrix": [3, 10], "label": "F6", "x": 7.75, "y": 0, "h": 0.5 }, + { "matrix": [2, 10], "label": "F7", "x": 9, "y": 0, "h": 0.5 }, + { "matrix": [1, 15], "label": "F8", "x": 10.25, "y": 0, "h": 0.5 }, + { "matrix": [3, 11], "label": "F9", "x": 11.5, "y": 0, "h": 0.5 }, + { "matrix": [4, 8], "label": "F10", "x": 12.75, "y": 0, "h": 0.5 }, + { "matrix": [6, 8], "label": "F11", "x": 14, "y": 0, "h": 0.5 }, + { "matrix": [3, 13], "label": "F12", "x": 15.25, "y": 0, "h": 0.5 }, + { "matrix": [0, 1], "label": "Delete", "x": 16.5, "y": 0, "w": 1.75, "h": 0.5 }, + + { "matrix": [4, 2], "label": "~", "x": 0, "y": 0.75 }, + { "matrix": [5, 2], "label": "!", "x": 1.25, "y": 0.75 }, + { "matrix": [5, 5], "label": "\"", "x": 2.5, "y": 0.75 }, + { "matrix": [5, 4], "label": "", "x": 3.75, "y": 0.75 }, + { "matrix": [5, 6], "label": "$", "x": 5, "y": 0.75 }, + { "matrix": [4, 6], "label": "%", "x": 6.25, "y": 0.75 }, + { "matrix": [4, 7], "label": "^", "x": 7.5, "y": 0.75 }, + { "matrix": [5, 7], "label": "&", "x": 8.75, "y": 0.75 }, + { "matrix": [5, 10], "label": "*", "x": 10, "y": 0.75 }, + { "matrix": [5, 8], "label": "(", "x": 11.25, "y": 0.75 }, + { "matrix": [4, 13], "label": ")", "x": 12.5, "y": 0.75 }, + { "matrix": [2, 13], "label": "_", "x": 13.75, "y": 0.75 }, + { "matrix": [4, 14], "label": "+", "x": 15, "y": 0.75 }, + { "matrix": [5, 14], "label": "Backspace", "x": 16.25, "y": 0.75, "w": 2 }, + + { "matrix": [3, 2], "label": "Tab", "x": 0, "y": 2, "w": 1.5 }, + { "matrix": [0, 2], "label": "Q", "x": 1.75, "y": 2 }, + { "matrix": [6, 5], "label": "W", "x": 3, "y": 2 }, + { "matrix": [2, 4], "label": "E", "x": 4.25, "y": 2 }, + { "matrix": [6, 6], "label": "R", "x": 5.5, "y": 2 }, + { "matrix": [3, 6], "label": "T", "x": 6.75, "y": 2 }, + { "matrix": [3, 7], "label": "Y", "x": 8, "y": 2 }, + { "matrix": [6, 7], "label": "U", "x": 9.25, "y": 2 }, + { "matrix": [6, 10], "label": "I", "x": 10.5, "y": 2 }, + { "matrix": [3, 8], "label": "O", "x": 11.75, "y": 2 }, + { "matrix": [5, 13], "label": "P", "x": 13, "y": 2 }, + { "matrix": [6, 13], "label": "{", "x": 14.25, "y": 2 }, + { "matrix": [6, 14], "label": "}", "x": 15.5, "y": 2 }, + + { "matrix": [4, 4], "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, + { "matrix": [7, 2], "label": "A", "x": 2, "y": 3.25 }, + { "matrix": [4, 5], "label": "S", "x": 3.25, "y": 3.25 }, + { "matrix": [7, 14], "label": "D", "x": 4.5, "y": 3.25 }, + { "matrix": [7, 6], "label": "F", "x": 5.75, "y": 3.25 }, + { "matrix": [2, 6], "label": "G", "x": 7, "y": 3.25 }, + { "matrix": [2, 7], "label": "H", "x": 8.25, "y": 3.25 }, + { "matrix": [7, 7], "label": "J", "x": 9.5, "y": 3.25 }, + { "matrix": [7, 10], "label": "K", "x": 10.75, "y": 3.25 }, + { "matrix": [7, 8], "label": "L", "x": 12, "y": 3.25 }, + { "matrix": [7, 13], "label": ":", "x": 13.25, "y": 3.25 }, + { "matrix": [0, 14], "label": "@", "x": 14.5, "y": 3.25 }, + { "matrix": [2, 8], "label": "~", "x": 15.75, "y": 3.25 }, + { "matrix": [1, 14], "label": "Enter", "x": 17, "y": 2, "w": 1.25, "h": 2.25 }, + + { "matrix": [1, 9], "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, + { "matrix": [5, 11], "label": "|", "x": 1.5, "y": 4.5 }, + { "matrix": [1, 5], "label": "Z", "x": 2.75, "y": 4.5 }, + { "matrix": [0, 5], "label": "X", "x": 4, "y": 4.5 }, + { "matrix": [0, 0], "label": "C", "x": 5.25, "y": 4.5 }, + { "matrix": [0, 6], "label": "V", "x": 6.5, "y": 4.5 }, + { "matrix": [1, 6], "label": "B", "x": 7.75, "y": 4.5 }, + { "matrix": [1, 7], "label": "N", "x": 9, "y": 4.5 }, + { "matrix": [0, 7], "label": "M", "x": 10.25, "y": 4.5 }, + { "matrix": [0, 10], "label": "<", "x": 11.5, "y": 4.5 }, + { "matrix": [0, 8], "label": ">", "x": 12.75, "y": 4.5 }, + { "matrix": [0, 13], "label": "?", "x": 14, "y": 4.5 }, + { "matrix": [0, 9], "label": "Shift", "x": 15.25, "y": 4.5, "w": 3 }, + + { "matrix": [1, 12], "label": "Ctrl", "x": 0, "y": 5.75, "w": 1.25 }, + { "matrix": [2, 2], "label": "Fn", "x": 1.5, "y": 5.75 }, + { "matrix": [3, 1], "label": "Win", "x": 2.75, "y": 5.75 }, + { "matrix": [1, 3], "label": "Alt", "x": 4, "y": 5.75 }, + { "matrix": [1, 4], "label": "Space", "x": 5.25, "y": 5.75, "w": 6 }, + { "matrix": [0, 3], "label": "Alt", "x": 11.5, "y": 5.75 }, + { "matrix": [0, 12], "label": "Ctrl", "x": 12.75, "y": 5.75 }, + { "matrix": [6, 11], "label": "←", "x": 14, "y": 5.75, "w": 1.25 }, + { "matrix": [1, 13], "label": "↑", "x": 15.5, "y": 5.75, "w": 1.25, "h": 0.5 }, + { "matrix": [1, 8], "label": "→", "x": 17, "y": 5.75, "w": 1.25 }, + { "matrix": [2, 15], "label": "↓", "x": 15.5, "y": 6.25, "w": 1.25, "h": 0.5 } ] } } diff --git a/keyboards/framework/iso/iso.h b/keyboards/framework/iso/iso.h deleted file mode 100644 index 01c84b9d000..00000000000 --- a/keyboards/framework/iso/iso.h +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -// K29/K42 swapped in ANSI/ISO -// clang-format off -#define LAYOUT( \ - K110, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122, K123, K76, \ - K1, K2, K3, K4, K5, K6, K7, K8, K9, K10, K11, K12, K13, K15, \ - K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, \ - K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K57, \ - K58, K59, K127, K60, K61, K62, K64, K79, K83, K84, K89 \ -) \ -{ \ - { K48, K76, K17, K62, KC_NO, K47, K49, K52, K54, K57, K53, KC_NO, K64, K55, K41, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, K60, K61, K46, K50, K51, K84, K44, KC_NO, KC_NO, K58, K83, K43, K119 }, \ - { KC_NO, KC_NO, K59, KC_NO, K19, K113, K35, K36, K42, KC_NO, K118, KC_NO, KC_NO, K12, KC_NO, K89 }, \ - { KC_NO, K127, K16, KC_NO, K115, K112, K21, K22, K25, KC_NO, K117, K120, KC_NO, K123, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, K1, KC_NO, K30, K32, K6, K7, K121, KC_NO, K116, KC_NO, KC_NO, K11, K13, KC_NO }, \ - { KC_NO, KC_NO, K2, KC_NO, K4, K3, K5, K8, K10, KC_NO, K9, K45, KC_NO, K26, K15, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K114, K18, K20, K23, K122, KC_NO, K24, K79, KC_NO, K27, K28, KC_NO }, \ - { KC_NO, KC_NO, K31, KC_NO, KC_NO, K110, K34, K37, K39, KC_NO, K38, KC_NO, KC_NO, K40, K33, KC_NO }, \ -} From 6d709735cc17be63a176f0f5257ba5c9504d416e Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 15:04:26 +0800 Subject: [PATCH 11/31] keyboards/framework/jis: Use datadriven layout Signed-off-by: Daniel Schaefer --- keyboards/framework/framework.h | 4 +- keyboards/framework/jis/info.json | 171 +++++++++++++++--------------- keyboards/framework/jis/jis.h | 23 ---- 3 files changed, 89 insertions(+), 109 deletions(-) delete mode 100644 keyboards/framework/jis/jis.h diff --git a/keyboards/framework/framework.h b/keyboards/framework/framework.h index f352bbc198e..6007ec058bf 100644 --- a/keyboards/framework/framework.h +++ b/keyboards/framework/framework.h @@ -5,9 +5,7 @@ #include "quantum.h" -#if KEYBOARD_framework_jis -# include "jis.h" -#elif KEYBOARD_framework_numpad +#if KEYBOARD_framework_numpad # include "numpad.h" #endif diff --git a/keyboards/framework/jis/info.json b/keyboards/framework/jis/info.json index 92c93530556..df80b8575c5 100644 --- a/keyboards/framework/jis/info.json +++ b/keyboards/framework/jis/info.json @@ -27,89 +27,94 @@ "layouts": { "LAYOUT": { "layout": [ - { "label": "Esc", "x": 0, "y": 0, "w": 1.25, "h": 0.5 }, - { "label": "F1", "x": 1.5, "y": 0, "h": 0.5 }, - { "label": "F2", "x": 2.75, "y": 0, "h": 0.5 }, - { "label": "F3", "x": 4, "y": 0, "h": 0.5 }, - { "label": "F4", "x": 5.25, "y": 0, "h": 0.5 }, - { "label": "F5", "x": 6.5, "y": 0, "h": 0.5 }, - { "label": "F6", "x": 7.75, "y": 0, "h": 0.5 }, - { "label": "F7", "x": 9, "y": 0, "h": 0.5 }, - { "label": "F8", "x": 10.25, "y": 0, "h": 0.5 }, - { "label": "F9", "x": 11.5, "y": 0, "h": 0.5 }, - { "label": "F10", "x": 12.75, "y": 0, "h": 0.5 }, - { "label": "F11", "x": 14, "y": 0, "h": 0.5 }, - { "label": "F12", "x": 15.25, "y": 0, "h": 0.5 }, - { "label": "Delete", "x": 16.5, "y": 0, "w": 1.75, "h": 0.5 }, - { "label": "~", "x": 0, "y": 0.75 }, - { "label": "!", "x": 1.25, "y": 0.75 }, - { "label": "\"", "x": 2.5, "y": 0.75 }, - { "label": "", "x": 3.75, "y": 0.75 }, - { "label": "$", "x": 5, "y": 0.75 }, - { "label": "%", "x": 6.25, "y": 0.75 }, - { "label": "^", "x": 7.5, "y": 0.75 }, - { "label": "&", "x": 8.75, "y": 0.75 }, - { "label": "*", "x": 10, "y": 0.75 }, - { "label": "(", "x": 11.25, "y": 0.75 }, - { "label": ")", "x": 12.5, "y": 0.75 }, - { "label": "_", "x": 13.75, "y": 0.75 }, - { "label": "+", "x": 15, "y": 0.75 }, - { "x": 16.25, "y": 0.75, "w": 0.5 }, - { "label": "Backsp", "x": 17, "y": 0.75, "w": 1.25 }, - { "label": "Tab", "x": 0, "y": 2, "w": 1.5 }, - { "label": "Q", "x": 1.75, "y": 2 }, - { "label": "W", "x": 3, "y": 2 }, - { "label": "E", "x": 4.25, "y": 2 }, - { "label": "R", "x": 5.5, "y": 2 }, - { "label": "T", "x": 6.75, "y": 2 }, - { "label": "Y", "x": 8, "y": 2 }, - { "label": "U", "x": 9.25, "y": 2 }, - { "label": "I", "x": 10.5, "y": 2 }, - { "label": "O", "x": 11.75, "y": 2 }, - { "label": "P", "x": 13, "y": 2 }, - { "label": "{", "x": 14.25, "y": 2 }, - { "label": "}", "x": 15.5, "y": 2 }, - { "label": "Enter", "x": 17, "y": 2, "w": 1.25, "h": 2.25 }, - { "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, - { "label": "A", "x": 2, "y": 3.25 }, - { "label": "S", "x": 3.25, "y": 3.25 }, - { "label": "D", "x": 4.5, "y": 3.25 }, - { "label": "F", "x": 5.75, "y": 3.25 }, - { "label": "G", "x": 7, "y": 3.25 }, - { "label": "H", "x": 8.25, "y": 3.25 }, - { "label": "J", "x": 9.5, "y": 3.25 }, - { "label": "K", "x": 10.75, "y": 3.25 }, - { "label": "L", "x": 12, "y": 3.25 }, - { "label": ":", "x": 13.25, "y": 3.25 }, - { "label": "@", "x": 14.5, "y": 3.25 }, - { "label": "~", "x": 15.75, "y": 3.25 }, - { "label": "Shift", "x": 0, "y": 4.5, "w": 2.5 }, - { "label": "Z", "x": 2.75, "y": 4.5 }, - { "label": "X", "x": 4, "y": 4.5 }, - { "label": "C", "x": 5.25, "y": 4.5 }, - { "label": "V", "x": 6.5, "y": 4.5 }, - { "label": "B", "x": 7.75, "y": 4.5 }, - { "label": "N", "x": 9, "y": 4.5 }, - { "label": "M", "x": 10.25, "y": 4.5 }, - { "label": "<", "x": 11.5, "y": 4.5 }, - { "label": ">", "x": 12.75, "y": 4.5 }, - { "label": "?", "x": 14, "y": 4.5 }, - { "x": 15.25, "y": 4.5 }, - { "label": "Shift", "x": 16.5, "y": 4.5, "w": 1.75 }, - { "label": "Ctrl", "x": 0, "y": 5.75, "w": 1.25 }, - { "label": "Fn", "x": 1.5, "y": 5.75 }, - { "label": "Win", "x": 2.75, "y": 5.75 }, - { "label": "Alt", "x": 4, "y": 5.75 }, - { "x": 5.25, "y": 5.75, "w": 0.5 }, - { "x": 6, "y": 5.75, "w": 3.75 }, - { "x": 10, "y": 5.75, "w": 0.5 }, - { "x": 10.75, "y": 5.75, "w": 0.5 }, - { "label": "Alt", "x": 11.5, "y": 5.75 }, - { "label": "Ctrl", "x": 12.75, "y": 5.75 }, - { "label": "←", "x": 14, "y": 5.75, "w": 1.25 }, - { "label": "↑", "x": 15.5, "y": 5.75, "w": 1.25, "h": 0.5 }, - { "label": "→", "x": 17, "y": 5.75, "w": 1.25 }, - { "label": "↓", "x": 15.5, "y": 6.25, "w": 1.25, "h": 0.5 } + { "matrix": [7, 5], "label": "Esc", "x": 0, "y": 0, "w": 1.25, "h": 0.5 }, + { "matrix": [3, 5], "label": "F1", "x": 1.5, "y": 0, "h": 0.5 }, + { "matrix": [2, 5], "label": "F2", "x": 2.75, "y": 0, "h": 0.5 }, + { "matrix": [6, 4], "label": "F3", "x": 4, "y": 0, "h": 0.5 }, + { "matrix": [3, 4], "label": "F4", "x": 5.25, "y": 0, "h": 0.5 }, + { "matrix": [4, 10], "label": "F5", "x": 6.5, "y": 0, "h": 0.5 }, + { "matrix": [3, 10], "label": "F6", "x": 7.75, "y": 0, "h": 0.5 }, + { "matrix": [2, 10], "label": "F7", "x": 9, "y": 0, "h": 0.5 }, + { "matrix": [1, 15], "label": "F8", "x": 10.25, "y": 0, "h": 0.5 }, + { "matrix": [3, 11], "label": "F9", "x": 11.5, "y": 0, "h": 0.5 }, + { "matrix": [4, 8], "label": "F10", "x": 12.75, "y": 0, "h": 0.5 }, + { "matrix": [6, 8], "label": "F11", "x": 14, "y": 0, "h": 0.5 }, + { "matrix": [3, 13], "label": "F12", "x": 15.25, "y": 0, "h": 0.5 }, + { "matrix": [0, 1], "label": "Delete", "x": 16.5, "y": 0, "w": 1.75, "h": 0.5 }, + + { "matrix": [4, 2], "label": "~", "x": 0, "y": 0.75 }, + { "matrix": [5, 2], "label": "!", "x": 1.25, "y": 0.75 }, + { "matrix": [5, 5], "label": "\"", "x": 2.5, "y": 0.75 }, + { "matrix": [5, 4], "label": "", "x": 3.75, "y": 0.75 }, + { "matrix": [5, 6], "label": "$", "x": 5, "y": 0.75 }, + { "matrix": [4, 6], "label": "%", "x": 6.25, "y": 0.75 }, + { "matrix": [4, 7], "label": "^", "x": 7.5, "y": 0.75 }, + { "matrix": [5, 7], "label": "&", "x": 8.75, "y": 0.75 }, + { "matrix": [5, 10], "label": "*", "x": 10, "y": 0.75 }, + { "matrix": [5, 8], "label": "(", "x": 11.25, "y": 0.75 }, + { "matrix": [4, 13], "label": ")", "x": 12.5, "y": 0.75 }, + { "matrix": [2, 13], "label": "_", "x": 13.75, "y": 0.75 }, + { "matrix": [4, 14], "label": "+", "x": 15, "y": 0.75 }, + { "matrix": [0, 15], "x": 16.25, "y": 0.75, "w": 0.5 }, + { "matrix": [5, 14], "label": "Backsp", "x": 17, "y": 0.75, "w": 1.25 }, + + { "matrix": [3, 2], "label": "Tab", "x": 0, "y": 2, "w": 1.5 }, + { "matrix": [0, 2], "label": "Q", "x": 1.75, "y": 2 }, + { "matrix": [6, 5], "label": "W", "x": 3, "y": 2 }, + { "matrix": [2, 4], "label": "E", "x": 4.25, "y": 2 }, + { "matrix": [6, 6], "label": "R", "x": 5.5, "y": 2 }, + { "matrix": [3, 6], "label": "T", "x": 6.75, "y": 2 }, + { "matrix": [3, 7], "label": "Y", "x": 8, "y": 2 }, + { "matrix": [6, 7], "label": "U", "x": 9.25, "y": 2 }, + { "matrix": [6, 10], "label": "I", "x": 10.5, "y": 2 }, + { "matrix": [3, 8], "label": "O", "x": 11.75, "y": 2 }, + { "matrix": [5, 13], "label": "P", "x": 13, "y": 2 }, + { "matrix": [6, 13], "label": "{", "x": 14.25, "y": 2 }, + { "matrix": [6, 14], "label": "}", "x": 15.5, "y": 2 }, + + { "matrix": [4, 4], "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, + { "matrix": [7, 2], "label": "A", "x": 2, "y": 3.25 }, + { "matrix": [4, 5], "label": "S", "x": 3.25, "y": 3.25 }, + { "matrix": [7, 14], "label": "D", "x": 4.5, "y": 3.25 }, + { "matrix": [7, 6], "label": "F", "x": 5.75, "y": 3.25 }, + { "matrix": [2, 6], "label": "G", "x": 7, "y": 3.25 }, + { "matrix": [2, 7], "label": "H", "x": 8.25, "y": 3.25 }, + { "matrix": [7, 7], "label": "J", "x": 9.5, "y": 3.25 }, + { "matrix": [7, 10], "label": "K", "x": 10.75, "y": 3.25 }, + { "matrix": [7, 8], "label": "L", "x": 12, "y": 3.25 }, + { "matrix": [7, 13], "label": ":", "x": 13.25, "y": 3.25 }, + { "matrix": [0, 14], "label": "@", "x": 14.5, "y": 3.25 }, + { "matrix": [2, 8], "label": "~", "x": 15.75, "y": 3.25 }, + { "matrix": [1, 14], "label": "Enter", "x": 17, "y": 2, "w": 1.25, "h": 2.25 }, + + { "matrix": [1, 9], "label": "Shift", "x": 0, "y": 4.5, "w": 2.5 }, + { "matrix": [1, 5], "label": "Z", "x": 2.75, "y": 4.5 }, + { "matrix": [0, 5], "label": "X", "x": 4, "y": 4.5 }, + { "matrix": [0, 0], "label": "C", "x": 5.25, "y": 4.5 }, + { "matrix": [0, 6], "label": "V", "x": 6.5, "y": 4.5 }, + { "matrix": [1, 6], "label": "B", "x": 7.75, "y": 4.5 }, + { "matrix": [1, 7], "label": "N", "x": 9, "y": 4.5 }, + { "matrix": [0, 7], "label": "M", "x": 10.25, "y": 4.5 }, + { "matrix": [0, 10], "label": "<", "x": 11.5, "y": 4.5 }, + { "matrix": [0, 8], "label": ">", "x": 12.75, "y": 4.5 }, + { "matrix": [0, 13], "label": "?", "x": 14, "y": 4.5 }, + { "matrix": [4, 11], "x": 15.25, "y": 4.5 }, + { "matrix": [0, 9], "label": "Shift", "x": 16.5, "y": 4.5, "w": 1.75 }, + + { "matrix": [1, 12], "label": "Ctrl", "x": 0, "y": 5.75, "w": 1.25 }, + { "matrix": [2, 2], "label": "Fn", "x": 1.5, "y": 5.75 }, + { "matrix": [3, 1], "label": "Win", "x": 2.75, "y": 5.75 }, + { "matrix": [1, 3], "label": "Alt", "x": 4, "y": 5.75 }, + { "matrix": [6, 2], "x": 5.25, "y": 5.75, "w": 0.5 }, + { "matrix": [1, 4], "x": 6, "y": 5.75, "w": 3.75 }, + { "matrix": [1, 11], "x": 10, "y": 5.75, "w": 0.5 }, + { "matrix": [0, 11], "x": 10.75, "y": 5.75, "w": 0.5 }, + { "matrix": [0, 3], "label": "Alt", "x": 11.5, "y": 5.75 }, + { "matrix": [0, 12], "label": "Ctrl", "x": 12.75, "y": 5.75 }, + { "matrix": [6, 11], "label": "←", "x": 14, "y": 5.75, "w": 1.25 }, + { "matrix": [1, 13], "label": "↑", "x": 15.5, "y": 5.75, "w": 1.25, "h": 0.5 }, + { "matrix": [1, 8], "label": "→", "x": 17, "y": 5.75, "w": 1.25 }, + { "matrix": [2, 15], "label": "↓", "x": 15.5, "y": 6.25, "w": 1.25, "h": 0.5 } ] } } diff --git a/keyboards/framework/jis/jis.h b/keyboards/framework/jis/jis.h deleted file mode 100644 index c1f80e77f54..00000000000 --- a/keyboards/framework/jis/jis.h +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -// JIS is based off ANSI with a few extra keys -// clang-format off -#define LAYOUT( \ - K110, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122, K123, K76, \ - K1, K2, K3, K4, K5, K6, K7, K8, K9, K10, K11, K12, K13, K14, K15,\ - K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, \ - K44, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, \ - K58, K59, K127, K60, K131, K61, K132, K133, K62, K64, K79, K83, K84, K89 \ -) \ -{ \ - { K48, K76, K17, K62, KC_NO, K47, K49, K52, K54, K57, K53, K133, K64, K55, K41, K14 }, \ - { KC_NO, KC_NO, KC_NO, K60, K61, K46, K50, K51, K84, K44, KC_NO, K132, K58, K83, K43, K119 }, \ - { KC_NO, KC_NO, K59, KC_NO, K19, K113, K35, K36, K42, KC_NO, K118, KC_NO, KC_NO, K12, KC_NO, K89 }, \ - { KC_NO, K127, K16, KC_NO, K115, K112, K21, K22, K25, KC_NO, K117, K120, KC_NO, K123, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, K1, KC_NO, K30, K32, K6, K7, K121, KC_NO, K116, K56, KC_NO, K11, K13, KC_NO,}, \ - { KC_NO, KC_NO, K2, KC_NO, K4, K3, K5, K8, K10, KC_NO, K9, KC_NO, KC_NO, K26, K15, KC_NO,}, \ - { KC_NO, KC_NO, K131, KC_NO, K114, K18, K20, K23, K122, KC_NO, K24, K79, KC_NO, K27, K28, KC_NO,}, \ - { KC_NO, KC_NO, K31, KC_NO, KC_NO, K110, K34, K37, K39, KC_NO, K38, KC_NO, KC_NO, K40, K33, KC_NO,} \ -} From 862081c2cab1faeebfa0de27e8f310ab02c28797 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 16 Aug 2023 02:30:18 +0800 Subject: [PATCH 12/31] keyboards/framework: Move to laptop16 subfolder Signed-off-by: Daniel Schaefer --- keyboards/framework/{ => laptop16}/ansi/ansi.c | 0 keyboards/framework/{ => laptop16}/ansi/config.h | 0 keyboards/framework/{ => laptop16}/ansi/info.json | 0 .../{ => laptop16}/ansi/keymaps/advanced/keymap.c | 0 .../{ => laptop16}/ansi/keymaps/default/keymap.c | 0 keyboards/framework/{ => laptop16}/ansi/rules.mk | 0 keyboards/framework/{ => laptop16}/config.h | 0 keyboards/framework/{ => laptop16}/framework.c | 0 keyboards/framework/{ => laptop16}/framework.h | 0 keyboards/framework/{ => laptop16}/halconf.h | 0 keyboards/framework/{ => laptop16}/iso/config.h | 0 keyboards/framework/{ => laptop16}/iso/info.json | 0 .../{ => laptop16}/iso/keymaps/default/keymap.c | 0 keyboards/framework/{ => laptop16}/iso/rules.mk | 0 keyboards/framework/{ => laptop16}/jis/config.h | 0 keyboards/framework/{ => laptop16}/jis/info.json | 0 .../{ => laptop16}/jis/keymaps/default/keymap.c | 0 keyboards/framework/{ => laptop16}/jis/rules.mk | 0 .../framework/{ => laptop16}/macropad/config.h | 0 .../framework/{ => laptop16}/macropad/info.json | 0 .../macropad/keymaps/default/keymap.c | 0 .../macropad/keymaps/esther/keymap.c | 0 .../framework/{ => laptop16}/macropad/macropad.c | 0 .../framework/{ => laptop16}/macropad/rules.mk | 0 keyboards/framework/{ => laptop16}/matrix.c | 0 keyboards/framework/{ => laptop16}/matrix.h | 0 keyboards/framework/{ => laptop16}/mcuconf.h | 0 keyboards/framework/{ => laptop16}/numpad/config.h | 0 .../framework/{ => laptop16}/numpad/info.json | 0 .../{ => laptop16}/numpad/keymaps/default/keymap.c | 0 keyboards/framework/{ => laptop16}/numpad/numpad.c | 0 keyboards/framework/{ => laptop16}/numpad/numpad.h | 0 keyboards/framework/{ => laptop16}/numpad/rules.mk | 0 keyboards/framework/{ => laptop16}/readme.md | 14 +++++++------- keyboards/framework/{ => laptop16}/rules.mk | 0 35 files changed, 7 insertions(+), 7 deletions(-) rename keyboards/framework/{ => laptop16}/ansi/ansi.c (100%) rename keyboards/framework/{ => laptop16}/ansi/config.h (100%) rename keyboards/framework/{ => laptop16}/ansi/info.json (100%) rename keyboards/framework/{ => laptop16}/ansi/keymaps/advanced/keymap.c (100%) rename keyboards/framework/{ => laptop16}/ansi/keymaps/default/keymap.c (100%) rename keyboards/framework/{ => laptop16}/ansi/rules.mk (100%) rename keyboards/framework/{ => laptop16}/config.h (100%) rename keyboards/framework/{ => laptop16}/framework.c (100%) rename keyboards/framework/{ => laptop16}/framework.h (100%) rename keyboards/framework/{ => laptop16}/halconf.h (100%) rename keyboards/framework/{ => laptop16}/iso/config.h (100%) rename keyboards/framework/{ => laptop16}/iso/info.json (100%) rename keyboards/framework/{ => laptop16}/iso/keymaps/default/keymap.c (100%) rename keyboards/framework/{ => laptop16}/iso/rules.mk (100%) rename keyboards/framework/{ => laptop16}/jis/config.h (100%) rename keyboards/framework/{ => laptop16}/jis/info.json (100%) rename keyboards/framework/{ => laptop16}/jis/keymaps/default/keymap.c (100%) rename keyboards/framework/{ => laptop16}/jis/rules.mk (100%) rename keyboards/framework/{ => laptop16}/macropad/config.h (100%) rename keyboards/framework/{ => laptop16}/macropad/info.json (100%) rename keyboards/framework/{ => laptop16}/macropad/keymaps/default/keymap.c (100%) rename keyboards/framework/{ => laptop16}/macropad/keymaps/esther/keymap.c (100%) rename keyboards/framework/{ => laptop16}/macropad/macropad.c (100%) rename keyboards/framework/{ => laptop16}/macropad/rules.mk (100%) rename keyboards/framework/{ => laptop16}/matrix.c (100%) rename keyboards/framework/{ => laptop16}/matrix.h (100%) rename keyboards/framework/{ => laptop16}/mcuconf.h (100%) rename keyboards/framework/{ => laptop16}/numpad/config.h (100%) rename keyboards/framework/{ => laptop16}/numpad/info.json (100%) rename keyboards/framework/{ => laptop16}/numpad/keymaps/default/keymap.c (100%) rename keyboards/framework/{ => laptop16}/numpad/numpad.c (100%) rename keyboards/framework/{ => laptop16}/numpad/numpad.h (100%) rename keyboards/framework/{ => laptop16}/numpad/rules.mk (100%) rename keyboards/framework/{ => laptop16}/readme.md (82%) rename keyboards/framework/{ => laptop16}/rules.mk (100%) diff --git a/keyboards/framework/ansi/ansi.c b/keyboards/framework/laptop16/ansi/ansi.c similarity index 100% rename from keyboards/framework/ansi/ansi.c rename to keyboards/framework/laptop16/ansi/ansi.c diff --git a/keyboards/framework/ansi/config.h b/keyboards/framework/laptop16/ansi/config.h similarity index 100% rename from keyboards/framework/ansi/config.h rename to keyboards/framework/laptop16/ansi/config.h diff --git a/keyboards/framework/ansi/info.json b/keyboards/framework/laptop16/ansi/info.json similarity index 100% rename from keyboards/framework/ansi/info.json rename to keyboards/framework/laptop16/ansi/info.json diff --git a/keyboards/framework/ansi/keymaps/advanced/keymap.c b/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c similarity index 100% rename from keyboards/framework/ansi/keymaps/advanced/keymap.c rename to keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c diff --git a/keyboards/framework/ansi/keymaps/default/keymap.c b/keyboards/framework/laptop16/ansi/keymaps/default/keymap.c similarity index 100% rename from keyboards/framework/ansi/keymaps/default/keymap.c rename to keyboards/framework/laptop16/ansi/keymaps/default/keymap.c diff --git a/keyboards/framework/ansi/rules.mk b/keyboards/framework/laptop16/ansi/rules.mk similarity index 100% rename from keyboards/framework/ansi/rules.mk rename to keyboards/framework/laptop16/ansi/rules.mk diff --git a/keyboards/framework/config.h b/keyboards/framework/laptop16/config.h similarity index 100% rename from keyboards/framework/config.h rename to keyboards/framework/laptop16/config.h diff --git a/keyboards/framework/framework.c b/keyboards/framework/laptop16/framework.c similarity index 100% rename from keyboards/framework/framework.c rename to keyboards/framework/laptop16/framework.c diff --git a/keyboards/framework/framework.h b/keyboards/framework/laptop16/framework.h similarity index 100% rename from keyboards/framework/framework.h rename to keyboards/framework/laptop16/framework.h diff --git a/keyboards/framework/halconf.h b/keyboards/framework/laptop16/halconf.h similarity index 100% rename from keyboards/framework/halconf.h rename to keyboards/framework/laptop16/halconf.h diff --git a/keyboards/framework/iso/config.h b/keyboards/framework/laptop16/iso/config.h similarity index 100% rename from keyboards/framework/iso/config.h rename to keyboards/framework/laptop16/iso/config.h diff --git a/keyboards/framework/iso/info.json b/keyboards/framework/laptop16/iso/info.json similarity index 100% rename from keyboards/framework/iso/info.json rename to keyboards/framework/laptop16/iso/info.json diff --git a/keyboards/framework/iso/keymaps/default/keymap.c b/keyboards/framework/laptop16/iso/keymaps/default/keymap.c similarity index 100% rename from keyboards/framework/iso/keymaps/default/keymap.c rename to keyboards/framework/laptop16/iso/keymaps/default/keymap.c diff --git a/keyboards/framework/iso/rules.mk b/keyboards/framework/laptop16/iso/rules.mk similarity index 100% rename from keyboards/framework/iso/rules.mk rename to keyboards/framework/laptop16/iso/rules.mk diff --git a/keyboards/framework/jis/config.h b/keyboards/framework/laptop16/jis/config.h similarity index 100% rename from keyboards/framework/jis/config.h rename to keyboards/framework/laptop16/jis/config.h diff --git a/keyboards/framework/jis/info.json b/keyboards/framework/laptop16/jis/info.json similarity index 100% rename from keyboards/framework/jis/info.json rename to keyboards/framework/laptop16/jis/info.json diff --git a/keyboards/framework/jis/keymaps/default/keymap.c b/keyboards/framework/laptop16/jis/keymaps/default/keymap.c similarity index 100% rename from keyboards/framework/jis/keymaps/default/keymap.c rename to keyboards/framework/laptop16/jis/keymaps/default/keymap.c diff --git a/keyboards/framework/jis/rules.mk b/keyboards/framework/laptop16/jis/rules.mk similarity index 100% rename from keyboards/framework/jis/rules.mk rename to keyboards/framework/laptop16/jis/rules.mk diff --git a/keyboards/framework/macropad/config.h b/keyboards/framework/laptop16/macropad/config.h similarity index 100% rename from keyboards/framework/macropad/config.h rename to keyboards/framework/laptop16/macropad/config.h diff --git a/keyboards/framework/macropad/info.json b/keyboards/framework/laptop16/macropad/info.json similarity index 100% rename from keyboards/framework/macropad/info.json rename to keyboards/framework/laptop16/macropad/info.json diff --git a/keyboards/framework/macropad/keymaps/default/keymap.c b/keyboards/framework/laptop16/macropad/keymaps/default/keymap.c similarity index 100% rename from keyboards/framework/macropad/keymaps/default/keymap.c rename to keyboards/framework/laptop16/macropad/keymaps/default/keymap.c diff --git a/keyboards/framework/macropad/keymaps/esther/keymap.c b/keyboards/framework/laptop16/macropad/keymaps/esther/keymap.c similarity index 100% rename from keyboards/framework/macropad/keymaps/esther/keymap.c rename to keyboards/framework/laptop16/macropad/keymaps/esther/keymap.c diff --git a/keyboards/framework/macropad/macropad.c b/keyboards/framework/laptop16/macropad/macropad.c similarity index 100% rename from keyboards/framework/macropad/macropad.c rename to keyboards/framework/laptop16/macropad/macropad.c diff --git a/keyboards/framework/macropad/rules.mk b/keyboards/framework/laptop16/macropad/rules.mk similarity index 100% rename from keyboards/framework/macropad/rules.mk rename to keyboards/framework/laptop16/macropad/rules.mk diff --git a/keyboards/framework/matrix.c b/keyboards/framework/laptop16/matrix.c similarity index 100% rename from keyboards/framework/matrix.c rename to keyboards/framework/laptop16/matrix.c diff --git a/keyboards/framework/matrix.h b/keyboards/framework/laptop16/matrix.h similarity index 100% rename from keyboards/framework/matrix.h rename to keyboards/framework/laptop16/matrix.h diff --git a/keyboards/framework/mcuconf.h b/keyboards/framework/laptop16/mcuconf.h similarity index 100% rename from keyboards/framework/mcuconf.h rename to keyboards/framework/laptop16/mcuconf.h diff --git a/keyboards/framework/numpad/config.h b/keyboards/framework/laptop16/numpad/config.h similarity index 100% rename from keyboards/framework/numpad/config.h rename to keyboards/framework/laptop16/numpad/config.h diff --git a/keyboards/framework/numpad/info.json b/keyboards/framework/laptop16/numpad/info.json similarity index 100% rename from keyboards/framework/numpad/info.json rename to keyboards/framework/laptop16/numpad/info.json diff --git a/keyboards/framework/numpad/keymaps/default/keymap.c b/keyboards/framework/laptop16/numpad/keymaps/default/keymap.c similarity index 100% rename from keyboards/framework/numpad/keymaps/default/keymap.c rename to keyboards/framework/laptop16/numpad/keymaps/default/keymap.c diff --git a/keyboards/framework/numpad/numpad.c b/keyboards/framework/laptop16/numpad/numpad.c similarity index 100% rename from keyboards/framework/numpad/numpad.c rename to keyboards/framework/laptop16/numpad/numpad.c diff --git a/keyboards/framework/numpad/numpad.h b/keyboards/framework/laptop16/numpad/numpad.h similarity index 100% rename from keyboards/framework/numpad/numpad.h rename to keyboards/framework/laptop16/numpad/numpad.h diff --git a/keyboards/framework/numpad/rules.mk b/keyboards/framework/laptop16/numpad/rules.mk similarity index 100% rename from keyboards/framework/numpad/rules.mk rename to keyboards/framework/laptop16/numpad/rules.mk diff --git a/keyboards/framework/readme.md b/keyboards/framework/laptop16/readme.md similarity index 82% rename from keyboards/framework/readme.md rename to keyboards/framework/laptop16/readme.md index 9fc7ed292da..606448f9aa5 100644 --- a/keyboards/framework/readme.md +++ b/keyboards/framework/laptop16/readme.md @@ -21,15 +21,15 @@ backlight options. Make example for this keyboard (after setting up your build environment): - qmk compile -kb framework/ansi -km default - qmk compile -kb framework/iso -km default - qmk compile -kb framework/jis -km default - qmk compile -kb framework/numpad -km default - qmk compile -kb framework/macropad -km default + qmk compile -kb framework/laptop16/ansi -km default + qmk compile -kb framework/laptop16/iso -km default + qmk compile -kb framework/laptop16/jis -km default + qmk compile -kb framework/laptop16/numpad -km default + qmk compile -kb framework/laptop16/macropad -km default Flashing example for the ANSI keyboard: - qmk compile -kb framework/ansi -km default + qmk compile -kb framework/laptop16/ansi -km default 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). @@ -41,4 +41,4 @@ Enter the bootloader in 3 ways: * **On Framework Laptop 16 Numpad**: Hold down keys for 2 and 6 while installing the module * **On Raspberry Pi Pico**: Hold down bootsel button when plugging in * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard -* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available \ No newline at end of file +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/framework/rules.mk b/keyboards/framework/laptop16/rules.mk similarity index 100% rename from keyboards/framework/rules.mk rename to keyboards/framework/laptop16/rules.mk From e9ee4e54b1380efbec8c87eba858a6774c4f5c54 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 16 Aug 2023 02:31:33 +0800 Subject: [PATCH 13/31] keyboards/framework: Remove non-ANSI keyboards Keep the initial PR simple. Signed-off-by: Daniel Schaefer --- keyboards/framework/laptop16/iso/config.h | 5 - keyboards/framework/laptop16/iso/info.json | 117 ----------------- .../laptop16/iso/keymaps/default/keymap.c | 108 ---------------- keyboards/framework/laptop16/iso/rules.mk | 2 - keyboards/framework/laptop16/jis/config.h | 5 - keyboards/framework/laptop16/jis/info.json | 121 ------------------ .../laptop16/jis/keymaps/default/keymap.c | 109 ---------------- keyboards/framework/laptop16/jis/rules.mk | 2 - .../framework/laptop16/macropad/config.h | 16 --- .../framework/laptop16/macropad/info.json | 62 --------- .../macropad/keymaps/default/keymap.c | 87 ------------- .../laptop16/macropad/keymaps/esther/keymap.c | 63 --------- .../framework/laptop16/macropad/macropad.c | 4 - .../framework/laptop16/macropad/rules.mk | 3 - keyboards/framework/laptop16/numpad/config.h | 5 - keyboards/framework/laptop16/numpad/info.json | 59 --------- .../laptop16/numpad/keymaps/default/keymap.c | 73 ----------- keyboards/framework/laptop16/numpad/numpad.c | 14 -- keyboards/framework/laptop16/numpad/numpad.h | 7 - keyboards/framework/laptop16/numpad/rules.mk | 2 - keyboards/framework/laptop16/readme.md | 11 -- 21 files changed, 875 deletions(-) delete mode 100644 keyboards/framework/laptop16/iso/config.h delete mode 100644 keyboards/framework/laptop16/iso/info.json delete mode 100644 keyboards/framework/laptop16/iso/keymaps/default/keymap.c delete mode 100644 keyboards/framework/laptop16/iso/rules.mk delete mode 100644 keyboards/framework/laptop16/jis/config.h delete mode 100644 keyboards/framework/laptop16/jis/info.json delete mode 100644 keyboards/framework/laptop16/jis/keymaps/default/keymap.c delete mode 100644 keyboards/framework/laptop16/jis/rules.mk delete mode 100644 keyboards/framework/laptop16/macropad/config.h delete mode 100644 keyboards/framework/laptop16/macropad/info.json delete mode 100644 keyboards/framework/laptop16/macropad/keymaps/default/keymap.c delete mode 100644 keyboards/framework/laptop16/macropad/keymaps/esther/keymap.c delete mode 100644 keyboards/framework/laptop16/macropad/macropad.c delete mode 100644 keyboards/framework/laptop16/macropad/rules.mk delete mode 100644 keyboards/framework/laptop16/numpad/config.h delete mode 100644 keyboards/framework/laptop16/numpad/info.json delete mode 100644 keyboards/framework/laptop16/numpad/keymaps/default/keymap.c delete mode 100644 keyboards/framework/laptop16/numpad/numpad.c delete mode 100644 keyboards/framework/laptop16/numpad/numpad.h delete mode 100644 keyboards/framework/laptop16/numpad/rules.mk diff --git a/keyboards/framework/laptop16/iso/config.h b/keyboards/framework/laptop16/iso/config.h deleted file mode 100644 index b3fa449889e..00000000000 --- a/keyboards/framework/laptop16/iso/config.h +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#define MATRIX_COLS 16 -#define MATRIX_ROWS 8 diff --git a/keyboards/framework/laptop16/iso/info.json b/keyboards/framework/laptop16/iso/info.json deleted file mode 100644 index 89ee7464480..00000000000 --- a/keyboards/framework/laptop16/iso/info.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "keyboard_name": "Laptop 16 Keyboard Module - ISO", - "manufacturer": "Framework", - "maintainer": "JohnAZoidberg", - "bootloader": "rp2040", - "features": { - "bootmagic": false, - "mousekey": false, - "extrakey": true, - "console": true, - "command": false, - "nkro": true, - "audio": false - }, - "debounce": 5, - "processor": "RP2040", - "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040", - "usb": { - "device_version": "0.2.2", - "pid": "0x0018", - "vid": "0x32AC", - "force_nkro": true - }, - "backlight": { - "pin": "GP25" - }, - "layouts": { - "LAYOUT": { - "layout": [ - { "matrix": [7, 5], "label": "Esc", "x": 0, "y": 0, "w": 1.25, "h": 0.5 }, - { "matrix": [3, 5], "label": "F1", "x": 1.5, "y": 0, "h": 0.5 }, - { "matrix": [2, 5], "label": "F2", "x": 2.75, "y": 0, "h": 0.5 }, - { "matrix": [6, 4], "label": "F3", "x": 4, "y": 0, "h": 0.5 }, - { "matrix": [3, 4], "label": "F4", "x": 5.25, "y": 0, "h": 0.5 }, - { "matrix": [4, 10], "label": "F5", "x": 6.5, "y": 0, "h": 0.5 }, - { "matrix": [3, 10], "label": "F6", "x": 7.75, "y": 0, "h": 0.5 }, - { "matrix": [2, 10], "label": "F7", "x": 9, "y": 0, "h": 0.5 }, - { "matrix": [1, 15], "label": "F8", "x": 10.25, "y": 0, "h": 0.5 }, - { "matrix": [3, 11], "label": "F9", "x": 11.5, "y": 0, "h": 0.5 }, - { "matrix": [4, 8], "label": "F10", "x": 12.75, "y": 0, "h": 0.5 }, - { "matrix": [6, 8], "label": "F11", "x": 14, "y": 0, "h": 0.5 }, - { "matrix": [3, 13], "label": "F12", "x": 15.25, "y": 0, "h": 0.5 }, - { "matrix": [0, 1], "label": "Delete", "x": 16.5, "y": 0, "w": 1.75, "h": 0.5 }, - - { "matrix": [4, 2], "label": "~", "x": 0, "y": 0.75 }, - { "matrix": [5, 2], "label": "!", "x": 1.25, "y": 0.75 }, - { "matrix": [5, 5], "label": "\"", "x": 2.5, "y": 0.75 }, - { "matrix": [5, 4], "label": "", "x": 3.75, "y": 0.75 }, - { "matrix": [5, 6], "label": "$", "x": 5, "y": 0.75 }, - { "matrix": [4, 6], "label": "%", "x": 6.25, "y": 0.75 }, - { "matrix": [4, 7], "label": "^", "x": 7.5, "y": 0.75 }, - { "matrix": [5, 7], "label": "&", "x": 8.75, "y": 0.75 }, - { "matrix": [5, 10], "label": "*", "x": 10, "y": 0.75 }, - { "matrix": [5, 8], "label": "(", "x": 11.25, "y": 0.75 }, - { "matrix": [4, 13], "label": ")", "x": 12.5, "y": 0.75 }, - { "matrix": [2, 13], "label": "_", "x": 13.75, "y": 0.75 }, - { "matrix": [4, 14], "label": "+", "x": 15, "y": 0.75 }, - { "matrix": [5, 14], "label": "Backspace", "x": 16.25, "y": 0.75, "w": 2 }, - - { "matrix": [3, 2], "label": "Tab", "x": 0, "y": 2, "w": 1.5 }, - { "matrix": [0, 2], "label": "Q", "x": 1.75, "y": 2 }, - { "matrix": [6, 5], "label": "W", "x": 3, "y": 2 }, - { "matrix": [2, 4], "label": "E", "x": 4.25, "y": 2 }, - { "matrix": [6, 6], "label": "R", "x": 5.5, "y": 2 }, - { "matrix": [3, 6], "label": "T", "x": 6.75, "y": 2 }, - { "matrix": [3, 7], "label": "Y", "x": 8, "y": 2 }, - { "matrix": [6, 7], "label": "U", "x": 9.25, "y": 2 }, - { "matrix": [6, 10], "label": "I", "x": 10.5, "y": 2 }, - { "matrix": [3, 8], "label": "O", "x": 11.75, "y": 2 }, - { "matrix": [5, 13], "label": "P", "x": 13, "y": 2 }, - { "matrix": [6, 13], "label": "{", "x": 14.25, "y": 2 }, - { "matrix": [6, 14], "label": "}", "x": 15.5, "y": 2 }, - - { "matrix": [4, 4], "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, - { "matrix": [7, 2], "label": "A", "x": 2, "y": 3.25 }, - { "matrix": [4, 5], "label": "S", "x": 3.25, "y": 3.25 }, - { "matrix": [7, 14], "label": "D", "x": 4.5, "y": 3.25 }, - { "matrix": [7, 6], "label": "F", "x": 5.75, "y": 3.25 }, - { "matrix": [2, 6], "label": "G", "x": 7, "y": 3.25 }, - { "matrix": [2, 7], "label": "H", "x": 8.25, "y": 3.25 }, - { "matrix": [7, 7], "label": "J", "x": 9.5, "y": 3.25 }, - { "matrix": [7, 10], "label": "K", "x": 10.75, "y": 3.25 }, - { "matrix": [7, 8], "label": "L", "x": 12, "y": 3.25 }, - { "matrix": [7, 13], "label": ":", "x": 13.25, "y": 3.25 }, - { "matrix": [0, 14], "label": "@", "x": 14.5, "y": 3.25 }, - { "matrix": [2, 8], "label": "~", "x": 15.75, "y": 3.25 }, - { "matrix": [1, 14], "label": "Enter", "x": 17, "y": 2, "w": 1.25, "h": 2.25 }, - - { "matrix": [1, 9], "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, - { "matrix": [5, 11], "label": "|", "x": 1.5, "y": 4.5 }, - { "matrix": [1, 5], "label": "Z", "x": 2.75, "y": 4.5 }, - { "matrix": [0, 5], "label": "X", "x": 4, "y": 4.5 }, - { "matrix": [0, 0], "label": "C", "x": 5.25, "y": 4.5 }, - { "matrix": [0, 6], "label": "V", "x": 6.5, "y": 4.5 }, - { "matrix": [1, 6], "label": "B", "x": 7.75, "y": 4.5 }, - { "matrix": [1, 7], "label": "N", "x": 9, "y": 4.5 }, - { "matrix": [0, 7], "label": "M", "x": 10.25, "y": 4.5 }, - { "matrix": [0, 10], "label": "<", "x": 11.5, "y": 4.5 }, - { "matrix": [0, 8], "label": ">", "x": 12.75, "y": 4.5 }, - { "matrix": [0, 13], "label": "?", "x": 14, "y": 4.5 }, - { "matrix": [0, 9], "label": "Shift", "x": 15.25, "y": 4.5, "w": 3 }, - - { "matrix": [1, 12], "label": "Ctrl", "x": 0, "y": 5.75, "w": 1.25 }, - { "matrix": [2, 2], "label": "Fn", "x": 1.5, "y": 5.75 }, - { "matrix": [3, 1], "label": "Win", "x": 2.75, "y": 5.75 }, - { "matrix": [1, 3], "label": "Alt", "x": 4, "y": 5.75 }, - { "matrix": [1, 4], "label": "Space", "x": 5.25, "y": 5.75, "w": 6 }, - { "matrix": [0, 3], "label": "Alt", "x": 11.5, "y": 5.75 }, - { "matrix": [0, 12], "label": "Ctrl", "x": 12.75, "y": 5.75 }, - { "matrix": [6, 11], "label": "←", "x": 14, "y": 5.75, "w": 1.25 }, - { "matrix": [1, 13], "label": "↑", "x": 15.5, "y": 5.75, "w": 1.25, "h": 0.5 }, - { "matrix": [1, 8], "label": "→", "x": 17, "y": 5.75, "w": 1.25 }, - { "matrix": [2, 15], "label": "↓", "x": 15.5, "y": 6.25, "w": 1.25, "h": 0.5 } - ] - } - } -} diff --git a/keyboards/framework/laptop16/iso/keymaps/default/keymap.c b/keyboards/framework/laptop16/iso/keymaps/default/keymap.c deleted file mode 100644 index a80b18883a7..00000000000 --- a/keyboards/framework/laptop16/iso/keymaps/default/keymap.c +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H -#include "framework.h" - -// clang-format off -enum _layers { - _BASE, - _FN, - _FN_LOCK, - _FM -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ - * 14 keys │Esc │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Del│ - * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ - * 14 keys │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Backsp│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ - * 13 keys │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Entr│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * 14 keys │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┤ - * 13 keys │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ - * ├────┼───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ - * │ │ │ │ │ │ │ │ │↑ │ │ - * 11 keys │Ctrl│FN │GUI│Alt│ │Alt│Ctl│ ← ├───┤ → │ - * │ │ │ │ │ │ │ │ │ ↓│ │ - * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ - * 79 total - */ - [_BASE] = LAYOUT( - 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_DEL, - 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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - 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_LCTL, MO(_FN), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT - ), - /* - * Function layer - * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ - * 14 keys │FN lk│Mut│vDn│vUp│Prv│Ply│Nxt│bDn│bUp│Scn│Air│Prt│App│Ins │ - * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ - * 14 keys │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ - * 13 keys │ │ │ │ │ │ │ │ │ │ │Pau│ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * 14 keys │ │ │ │ │ │ │ │ │ScL│ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┤ - * 13 keys │ │ │ │ │ │ │ │Brk│ │ │ │ │ │ - * ├────┼───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ - * │ │ │ │ │ │ │ │ │PgU│ │ - * 11 keys │ │ │ │ │ Toggle Backlight │ │ │Home├───┤End │ - * │ │ │ │ │ │ │ │ │PgD│ │ - * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ - * 78 total - */ - [_FN] = LAYOUT( - FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, _______, _______, - _______, _______, KC_SYRQ, _______, _______, _______, _______, _______, KC_SCRL, _______, _______, _______, _______, _______, - _______, _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END - ), - // Function lock layer - // Everything on F-row locked to function layer, except ESC and DEL - [_FN_LOCK] = LAYOUT( - _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, MO(_FM), _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [_FM] = LAYOUT( - FN_LOCK, 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_INS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, _______, _______, - _______, _______, KC_SYRQ, _______, _______, _______, _______, _______, KC_SCRL, _______, _______, _______, _______, _______, - _______, _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END - ), -}; -// clang-format on - -// Make sure to keep FN Lock even after reset -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case FN_LOCK: - if (record->event.pressed) { - if (layer_state_is(_FN)) { - set_single_persistent_default_layer(_FN_LOCK); - } - if (layer_state_is(_FM)) { - set_single_persistent_default_layer(_BASE); - } - } - return false; - break; - default: - break; - } - return true; -} diff --git a/keyboards/framework/laptop16/iso/rules.mk b/keyboards/framework/laptop16/iso/rules.mk deleted file mode 100644 index f31edcda205..00000000000 --- a/keyboards/framework/laptop16/iso/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -BACKLIGHT_ENABLE = yes -BACKLIGHT_DRIVER = pwm diff --git a/keyboards/framework/laptop16/jis/config.h b/keyboards/framework/laptop16/jis/config.h deleted file mode 100644 index b3fa449889e..00000000000 --- a/keyboards/framework/laptop16/jis/config.h +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#define MATRIX_COLS 16 -#define MATRIX_ROWS 8 diff --git a/keyboards/framework/laptop16/jis/info.json b/keyboards/framework/laptop16/jis/info.json deleted file mode 100644 index df80b8575c5..00000000000 --- a/keyboards/framework/laptop16/jis/info.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "keyboard_name": "Laptop 16 Keyboard Module - JIS", - "manufacturer": "Framework", - "maintainer": "JohnAZoidberg", - "bootloader": "rp2040", - "features": { - "bootmagic": false, - "mousekey": false, - "extrakey": true, - "console": true, - "command": false, - "nkro": true, - "audio": false - }, - "debounce": 5, - "processor": "RP2040", - "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040", - "usb": { - "device_version": "0.2.2", - "pid": "0x0019", - "vid": "0x32AC", - "force_nkro": true - }, - "backlight": { - "pin": "GP25" - }, - "layouts": { - "LAYOUT": { - "layout": [ - { "matrix": [7, 5], "label": "Esc", "x": 0, "y": 0, "w": 1.25, "h": 0.5 }, - { "matrix": [3, 5], "label": "F1", "x": 1.5, "y": 0, "h": 0.5 }, - { "matrix": [2, 5], "label": "F2", "x": 2.75, "y": 0, "h": 0.5 }, - { "matrix": [6, 4], "label": "F3", "x": 4, "y": 0, "h": 0.5 }, - { "matrix": [3, 4], "label": "F4", "x": 5.25, "y": 0, "h": 0.5 }, - { "matrix": [4, 10], "label": "F5", "x": 6.5, "y": 0, "h": 0.5 }, - { "matrix": [3, 10], "label": "F6", "x": 7.75, "y": 0, "h": 0.5 }, - { "matrix": [2, 10], "label": "F7", "x": 9, "y": 0, "h": 0.5 }, - { "matrix": [1, 15], "label": "F8", "x": 10.25, "y": 0, "h": 0.5 }, - { "matrix": [3, 11], "label": "F9", "x": 11.5, "y": 0, "h": 0.5 }, - { "matrix": [4, 8], "label": "F10", "x": 12.75, "y": 0, "h": 0.5 }, - { "matrix": [6, 8], "label": "F11", "x": 14, "y": 0, "h": 0.5 }, - { "matrix": [3, 13], "label": "F12", "x": 15.25, "y": 0, "h": 0.5 }, - { "matrix": [0, 1], "label": "Delete", "x": 16.5, "y": 0, "w": 1.75, "h": 0.5 }, - - { "matrix": [4, 2], "label": "~", "x": 0, "y": 0.75 }, - { "matrix": [5, 2], "label": "!", "x": 1.25, "y": 0.75 }, - { "matrix": [5, 5], "label": "\"", "x": 2.5, "y": 0.75 }, - { "matrix": [5, 4], "label": "", "x": 3.75, "y": 0.75 }, - { "matrix": [5, 6], "label": "$", "x": 5, "y": 0.75 }, - { "matrix": [4, 6], "label": "%", "x": 6.25, "y": 0.75 }, - { "matrix": [4, 7], "label": "^", "x": 7.5, "y": 0.75 }, - { "matrix": [5, 7], "label": "&", "x": 8.75, "y": 0.75 }, - { "matrix": [5, 10], "label": "*", "x": 10, "y": 0.75 }, - { "matrix": [5, 8], "label": "(", "x": 11.25, "y": 0.75 }, - { "matrix": [4, 13], "label": ")", "x": 12.5, "y": 0.75 }, - { "matrix": [2, 13], "label": "_", "x": 13.75, "y": 0.75 }, - { "matrix": [4, 14], "label": "+", "x": 15, "y": 0.75 }, - { "matrix": [0, 15], "x": 16.25, "y": 0.75, "w": 0.5 }, - { "matrix": [5, 14], "label": "Backsp", "x": 17, "y": 0.75, "w": 1.25 }, - - { "matrix": [3, 2], "label": "Tab", "x": 0, "y": 2, "w": 1.5 }, - { "matrix": [0, 2], "label": "Q", "x": 1.75, "y": 2 }, - { "matrix": [6, 5], "label": "W", "x": 3, "y": 2 }, - { "matrix": [2, 4], "label": "E", "x": 4.25, "y": 2 }, - { "matrix": [6, 6], "label": "R", "x": 5.5, "y": 2 }, - { "matrix": [3, 6], "label": "T", "x": 6.75, "y": 2 }, - { "matrix": [3, 7], "label": "Y", "x": 8, "y": 2 }, - { "matrix": [6, 7], "label": "U", "x": 9.25, "y": 2 }, - { "matrix": [6, 10], "label": "I", "x": 10.5, "y": 2 }, - { "matrix": [3, 8], "label": "O", "x": 11.75, "y": 2 }, - { "matrix": [5, 13], "label": "P", "x": 13, "y": 2 }, - { "matrix": [6, 13], "label": "{", "x": 14.25, "y": 2 }, - { "matrix": [6, 14], "label": "}", "x": 15.5, "y": 2 }, - - { "matrix": [4, 4], "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, - { "matrix": [7, 2], "label": "A", "x": 2, "y": 3.25 }, - { "matrix": [4, 5], "label": "S", "x": 3.25, "y": 3.25 }, - { "matrix": [7, 14], "label": "D", "x": 4.5, "y": 3.25 }, - { "matrix": [7, 6], "label": "F", "x": 5.75, "y": 3.25 }, - { "matrix": [2, 6], "label": "G", "x": 7, "y": 3.25 }, - { "matrix": [2, 7], "label": "H", "x": 8.25, "y": 3.25 }, - { "matrix": [7, 7], "label": "J", "x": 9.5, "y": 3.25 }, - { "matrix": [7, 10], "label": "K", "x": 10.75, "y": 3.25 }, - { "matrix": [7, 8], "label": "L", "x": 12, "y": 3.25 }, - { "matrix": [7, 13], "label": ":", "x": 13.25, "y": 3.25 }, - { "matrix": [0, 14], "label": "@", "x": 14.5, "y": 3.25 }, - { "matrix": [2, 8], "label": "~", "x": 15.75, "y": 3.25 }, - { "matrix": [1, 14], "label": "Enter", "x": 17, "y": 2, "w": 1.25, "h": 2.25 }, - - { "matrix": [1, 9], "label": "Shift", "x": 0, "y": 4.5, "w": 2.5 }, - { "matrix": [1, 5], "label": "Z", "x": 2.75, "y": 4.5 }, - { "matrix": [0, 5], "label": "X", "x": 4, "y": 4.5 }, - { "matrix": [0, 0], "label": "C", "x": 5.25, "y": 4.5 }, - { "matrix": [0, 6], "label": "V", "x": 6.5, "y": 4.5 }, - { "matrix": [1, 6], "label": "B", "x": 7.75, "y": 4.5 }, - { "matrix": [1, 7], "label": "N", "x": 9, "y": 4.5 }, - { "matrix": [0, 7], "label": "M", "x": 10.25, "y": 4.5 }, - { "matrix": [0, 10], "label": "<", "x": 11.5, "y": 4.5 }, - { "matrix": [0, 8], "label": ">", "x": 12.75, "y": 4.5 }, - { "matrix": [0, 13], "label": "?", "x": 14, "y": 4.5 }, - { "matrix": [4, 11], "x": 15.25, "y": 4.5 }, - { "matrix": [0, 9], "label": "Shift", "x": 16.5, "y": 4.5, "w": 1.75 }, - - { "matrix": [1, 12], "label": "Ctrl", "x": 0, "y": 5.75, "w": 1.25 }, - { "matrix": [2, 2], "label": "Fn", "x": 1.5, "y": 5.75 }, - { "matrix": [3, 1], "label": "Win", "x": 2.75, "y": 5.75 }, - { "matrix": [1, 3], "label": "Alt", "x": 4, "y": 5.75 }, - { "matrix": [6, 2], "x": 5.25, "y": 5.75, "w": 0.5 }, - { "matrix": [1, 4], "x": 6, "y": 5.75, "w": 3.75 }, - { "matrix": [1, 11], "x": 10, "y": 5.75, "w": 0.5 }, - { "matrix": [0, 11], "x": 10.75, "y": 5.75, "w": 0.5 }, - { "matrix": [0, 3], "label": "Alt", "x": 11.5, "y": 5.75 }, - { "matrix": [0, 12], "label": "Ctrl", "x": 12.75, "y": 5.75 }, - { "matrix": [6, 11], "label": "←", "x": 14, "y": 5.75, "w": 1.25 }, - { "matrix": [1, 13], "label": "↑", "x": 15.5, "y": 5.75, "w": 1.25, "h": 0.5 }, - { "matrix": [1, 8], "label": "→", "x": 17, "y": 5.75, "w": 1.25 }, - { "matrix": [2, 15], "label": "↓", "x": 15.5, "y": 6.25, "w": 1.25, "h": 0.5 } - ] - } - } -} diff --git a/keyboards/framework/laptop16/jis/keymaps/default/keymap.c b/keyboards/framework/laptop16/jis/keymaps/default/keymap.c deleted file mode 100644 index 8f440eb0331..00000000000 --- a/keyboards/framework/laptop16/jis/keymaps/default/keymap.c +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H -#include "keymap_japanese.h" -#include "framework.h" - -// clang-format off -enum _layers { - _BASE, - _FN, - _FN_LOCK, - _FM -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ - * 14 keys │Esc │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Del│ - * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴┬───┤ - * 15 keys │Z↔H│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ ^ │¥ │Bck│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬┴───┤ - * 13 keys │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ @ │ [ │Entr│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * 14 keys │ Eisū │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ : │ ] │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * 13 keys │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ \ │Shift│ - * ├────┬───┼───┼───┼──┬┴───┴───┴─┬─┴┬──┼───┼───┼───┴┬──┴┬────┤ - * │ │ │ │ │M │ │H │K │ │ │ │↑ │ │ - * 14 keys │Ctrl│FN │GUI│Alt│u │ │e │↔ │Alt│Ctl│ ← ├───┤ → │ - * │ │ │ │ │h │ │n │H │ │ │ │ ↓│ │ - * └────┴───┴───┴───┴──┴──────────┴──┴──┴───┴───┴────┴───┴────┘ - * 83 total - */ - [_BASE] = LAYOUT( - 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_DEL, - JP_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, JP_YEN, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_LBRC, - JP_EISU, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_RBRC, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, JP_BSLS, KC_RSFT, - KC_LCTL, MO(_FN), KC_LGUI, KC_LALT, JP_MHEN, KC_SPC, JP_HENK, JP_KANA, KC_RALT, KC_RCTL, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT - ), - /* - * Function layer - * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ - * 14 keys │FN lk│Mut│vDn│vUp│Prv│Ply│Nxt│bDn│bUp│Scn│Air│Prt│App│Ins │ - * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴┬───┤ - * 15 keys │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬┴───┤ - * 13 keys │ │ │ │ │ │ │ │ │ │ │Pau│ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * 14 keys │ │ │SRq│ │ │ │ │ │ScL│ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * 13 keys │ │ │ │ │ │ │Brk│ │ │ │ │ │ │ - * ├────┬───┼───┼───┼──┬┴───┴───┴─┬─┴┬──┼───┼───┼───┴┬──┴┬────┤ - * │ │ │ │ │ │ Toggle │ │ │ │ │ │PgU│ │ - * 14 keys │ │ │ │ │ │ Backlight│ │ │ │ │Home├───┤End │ - * │ │ │ │ │ │ │ │ │ │ │ │PgD│ │ - * └────┴───┴───┴───┴──┴──────────┴──┴──┴───┴───┴────┴───┴────┘ - * 83 total - */ - [_FN] = LAYOUT( - FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, _______, _______, - _______, _______, KC_SYRQ, _______, _______, _______, _______, _______, KC_SCRL, _______, _______, _______, _______, _______, - _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, BL_STEP, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END - ), - // Function lock layer - // Everything on F-row locked to function layer, except ESC and DEL - [_FN_LOCK] = LAYOUT( - _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, MO(_FM), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [_FN] = LAYOUT( - FN_LOCK, 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_INS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, _______, _______, - _______, _______, KC_SYRQ, _______, _______, _______, _______, _______, KC_SCRL, _______, _______, _______, _______, _______, - _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, BL_STEP, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END - ), -}; -// clang-format on - -// Make sure to keep FN Lock even after reset -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case FN_LOCK: - if (record->event.pressed) { - if (layer_state_is(_FN)) { - set_single_persistent_default_layer(_FN_LOCK); - } - if (layer_state_is(_FM)) { - set_single_persistent_default_layer(_BASE); - } - } - return false; - break; - default: - break; - } - return true; -} diff --git a/keyboards/framework/laptop16/jis/rules.mk b/keyboards/framework/laptop16/jis/rules.mk deleted file mode 100644 index f31edcda205..00000000000 --- a/keyboards/framework/laptop16/jis/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -BACKLIGHT_ENABLE = yes -BACKLIGHT_DRIVER = pwm diff --git a/keyboards/framework/laptop16/macropad/config.h b/keyboards/framework/laptop16/macropad/config.h deleted file mode 100644 index 82a35035b1e..00000000000 --- a/keyboards/framework/laptop16/macropad/config.h +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#define MATRIX_COLS 8 -#define MATRIX_ROWS 4 - -#define DRIVER_COUNT 1 -#define DRIVER_ADDR_1 0b0100000 -#define RGB_MATRIX_LED_COUNT 24 -// Enable only the first 4 SW and disable software shutdown -// Otherwise voltage on SW pins without LEDs causes voltage rise and noise -#define ISSI_CONFIGURATION 0x71 - -// Limit current to ensure max current draw is just about 500mA -// when white at 100% brightness -#define ISSI_GLOBALCURRENT 185 diff --git a/keyboards/framework/laptop16/macropad/info.json b/keyboards/framework/laptop16/macropad/info.json deleted file mode 100644 index 4e4c344574d..00000000000 --- a/keyboards/framework/laptop16/macropad/info.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "keyboard_name": "Laptop 16 RGB Macropad", - "manufacturer": "Framework", - "maintainer": "JohnAZoidberg", - "bootloader": "rp2040", - "features": { - "bootmagic": false, - "mousekey": false, - "extrakey": true, - "console": true, - "command": false, - "nkro": true, - "audio": false - }, - "debounce": 5, - "processor": "RP2040", - "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040", - "usb": { - "device_version": "0.2.2", - "pid": "0x0013", - "vid": "0x32AC", - "force_nkro": true - }, - "backlight": { - "pin": "GP25" - }, - "layouts": { - "LAYOUT": { - "layout": [ - { "matrix": [ 2, 1], "x": 0, "y": 0, "h": 0.75 }, - { "matrix": [ 2, 2], "x": 1.25, "y": 0, "h": 0.75 }, - { "matrix": [ 3, 4], "x": 2.5, "y": 0, "h": 0.75 }, - { "matrix": [ 2, 4], "x": 3.75, "y": 0, "h": 0.75 }, - - { "matrix": [ 0, 0], "x": 0, "y": 1, "h": 1.25 }, - { "matrix": [ 0, 4], "x": 1.25, "y": 1, "h": 1.25 }, - { "matrix": [ 1, 1], "x": 2.5, "y": 1, "h": 1.25 }, - { "matrix": [ 1, 6], "x": 3.75, "y": 1, "h": 1.25 }, - - { "matrix": [ 0, 1], "x": 0, "y": 2.5, "h": 1.25 }, - { "matrix": [ 0, 5], "x": 1.25, "y": 2.5, "h": 1.25 }, - { "matrix": [ 1, 2], "x": 2.5, "y": 2.5, "h": 1.25 }, - { "matrix": [ 2, 5], "x": 3.75, "y": 2.5, "h": 1.25 }, - - { "matrix": [ 0, 2], "x": 0, "y": 4, "h": 1.25 }, - { "matrix": [ 0, 6], "x": 1.25, "y": 4, "h": 1.25 }, - { "matrix": [ 1, 3], "x": 2.5, "y": 4, "h": 1.25 }, - { "matrix": [ 1, 7], "x": 3.75, "y": 4, "h": 1.25 }, - - { "matrix": [ 0, 3], "x": 0, "y": 5.5, "h": 1.25 }, - { "matrix": [ 0, 7], "x": 1.25, "y": 5.5, "h": 1.25 }, - { "matrix": [ 1, 4], "x": 2.5, "y": 5.5, "h": 1.25 }, - { "matrix": [ 2, 6], "x": 3.75, "y": 5.5, "h": 1.25 }, - - { "matrix": [ 1, 0], "x": 0, "y": 7, "w": 2.25, "h": 1.25 }, - { "matrix": [ 2, 7], "x": 1.25, "y": 7, "h": 1.25 }, - { "matrix": [ 1, 5], "x": 2.5, "y": 7, "h": 1.25 }, - { "matrix": [ 2, 0], "x": 3.75, "y": 7, "h": 1.25 } - ] - } - } -} diff --git a/keyboards/framework/laptop16/macropad/keymaps/default/keymap.c b/keyboards/framework/laptop16/macropad/keymaps/default/keymap.c deleted file mode 100644 index c4fdfc82a7d..00000000000 --- a/keyboards/framework/laptop16/macropad/keymaps/default/keymap.c +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌───────┬───────┬───────┬───────┐ - * 4 keys │ RGB │RGB Nxt│ RGB + │ Sleep │ - * │Toggle │Effect │Brightn│ │ - * ├───────┼───────┼───────┼───────┤ - * 4 keys │Numpad │RGB Prv│ RGB - │ RGB BL│ - * │Layer │Effect │Brightn│ Step │ - * ├───────┼───────┼───────┼───────┤ - * 4 keys │ RGB + │ RGB + │ RGB + │ <-- │ - * │ Hue │ Sat │ Speed │ │ - * ├───────┼───────┼───────┼───────┤ - * 4 keys │ RGB - │ RGB - │ RGB - │ Enter │ - * │ Hue │ Sat │ Speed │ │ - * ├───────┼───────┼───────┼───────┤ - * 4 keys │ │ Up │ │ │ - * │ │ │ │ │ - * ├───────┼───────┼───────┼───────┤ - * 4 keys │ Left │ Down │ Right │ │ - * │ │ │ │ │ - * └───────┴───────┴───────┴───────┘ - * 24 total - */ - [0] = LAYOUT( - RGB_TOG, RGB_MOD, RGB_VAI, KC_SLEP, - TG(1), RGB_RMOD,RGB_VAD, BL_STEP, - RGB_HUI, RGB_SAI, RGB_SPI, KC_BSPC, - RGB_HUD, RGB_SAD, RGB_SPD, KC_ENT, - XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, - KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX - ), - /* Numpad - * ┌────┬────┬────┬────┐ - * 4 keys │Esc │Calc│ = │ <- │ - * ├────┼────┼────┼────┤ - * 4 keys │ │ / │ * │ - │ - * ├────┼────┼────┼────┤ - * 4 keys │ 7 │ 8 │ 9 │ + │ - * ├────┼────┼────┼────┤ - * 4 keys │ 4 │ 5 │ 6 │ + │ - * ├────┼────┼────┼────┤ - * 4 keys │ 1 │ 2 │ 3 │Entr│ - * ├────┼────┼────┼────┤ - * 4 keys │ 0 │ 0 │ . │Entr│ - * └────┴────┴────┴────┘ - * 24 total - */ - [1] = LAYOUT( - KC_ESC, KC_CALC, KC_EQL, KC_BSPC, - _______, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, KC_PENT, - KC_P0, KC_P0, KC_PDOT, KC_PENT - ), - /* Alphabet - * ┌────┬────┬────┬────┐ - * 4 keys │ A │ B │ C │ D │ - * ├────┼────┼────┼────┤ - * 4 keys │ E │ F │ G │ H │ - * ├────┼────┼────┼────┤ - * 4 keys │ I │ J │ K │ L │ - * ├────┼────┼────┼────┤ - * 4 keys │ M │ N │ O │ P │ - * ├────┼────┼────┼────┤ - * 4 keys │ Q │ R │ S │ T │ - * ├────┼────┼────┼────┤ - * 4 keys │ U │ V │ W │ X │ - * └────┴────┴────┴────┘ - * 24 total - */ - [2] = LAYOUT( - KC_A, KC_B, KC_C, KC_D, - KC_E, KC_F, KC_G, KC_H, - KC_I, KC_J, KC_K, KC_L, - KC_M, KC_N, KC_O, KC_P, - KC_Q, KC_R, KC_S, KC_T, - KC_U, KC_V, KC_W, KC_X - ) -}; -// clang-format on diff --git a/keyboards/framework/laptop16/macropad/keymaps/esther/keymap.c b/keyboards/framework/laptop16/macropad/keymaps/esther/keymap.c deleted file mode 100644 index 4933f0bf61e..00000000000 --- a/keyboards/framework/laptop16/macropad/keymaps/esther/keymap.c +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌───────┬───────┬───────┬───────┐ - * 4 keys │ RGB + │ RGB - │RGB Nxt│RGB Prv│ - * │Brightn│Brightn│Effect │Effect │ - * ├───────┼───────┼───────┼───────┤ - * 4 keys │Numpad │ │ │ CTRL+A│ - * │Layer │ │ │ │ - * ├───────┼───────┼───────┼───────┤ - * 4 keys │ Enter │ │ │ Delete│ - * │ │ │ │ │ - * ├───────┼───────┼───────┼───────┤ - * 4 keys │ Save │ A │ V │ Cut │ - * │ │ │ │ │ - * ├───────┼───────┼───────┼───────┤ - * 4 keys │ + │ CTRL │ Undo │ Copy │ - * │ │ + │ │ │ - * ├───────┼───────┼───────┼───────┤ - * 4 keys │ - │ CTRL │ Redo │ Paste │ - * │ │ - │ │ │ - * └───────┴───────┴───────┴───────┴ - * 24 total - */ - [0] = LAYOUT( - RGB_VAI, RGB_VAD, RGB_MOD, RGB_RMOD, - TG(1), XXXXXXX, XXXXXXX, C(KC_A), - KC_ENT, XXXXXXX, XXXXXXX, KC_DEL, - C(KC_S), KC_A, KC_V, C(KC_X), - KC_PPLS, C(KC_EQL), C(KC_Z), C(KC_C), - KC_PMNS, C(KC_MINS),C(KC_Y), C(KC_V) - ), - /* Numpad - * ┌────┬────┬────┬────┐ - * 4 keys │Esc │Calc│ = │ <- │ - * ├────┼────┼────┼────┤ - * 4 keys │ Num│ / │ * │ - │ - * ├────┼────┼────┼────┤ - * 3 keys │ 7 │ 8 │ 9 │ + │ - * ├────┼────┼────┼────┤ - * 4 keys │ 4 │ 5 │ 6 │ + │ - * ├────┼────┼────┼────┤ - * 3 keys │ 1 │ 2 │ 3 │Entr│ - * ├────┼────┼────┼────┤ - * 3 keys │ 0 │ 0 │ . │Entr│ - * └────┼────┴────┴────┴ - * 21 total - */ - [1] = LAYOUT( - KC_ESC, KC_CALC, KC_EQL, KC_BSPC, - _______, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, KC_PENT, - KC_P0, KC_P0, KC_PDOT, KC_PENT - ) -}; -// clang-format on diff --git a/keyboards/framework/laptop16/macropad/macropad.c b/keyboards/framework/laptop16/macropad/macropad.c deleted file mode 100644 index d5cb507b040..00000000000 --- a/keyboards/framework/laptop16/macropad/macropad.c +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H diff --git a/keyboards/framework/laptop16/macropad/rules.mk b/keyboards/framework/laptop16/macropad/rules.mk deleted file mode 100644 index 894753ca32b..00000000000 --- a/keyboards/framework/laptop16/macropad/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -# TODO: Wait for PR #21343 to hit master -RGB_MATRIX_ENABLE = no -RGB_MATRIX_DRIVER = IS31FL3743A diff --git a/keyboards/framework/laptop16/numpad/config.h b/keyboards/framework/laptop16/numpad/config.h deleted file mode 100644 index e01395b5e4c..00000000000 --- a/keyboards/framework/laptop16/numpad/config.h +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#define MATRIX_COLS 8 -#define MATRIX_ROWS 4 diff --git a/keyboards/framework/laptop16/numpad/info.json b/keyboards/framework/laptop16/numpad/info.json deleted file mode 100644 index ea62ff5c400..00000000000 --- a/keyboards/framework/laptop16/numpad/info.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "keyboard_name": "Laptop 16 Numpad Module", - "manufacturer": "Framework", - "maintainer": "JohnAZoidberg", - "bootloader": "rp2040", - "features": { - "bootmagic": false, - "mousekey": false, - "extrakey": true, - "console": true, - "command": false, - "nkro": true, - "audio": false - }, - "debounce": 5, - "processor": "RP2040", - "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040", - "usb": { - "device_version": "0.2.2", - "pid": "0x0014", - "vid": "0x32AC", - "force_nkro": true - }, - "backlight": { - "pin": "GP25" - }, - "layouts": { - "LAYOUT": { - "layout": [ - { "matrix": [ 2, 1], "label": "ESC", "x": 0, "y": 0, "h": 0.75 }, - { "matrix": [ 2, 2], "label": "+ -", "x": 1.25, "y": 0, "h": 0.75 }, - { "matrix": [ 3, 4], "label": "=", "x": 2.5, "y": 0, "h": 0.75 }, - { "matrix": [ 2, 4], "label": "<--", "x": 3.75, "y": 0, "h": 0.75 }, - - { "matrix": [ 0, 0], "label": "Num Lock", "x": 0, "y": 1, "h": 1.25 }, - { "matrix": [ 0, 4], "label": "-", "x": 1.25, "y": 1, "h": 1.25 }, - { "matrix": [ 1, 1], "label": "*", "x": 2.5, "y": 1, "h": 1.25 }, - { "matrix": [ 1, 6], "label": "-", "x": 3.75, "y": 1, "h": 1.25 }, - - { "matrix": [ 0, 1], "label": "7", "x": 0, "y": 2.5, "h": 1.25 }, - { "matrix": [ 0, 5], "label": "8", "x": 1.25, "y": 2.5, "h": 1.25 }, - { "matrix": [ 1, 2], "label": "9", "x": 2.5, "y": 2.5, "h": 1.25 }, - - { "matrix": [ 0, 2], "label": "4", "x": 0, "y": 4, "h": 1.25 }, - { "matrix": [ 0, 6], "label": "5", "x": 1.25, "y": 4, "h": 1.25 }, - { "matrix": [ 1, 3], "label": "6", "x": 2.5, "y": 4, "h": 1.25 }, - { "matrix": [ 1, 7], "label": "+", "x": 3.75, "y": 2.5, "h": 2.75 }, - - { "matrix": [ 0, 3], "label": "1", "x": 0, "y": 5.5, "h": 1.25 }, - { "matrix": [ 0, 7], "label": "2", "x": 1.25, "y": 5.5, "h": 1.25 }, - { "matrix": [ 1, 4], "label": "3", "x": 2.5, "y": 5.5, "h": 1.25 }, - - { "matrix": [ 1, 0], "label": "0", "x": 0, "y": 7, "w": 2.25, "h": 1.25 }, - { "matrix": [ 2, 7], "label": ".", "x": 2.5, "y": 7, "h": 1.25 } - { "matrix": [ 1, 5], "label": "Enter", "x": 3.75, "y": 5.5, "h": 2.75 }, - ] - } - } -} diff --git a/keyboards/framework/laptop16/numpad/keymaps/default/keymap.c b/keyboards/framework/laptop16/numpad/keymaps/default/keymap.c deleted file mode 100644 index 021b506ccf0..00000000000 --- a/keyboards/framework/laptop16/numpad/keymaps/default/keymap.c +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2022-2023 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌────┬────┬────┬────┐ - * 4 keys │Esc │Calc│ = │ <- │ - * ├────┼────┼────┼────┤ - * 4 keys │ Num│ / │ * │ - │ - * ├────┼────┼────┼────┤ - * 3 keys │ 7 │ 8 │ 9 │ │ - * ├────┼────┼────┤ │ - * 4 keys │ 4 │ 5 │ 6 │ + │ - * ├────┼────┼────┼────┤ - * 3 keys │ 1 │ 2 │ 3 │ │ - * ├────┴────┼────┤ │ - * 3 keys │ 0 │ . │Entr│ - * └─────────┴────┴────┴ - * 21 total - */ - [_NUMLOCK] = LAYOUT( - KC_ESC, KC_CALC, KC_EQL, KC_BSPC, - KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, - KC_P0, KC_PDOT, KC_PENT - ), - /* - * Extra keys for when numlock is disabled. - * Numlock keys are passed through to the number layer, - * and automatically remapped by the OS. - * ┌────┬────┬────┬────┐ - * 4 keys │ │ │ │ │ - * ├────┼────┼────┼────┤ - * 4 keys │ │ │ │ │ - * ├────┼────┼────┼────┤ - * 3 keys │Home│ ↑ │PgUp│BL │ - * ├────┼────┼────┤Brtg│ - * 4 keys │ ← │ │ → │ | - * ├────┼────┼────┼────┤ - * 3 keys │End │ ↓ │PdDn│BL │ - * ├────┴────┼────┤Step│ - * 3 keys │ Insert │Del │ │ - * └─────────┴────┴────┴ - * 21 total - */ - [_FN] = LAYOUT( - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, - _______, _______, _______, BL_BRTG, - _______, _______, _______, - _______, _______, BL_STEP - - ) - -}; -// clang-format on - -bool led_update_user(led_t led_state) { - // Change layer if numlock state changes, either triggered by OS or - // by numlock key on this keyboard - if (led_state.num_lock) { - layer_off(_FN); - } else { - layer_on(_FN); - } - return true; -} diff --git a/keyboards/framework/laptop16/numpad/numpad.c b/keyboards/framework/laptop16/numpad/numpad.c deleted file mode 100644 index 2838df53915..00000000000 --- a/keyboards/framework/laptop16/numpad/numpad.c +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2023 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "quantum.h" -#include "numpad.h" - -void keyboard_post_init_user(void) { - // Sync initial numlock state from the host - if (host_keyboard_led_state().num_lock) { - layer_on(_NUMLOCK); - } else { - layer_off(_FN); - } -} diff --git a/keyboards/framework/laptop16/numpad/numpad.h b/keyboards/framework/laptop16/numpad/numpad.h deleted file mode 100644 index 50ef2eb2640..00000000000 --- a/keyboards/framework/laptop16/numpad/numpad.h +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2022-2023 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -enum _layers { - _NUMLOCK, - _FN -}; diff --git a/keyboards/framework/laptop16/numpad/rules.mk b/keyboards/framework/laptop16/numpad/rules.mk deleted file mode 100644 index f31edcda205..00000000000 --- a/keyboards/framework/laptop16/numpad/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -BACKLIGHT_ENABLE = yes -BACKLIGHT_DRIVER = pwm diff --git a/keyboards/framework/laptop16/readme.md b/keyboards/framework/laptop16/readme.md index 606448f9aa5..96f0894f948 100644 --- a/keyboards/framework/laptop16/readme.md +++ b/keyboards/framework/laptop16/readme.md @@ -8,24 +8,13 @@ Keyboard input modules for the Framework Laptop 16. ## Variants -There are 5 different hardware variants with different number of keys and -backlight options. - | Name | Size | Backlight | Keys | | -------- | -------- | ---------- | ---- | | ansi | Keyboard | RGB/White | 78 | -| iso | Keyboard | White | 79 | -| jis | Keyboard | White | 83 | -| numpad | Numpad | White | 21 | -| macropad | Numpad | RGB | 24 | Make example for this keyboard (after setting up your build environment): qmk compile -kb framework/laptop16/ansi -km default - qmk compile -kb framework/laptop16/iso -km default - qmk compile -kb framework/laptop16/jis -km default - qmk compile -kb framework/laptop16/numpad -km default - qmk compile -kb framework/laptop16/macropad -km default Flashing example for the ANSI keyboard: From cfe27c331e620b06324829600576db39e6134103 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 16 Aug 2023 02:44:58 +0800 Subject: [PATCH 14/31] keyboards/framework: Simplify to ANSI white backlight Signed-off-by: Daniel Schaefer --- keyboards/framework/laptop16/ansi/ansi.c | 4 - keyboards/framework/laptop16/ansi/config.h | 16 +-- keyboards/framework/laptop16/ansi/info.json | 4 +- .../laptop16/ansi/keymaps/advanced/keymap.c | 6 +- .../laptop16/ansi/keymaps/default/keymap.c | 6 +- .../laptop16/ansi/keymaps/via/keymap.c | 108 +++++++++++++++ .../laptop16/ansi/keymaps/via/rules.mk | 1 + keyboards/framework/laptop16/ansi/rules.mk | 3 - keyboards/framework/laptop16/config.h | 103 +-------------- keyboards/framework/laptop16/framework.c | 123 +----------------- keyboards/framework/laptop16/framework.h | 20 +-- keyboards/framework/laptop16/halconf.h | 4 +- keyboards/framework/laptop16/matrix.c | 24 +--- keyboards/framework/laptop16/matrix.h | 6 - keyboards/framework/laptop16/mcuconf.h | 6 +- keyboards/framework/laptop16/readme.md | 2 +- keyboards/framework/laptop16/rules.mk | 13 +- 17 files changed, 133 insertions(+), 316 deletions(-) delete mode 100644 keyboards/framework/laptop16/ansi/ansi.c create mode 100644 keyboards/framework/laptop16/ansi/keymaps/via/keymap.c create mode 100644 keyboards/framework/laptop16/ansi/keymaps/via/rules.mk delete mode 100644 keyboards/framework/laptop16/matrix.h diff --git a/keyboards/framework/laptop16/ansi/ansi.c b/keyboards/framework/laptop16/ansi/ansi.c deleted file mode 100644 index d5cb507b040..00000000000 --- a/keyboards/framework/laptop16/ansi/ansi.c +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H diff --git a/keyboards/framework/laptop16/ansi/config.h b/keyboards/framework/laptop16/ansi/config.h index d62d457df8a..3ae475ae775 100644 --- a/keyboards/framework/laptop16/ansi/config.h +++ b/keyboards/framework/laptop16/ansi/config.h @@ -1,17 +1,7 @@ -// Copyright 2022 Framework Computer +// Copyright 2022-2023 Framework Computer // SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + #define MATRIX_COLS 16 #define MATRIX_ROWS 8 - -#define DRIVER_COUNT 2 -#define DRIVER_ADDR_1 0b0100000 -#define DRIVER_ADDR_2 0b0100011 -#define DRIVER_1_LED_TOTAL 48 -#define DRIVER_2_LED_TOTAL 49 -#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#define ISSI_CONFIGURATION 0x21 // Enable only the first 9 SW and disable software shutdown - -// Limit current to ensure max current draw is just about 500mA -// when white att 100% brightness -#define ISSI_GLOBALCURRENT 104 diff --git a/keyboards/framework/laptop16/ansi/info.json b/keyboards/framework/laptop16/ansi/info.json index 4920b3ecd92..fff52ffc07d 100644 --- a/keyboards/framework/laptop16/ansi/info.json +++ b/keyboards/framework/laptop16/ansi/info.json @@ -12,7 +12,6 @@ "nkro": true, "audio": false }, - "debounce": 5, "processor": "RP2040", "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040", "usb": { @@ -24,6 +23,9 @@ "backlight": { "pin": "GP25" }, + "indicators": { + "caps_lock": "GP24" + }, "layout_aliases": { "LAYOUT_default": "LAYOUT" }, diff --git a/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c b/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c index 85381098ffe..fb0d584f284 100644 --- a/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c +++ b/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c @@ -1,4 +1,4 @@ -// Copyright 2022 Framework Computer +// Copyright 2022-2023 Framework Computer // SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * 78 total */ [_FN] = LAYOUT( - FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, + FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, G(KC_P), XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, KC_SLEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______, _______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______, @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Function lock layer // Everything on F-row locked to function layer, except ESC and DEL [_FN_LOCK] = LAYOUT( - _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, _______, + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, G(KC_P), XXXXXXX, KC_PSCR, KC_MSEL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/framework/laptop16/ansi/keymaps/default/keymap.c b/keyboards/framework/laptop16/ansi/keymaps/default/keymap.c index fce5e643308..b7fa55107d3 100644 --- a/keyboards/framework/laptop16/ansi/keymaps/default/keymap.c +++ b/keyboards/framework/laptop16/ansi/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -// Copyright 2022 Framework Computer +// Copyright 2022-2023 Framework Computer // SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * 78 total */ [_FN] = LAYOUT( - FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, + FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, G(KC_P), XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______, _______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______, @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Function lock layer // Everything on F-row locked to function layer, except ESC and DEL [_FN_LOCK] = LAYOUT( - _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, KC_SCRN, XXXXXXX, KC_PSCR, KC_MSEL, _______, + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, G(KC_P), XXXXXXX, KC_PSCR, KC_MSEL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c b/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c new file mode 100644 index 00000000000..b7fa55107d3 --- /dev/null +++ b/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c @@ -0,0 +1,108 @@ +// Copyright 2022-2023 Framework Computer +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +#include "framework.h" + +// clang-format off +enum _layers { + _BASE, + _FN, + _FN_LOCK, + _FM +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ + * 14 keys │Esc │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Del│ + * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ + * 14 keys │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Backsp│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * 14 keys │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤ + * 13 keys │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───────┤ + * 12 keys │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ + * ├────┬───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ + * │ │ │ │ │ │ │ │ │↑ │ │ + * 11 keys │Ctrl│FN │GUI│Alt│ │Alt│Ctl│ ← ├───┤ → │ + * │ │ │ │ │ │ │ │ │ ↓│ │ + * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ + * 78 total + */ + [_BASE] = LAYOUT( + 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_DEL, + 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_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_BSLS, + 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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, MO(_FN), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT + ), + /* + * Function layer + * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ + * 14 keys │FN lk│Mut│vDn│vUp│Prv│Ply│Nxt│bDn│bUp│Scn│Air│Prt│App│Ins │ + * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ + * 14 keys │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * 14 keys │ │ │RGB│Nxt│Hue│Sat│Spd│Brt│ │ │Pau│ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤ + * 13 keys │ │ │SRq│Prv│Hue│Sat│Spd│Brt│ScL│ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───────┤ + * 12 keys │ │ │ │ │ │ │Brk│ │ │ │ │ │ + * ├────┬───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ + * │ │ │ │ │ │ │ │ │PgU│ │ + * 11 keys │ │ │ │ │ Toggle Backlight │ │ │Home├───┤End │ + * │ │ │ │ │ │ │ │ │PgD│ │ + * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ + * 78 total + */ + [_FN] = LAYOUT( + FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, G(KC_P), XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______, + _______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______, + _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END + ), + // Function lock layer + // Everything on F-row locked to function layer, except ESC and DEL + [_FN_LOCK] = LAYOUT( + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, G(KC_P), XXXXXXX, KC_PSCR, KC_MSEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, MO(_FM), _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FM] = LAYOUT( + FN_LOCK, 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_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______, + _______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______, + _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END + ), +}; +// clang-format on + +// Make sure to keep FN Lock even after reset +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case FN_LOCK: + if (record->event.pressed) { + if (layer_state_is(_FN)) { + set_single_persistent_default_layer(_FN_LOCK); + } + if (layer_state_is(_FM)) { + set_single_persistent_default_layer(_BASE); + } + } + return false; + break; + default: + break; + } + return true; +} diff --git a/keyboards/framework/laptop16/ansi/keymaps/via/rules.mk b/keyboards/framework/laptop16/ansi/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/framework/laptop16/ansi/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/framework/laptop16/ansi/rules.mk b/keyboards/framework/laptop16/ansi/rules.mk index 1cf0e488128..02783e322fb 100644 --- a/keyboards/framework/laptop16/ansi/rules.mk +++ b/keyboards/framework/laptop16/ansi/rules.mk @@ -1,5 +1,2 @@ # Debugging (enabled in info.json) #CONSOLE_ENABLE = yes -# TODO: Wait for PR #21343 to hit master -RGB_MATRIX_ENABLE = no -RGB_MATRIX_DRIVER = IS31FL3743A diff --git a/keyboards/framework/laptop16/config.h b/keyboards/framework/laptop16/config.h index 653cd54f0b7..57b0bd2422c 100644 --- a/keyboards/framework/laptop16/config.h +++ b/keyboards/framework/laptop16/config.h @@ -1,4 +1,4 @@ -// Copyright 2022 Framework Computer +// Copyright 2022-2023 Framework Computer // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -19,20 +19,7 @@ // Prints every second how many matrix scans were done (Frequency in Hz) // Only during debugging, since it prevents the host from going to sleep -//#define DEBUG_MATRIX_SCAN_RATE - -// Prototype for Framework Laptop 16 with Raspberry Pi Pico -// It'll disable column drive because we need to remap some pins to there -// SDB is mapped to GP22 -//#define PICO_FL16 - -#ifdef KEYBOARD_framework_ansi -# define LED_CAPS_LOCK_PIN GP24 -#elif KEYBOARD_framework_iso -# define LED_CAPS_LOCK_PIN GP24 -#elif KEYBOARD_framework_jis -# define LED_CAPS_LOCK_PIN GP24 -#endif +// #define DEBUG_MATRIX_SCAN_RATE // PWM single one backlight configuration // GPIO25 maps to PWM channel 4B of the RP2040 @@ -43,89 +30,3 @@ // Change PWM frequency to 24kHz, the default of 2048Hz causes loud noise // TODO: Waiting for PR #21717 // #define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 24000 - -// I2C for the RBG controller -#define I2C_DRIVER I2CD1 -#define I2C1_SDA_PIN GP26 -#define I2C1_SCL_PIN GP27 - -// RGB config - -#define RGB_DISABLE_WHEN_USB_SUSPENDED - -// RGB Matrix Animation modes. Explicitly enabled -// For full list of effects, see: -// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects -// 0 = Off -// 1 = Solid Color -// 2 -#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 -// 10 -#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 -// 20 -#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_RAIN -#define ENABLE_RGB_MATRIX_PIXEL_FLOW -// 30 -#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL - -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -#define ENABLE_RGB_MATRIX_TYPING_HEATMAP -#define ENABLE_RGB_MATRIX_DIGITAL_RAIN - -#define RGB_MATRIX_KEYPRESSES -// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -// 33 -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// 40 -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define ENABLE_RGB_MATRIX_SPLASH -#define ENABLE_RGB_MATRIX_MULTISPLASH -#define ENABLE_RGB_MATRIX_SOLID_SPLASH -#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH - -/* - * 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 diff --git a/keyboards/framework/laptop16/framework.c b/keyboards/framework/laptop16/framework.c index cd18920546b..58a42f0a19f 100644 --- a/keyboards/framework/laptop16/framework.c +++ b/keyboards/framework/laptop16/framework.c @@ -1,4 +1,4 @@ -// Copyright 2022 Framework Computer +// Copyright 2022-2023 Framework Computer // SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" @@ -29,126 +29,5 @@ void keyboard_pre_init_kb(void) { setPinOutput(MUX_ENABLE_GPIO); writePinHigh(MUX_ENABLE_GPIO); -#ifdef RGB_MATRIX_ENABLE - setPinOutput(IS31FL3743A_ENABLE_GPIO); - writePinHigh(IS31FL3743A_ENABLE_GPIO); -#endif setPinInput(SLEEP_GPIO); } - -/** - * Called by QMK when the keyboard suspends - */ -void suspend_power_down_kb(void) { - suspend_power_down_user(); - -#ifdef RGB_MATRIX_ENABLE - writePinLow(IS31FL3743A_ENABLE_GPIO); -#endif -} - -/** - * Called by QMK when the keyboard wakes up from suspend - */ -void suspend_wakeup_init_kb(void) { - suspend_wakeup_init_user(); - -#ifdef RGB_MATRIX_ENABLE - setPinOutput(IS31FL3743A_ENABLE_GPIO); - writePinHigh(IS31FL3743A_ENABLE_GPIO); -#endif -} - -// If in BIOS mode, no matter what the keys have been remapped to, -// always send them as the F keys -bool bios_mode = false; -bool handle_bios_hotkeys(uint16_t keycode, keyrecord_t *record) { - // Not in bios mode, no special handling, handle as normal - if (!bios_mode) return true; - - if (record->event.key.col == 5 && record->event.key.row == 2) { - if (record->event.pressed) { - register_code(KC_F2); - } else { - unregister_code(KC_F2); - } - return false; - } - - if (record->event.key.col == 8 && record->event.key.row == 4) { - if (record->event.pressed) { - register_code(KC_F10); - } else { - unregister_code(KC_F10); - } - return false; - } - - if (record->event.key.col == 13 && record->event.key.row == 3) { - if (record->event.pressed) { - register_code(KC_F12); - } else { - unregister_code(KC_F12); - } - return false; - } - - return true; -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - process_record_user(keycode, record); - - if (!handle_bios_hotkeys(keycode, record)) { - return false; - } - -#ifdef RGB_MATRIX_ENABLE - uint8_t h; - uint8_t s; - uint8_t v; - uint8_t new_v; -#endif - - switch (keycode) { - // Implement step brightness for RGB backlight -#ifdef RGB_MATRIX_ENABLE - case BL_STEP: - if (record->event.pressed) { - h = rgb_matrix_get_hue(); - s = rgb_matrix_get_sat(); - v = rgb_matrix_get_val(); - switch (v) { - default: // Default when user set to a different level - case 0: - new_v = 85; - break; - case 85: - new_v = 170; - break; - case 170: - new_v = 255; - break; - case 255: - new_v = 0; - break; - } - rgb_matrix_sethsv(h, s, new_v); - } - return true; -#endif - case KC_SCRN: - // Simulate press WIN+P - // Works (at least) on Windows and GNOME - if (record->event.pressed) { - register_code(KC_LGUI); - register_code(KC_P); - } else { - unregister_code(KC_P); - unregister_code(KC_LGUI); - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} diff --git a/keyboards/framework/laptop16/framework.h b/keyboards/framework/laptop16/framework.h index 6007ec058bf..e1944b10e6b 100644 --- a/keyboards/framework/laptop16/framework.h +++ b/keyboards/framework/laptop16/framework.h @@ -1,29 +1,15 @@ -// Copyright 2022 Framework Computer +// Copyright 2022-2023 Framework Computer // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include "quantum.h" -#if KEYBOARD_framework_numpad -# include "numpad.h" -#endif - enum framework_keycodes { - // Custom keycode to change screen modes (e.g. enable external screen) - KC_SCRN = SAFE_RANGE, - FN_LOCK, + // Function lock button + FN_LOCK = SAFE_RANGE, }; -extern bool bios_mode; - #define SLEEP_GPIO GP0 #define MUX_ENABLE_GPIO GP4 #define BOOT_DONE_GPIO GP5 -// Pin SDB to enable the RGB controller -#ifdef PICO_FL16 -// 22 only on RPi Pico because it doesn't have GP29 -# define IS31FL3743A_ENABLE_GPIO GP22 -#else -# define IS31FL3743A_ENABLE_GPIO GP29 -#endif diff --git a/keyboards/framework/laptop16/halconf.h b/keyboards/framework/laptop16/halconf.h index 4b6d4a7f273..c96c5bfb3cd 100644 --- a/keyboards/framework/laptop16/halconf.h +++ b/keyboards/framework/laptop16/halconf.h @@ -1,10 +1,8 @@ -// Copyright 2022 Framework Computer +// Copyright 2022-2023 Framework Computer // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#define HAL_USE_SIO TRUE - // For single-zone backlight #define HAL_USE_PWM TRUE diff --git a/keyboards/framework/laptop16/matrix.c b/keyboards/framework/laptop16/matrix.c index 41d6d3bc98a..2bb20a4e448 100644 --- a/keyboards/framework/laptop16/matrix.c +++ b/keyboards/framework/laptop16/matrix.c @@ -1,4 +1,4 @@ -// Copyright 2022 Framework Computer +// Copyright 2022-2023 Framework Computer // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -126,13 +126,6 @@ static bool interpret_adc_row(matrix_row_t cur_matrix[], adc10ksample_t voltage, key_state = true; } - // Don't update matrix on Pico to avoid messing with the debug system - // Can't attach the matrix anyways - //#ifdef PICO_FL16 - //(void)key_state; - // return false; - //#endif - matrix_row_t new_row = cur_matrix[row]; if (key_state) { new_row |= (1 << col); @@ -140,10 +133,6 @@ static bool interpret_adc_row(matrix_row_t cur_matrix[], adc10ksample_t voltage, new_row &= ~(1 << col); } changed = cur_matrix[row] != new_row; - if (key_state) { - uprintf("old row: %d\n", cur_matrix[row]); - uprintf("new row: %d\n", new_row); - } cur_matrix[row] = new_row; return changed; @@ -210,12 +199,6 @@ void drive_col(int col, bool high) { return; } - // Don't drive columns on pico because we're using these GPIOs for other purposes - //#ifdef PICO_FL16 - // (void)gpio; - // return; - //#endif - if (high) { // TODO: Could set up the pins with `setPinOutputOpenDrain` instead writePinHigh(gpio); @@ -246,11 +229,6 @@ bool handle_idle(void) { if (prev_asleep != asleep) { prev_asleep = asleep; } -#ifdef RGB_MATRIX_ENABLE - if (rgb_matrix_get_suspend_state() != asleep) { - rgb_matrix_set_suspend_state(asleep); - } -#endif return false; } diff --git a/keyboards/framework/laptop16/matrix.h b/keyboards/framework/laptop16/matrix.h deleted file mode 100644 index d730877dc5c..00000000000 --- a/keyboards/framework/laptop16/matrix.h +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2022 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "quantum.h" diff --git a/keyboards/framework/laptop16/mcuconf.h b/keyboards/framework/laptop16/mcuconf.h index 6370452922b..e3886675480 100644 --- a/keyboards/framework/laptop16/mcuconf.h +++ b/keyboards/framework/laptop16/mcuconf.h @@ -1,4 +1,4 @@ -// Copyright 2022 Framework Computer +// Copyright 2022-2023 Framework Computer // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -6,7 +6,7 @@ #include_next #undef RP_SIO_USE_UART0 -#define RP_SIO_USE_UART0 TRUE +#define RP_SIO_USE_UART0 FALSE #undef RP_SIO_USE_UART1 #define RP_SIO_USE_UART1 FALSE @@ -18,8 +18,6 @@ #undef RP_PWM_USE_PWM4 #define RP_PWM_USE_PWM4 TRUE -#undef RP_I2C_USE_I2C1 -#define RP_I2C_USE_I2C1 TRUE /* * IRQ system settings. diff --git a/keyboards/framework/laptop16/readme.md b/keyboards/framework/laptop16/readme.md index 96f0894f948..e67bf99f631 100644 --- a/keyboards/framework/laptop16/readme.md +++ b/keyboards/framework/laptop16/readme.md @@ -10,7 +10,7 @@ Keyboard input modules for the Framework Laptop 16. | Name | Size | Backlight | Keys | | -------- | -------- | ---------- | ---- | -| ansi | Keyboard | RGB/White | 78 | +| ansi | Keyboard | White | 78 | Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/framework/laptop16/rules.mk b/keyboards/framework/laptop16/rules.mk index 3b8d9e87e74..2586f31e889 100644 --- a/keyboards/framework/laptop16/rules.mk +++ b/keyboards/framework/laptop16/rules.mk @@ -1,14 +1,3 @@ -# VIA support uses raw HID, don't need to enable it extra. -# Only when disabling VIA but still wanting to use RAW, need to enable it here. -VIA_ENABLE = yes -RAW_ENABLE = no - -# Enabled in info.json -# EXTRAKEY_ENABLE = yes # Audio control and System control - -# Enable for all. ANSI keyboard supports RGB and white, macropad only RGB, all others only white. -# No harm in enabling it for all. -# Also RP pico has the built-in LED wired to the same GPIO. Good for prototyping BACKLIGHT_ENABLE = yes BACKLIGHT_DRIVER = pwm @@ -16,6 +5,6 @@ BACKLIGHT_DRIVER = pwm CUSTOM_MATRIX = lite SRC += matrix.c analog.c -DEFAULT_FOLDER = framework/ansi +DEFAULT_FOLDER = framework/laptop16/ansi OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From 186cc4fb8d86ab23824c5f9e1f8f9fd444d0bb9e Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 16 Aug 2023 03:05:17 +0800 Subject: [PATCH 15/31] keyboards/framework: Use _kb functions in keyboard Signed-off-by: Daniel Schaefer --- keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c | 5 ++++- keyboards/framework/laptop16/ansi/keymaps/default/keymap.c | 5 ++++- keyboards/framework/laptop16/ansi/keymaps/via/keymap.c | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c b/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c index fb0d584f284..28764ee1e71 100644 --- a/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c +++ b/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c @@ -96,7 +96,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on // Make sure to keep FN Lock even after reset -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } switch (keycode) { case FN_LOCK: if (record->event.pressed) { diff --git a/keyboards/framework/laptop16/ansi/keymaps/default/keymap.c b/keyboards/framework/laptop16/ansi/keymaps/default/keymap.c index b7fa55107d3..05d2103143b 100644 --- a/keyboards/framework/laptop16/ansi/keymaps/default/keymap.c +++ b/keyboards/framework/laptop16/ansi/keymaps/default/keymap.c @@ -88,7 +88,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on // Make sure to keep FN Lock even after reset -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } switch (keycode) { case FN_LOCK: if (record->event.pressed) { diff --git a/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c b/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c index b7fa55107d3..05d2103143b 100644 --- a/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c +++ b/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c @@ -88,7 +88,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on // Make sure to keep FN Lock even after reset -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } switch (keycode) { case FN_LOCK: if (record->event.pressed) { From 66bf538732434fdd2cb402b0b23881798797ca0c Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Fri, 18 Aug 2023 10:31:28 +0800 Subject: [PATCH 16/31] keyboards/framework: Use QK_KB instead of SAFE_RANGE Signed-off-by: Daniel Schaefer --- keyboards/framework/laptop16/framework.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/framework/laptop16/framework.h b/keyboards/framework/laptop16/framework.h index e1944b10e6b..af57611a4c4 100644 --- a/keyboards/framework/laptop16/framework.h +++ b/keyboards/framework/laptop16/framework.h @@ -7,7 +7,7 @@ enum framework_keycodes { // Function lock button - FN_LOCK = SAFE_RANGE, + FN_LOCK = QK_KB, }; #define SLEEP_GPIO GP0 From 00ef5e6b0aab2bffe304debdf44df969bdfd2bad Mon Sep 17 00:00:00 2001 From: peepeetee Date: Tue, 6 May 2025 13:18:21 +0800 Subject: [PATCH 17/31] implement @zvecr's comments circa 2023 --- keyboards/framework/laptop16/ansi/info.json | 7 +++---- .../laptop16/ansi/keymaps/advanced/keymap.c | 5 +---- .../laptop16/ansi/keymaps/default/keymap.c | 5 +---- .../framework/laptop16/ansi/keymaps/via/keymap.c | 5 +---- keyboards/framework/laptop16/ansi/rules.mk | 3 +-- keyboards/framework/laptop16/config.h | 1 - keyboards/framework/laptop16/framework.c | 14 +++++++------- keyboards/framework/laptop16/mcuconf.h | 4 ---- keyboards/framework/laptop16/rules.mk | 4 +--- 9 files changed, 15 insertions(+), 33 deletions(-) diff --git a/keyboards/framework/laptop16/ansi/info.json b/keyboards/framework/laptop16/ansi/info.json index fff52ffc07d..47fd19c407e 100644 --- a/keyboards/framework/laptop16/ansi/info.json +++ b/keyboards/framework/laptop16/ansi/info.json @@ -21,14 +21,13 @@ "force_nkro": true }, "backlight": { - "pin": "GP25" + "driver": "pwm", + "pin": "GP25", + "breathing": true }, "indicators": { "caps_lock": "GP24" }, - "layout_aliases": { - "LAYOUT_default": "LAYOUT" - }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c b/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c index 28764ee1e71..fb0d584f284 100644 --- a/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c +++ b/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c @@ -96,10 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on // Make sure to keep FN Lock even after reset -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { - return false; - } +bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case FN_LOCK: if (record->event.pressed) { diff --git a/keyboards/framework/laptop16/ansi/keymaps/default/keymap.c b/keyboards/framework/laptop16/ansi/keymaps/default/keymap.c index 05d2103143b..b7fa55107d3 100644 --- a/keyboards/framework/laptop16/ansi/keymaps/default/keymap.c +++ b/keyboards/framework/laptop16/ansi/keymaps/default/keymap.c @@ -88,10 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on // Make sure to keep FN Lock even after reset -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { - return false; - } +bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case FN_LOCK: if (record->event.pressed) { diff --git a/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c b/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c index 05d2103143b..b7fa55107d3 100644 --- a/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c +++ b/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c @@ -88,10 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on // Make sure to keep FN Lock even after reset -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { - return false; - } +bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case FN_LOCK: if (record->event.pressed) { diff --git a/keyboards/framework/laptop16/ansi/rules.mk b/keyboards/framework/laptop16/ansi/rules.mk index 02783e322fb..6e7633bfe01 100644 --- a/keyboards/framework/laptop16/ansi/rules.mk +++ b/keyboards/framework/laptop16/ansi/rules.mk @@ -1,2 +1 @@ -# Debugging (enabled in info.json) -#CONSOLE_ENABLE = yes +# This file intentionally left blank diff --git a/keyboards/framework/laptop16/config.h b/keyboards/framework/laptop16/config.h index 57b0bd2422c..289f6c7c9c1 100644 --- a/keyboards/framework/laptop16/config.h +++ b/keyboards/framework/laptop16/config.h @@ -26,7 +26,6 @@ // On the Raspberry Pi Pico this is the green LED on the board, good for prototyping #define BACKLIGHT_PWM_DRIVER PWMD4 #define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_B -#define BACKLIGHT_BREATHING // Change PWM frequency to 24kHz, the default of 2048Hz causes loud noise // TODO: Waiting for PR #21717 // #define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 24000 diff --git a/keyboards/framework/laptop16/framework.c b/keyboards/framework/laptop16/framework.c index 58a42f0a19f..2f0fbec81d9 100644 --- a/keyboards/framework/laptop16/framework.c +++ b/keyboards/framework/laptop16/framework.c @@ -4,14 +4,14 @@ #include "quantum.h" #include "framework.h" -void keyboard_post_init_kb(void) { - keyboard_post_init_user(); +// void keyboard_post_init_kb(void) { +// keyboard_post_init_user(); - // Enable debug output - debug_enable = true; - debug_matrix = true; - debug_keyboard = true; -} +// // Enable debug output +// debug_enable = true; +// debug_matrix = true; +// debug_keyboard = true; +// } /** * Hook into early keyboard initialization diff --git a/keyboards/framework/laptop16/mcuconf.h b/keyboards/framework/laptop16/mcuconf.h index e3886675480..8c2ac091542 100644 --- a/keyboards/framework/laptop16/mcuconf.h +++ b/keyboards/framework/laptop16/mcuconf.h @@ -5,10 +5,6 @@ #include_next -#undef RP_SIO_USE_UART0 -#define RP_SIO_USE_UART0 FALSE -#undef RP_SIO_USE_UART1 -#define RP_SIO_USE_UART1 FALSE // For RGB backlight #undef RP_ADC_USE_ADC1 diff --git a/keyboards/framework/laptop16/rules.mk b/keyboards/framework/laptop16/rules.mk index 2586f31e889..e5a8b689281 100644 --- a/keyboards/framework/laptop16/rules.mk +++ b/keyboards/framework/laptop16/rules.mk @@ -1,5 +1,4 @@ -BACKLIGHT_ENABLE = yes -BACKLIGHT_DRIVER = pwm + # Custom matrix scanning code via ADC CUSTOM_MATRIX = lite @@ -7,4 +6,3 @@ SRC += matrix.c analog.c DEFAULT_FOLDER = framework/laptop16/ansi -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From 86242aa72a1f8f29b69b448f7848a73c8ec8a335 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Tue, 6 May 2025 13:26:53 +0800 Subject: [PATCH 18/31] fix compilation errors --- keyboards/framework/laptop16/ansi/{info.json => keyboard.json} | 0 keyboards/framework/laptop16/rules.mk | 2 -- 2 files changed, 2 deletions(-) rename keyboards/framework/laptop16/ansi/{info.json => keyboard.json} (100%) diff --git a/keyboards/framework/laptop16/ansi/info.json b/keyboards/framework/laptop16/ansi/keyboard.json similarity index 100% rename from keyboards/framework/laptop16/ansi/info.json rename to keyboards/framework/laptop16/ansi/keyboard.json diff --git a/keyboards/framework/laptop16/rules.mk b/keyboards/framework/laptop16/rules.mk index e5a8b689281..bd7f88febf3 100644 --- a/keyboards/framework/laptop16/rules.mk +++ b/keyboards/framework/laptop16/rules.mk @@ -4,5 +4,3 @@ CUSTOM_MATRIX = lite SRC += matrix.c analog.c -DEFAULT_FOLDER = framework/laptop16/ansi - From b3b0fcf63258dc0921d81d50d36d3afefba45972 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Tue, 6 May 2025 13:33:33 +0800 Subject: [PATCH 19/31] delete ansi/rules.mk --- keyboards/framework/laptop16/ansi/rules.mk | 1 - 1 file changed, 1 deletion(-) delete mode 100644 keyboards/framework/laptop16/ansi/rules.mk diff --git a/keyboards/framework/laptop16/ansi/rules.mk b/keyboards/framework/laptop16/ansi/rules.mk deleted file mode 100644 index 6e7633bfe01..00000000000 --- a/keyboards/framework/laptop16/ansi/rules.mk +++ /dev/null @@ -1 +0,0 @@ -# This file intentionally left blank From 69156a58f5298b43787ae11b859d9e01eaabfff7 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Tue, 6 May 2025 13:40:59 +0800 Subject: [PATCH 20/31] flags bootmagic as not working, fixes formatting in rules.mk --- keyboards/framework/laptop16/readme.md | 3 +++ keyboards/framework/laptop16/rules.mk | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/keyboards/framework/laptop16/readme.md b/keyboards/framework/laptop16/readme.md index e67bf99f631..73d072061bf 100644 --- a/keyboards/framework/laptop16/readme.md +++ b/keyboards/framework/laptop16/readme.md @@ -29,5 +29,8 @@ Enter the bootloader in 3 ways: * **On Framework Laptop 16 Keyboard**: Hold down left ALT and right ALT while installing the module * **On Framework Laptop 16 Numpad**: Hold down keys for 2 and 6 while installing the module * **On Raspberry Pi Pico**: Hold down bootsel button when plugging in + +//TODO: BOOTMAGIC DOESN'T WORK!! * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard + * **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/framework/laptop16/rules.mk b/keyboards/framework/laptop16/rules.mk index bd7f88febf3..add363f4e2a 100644 --- a/keyboards/framework/laptop16/rules.mk +++ b/keyboards/framework/laptop16/rules.mk @@ -1,5 +1,3 @@ - - # Custom matrix scanning code via ADC CUSTOM_MATRIX = lite SRC += matrix.c analog.c From 9927cd5fedeebf11204326b6a489a65fad92f5dd Mon Sep 17 00:00:00 2001 From: peepeetee Date: Tue, 6 May 2025 13:58:21 +0800 Subject: [PATCH 21/31] remove via keymap --- .../laptop16/ansi/keymaps/via/keymap.c | 108 ------------------ .../laptop16/ansi/keymaps/via/rules.mk | 1 - 2 files changed, 109 deletions(-) delete mode 100644 keyboards/framework/laptop16/ansi/keymaps/via/keymap.c delete mode 100644 keyboards/framework/laptop16/ansi/keymaps/via/rules.mk diff --git a/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c b/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c deleted file mode 100644 index b7fa55107d3..00000000000 --- a/keyboards/framework/laptop16/ansi/keymaps/via/keymap.c +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2022-2023 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H -#include "framework.h" - -// clang-format off -enum _layers { - _BASE, - _FN, - _FN_LOCK, - _FM -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ - * 14 keys │Esc │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Del│ - * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ - * 14 keys │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Backsp│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ - * 14 keys │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤ - * 13 keys │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───────┤ - * 12 keys │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ - * ├────┬───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ - * │ │ │ │ │ │ │ │ │↑ │ │ - * 11 keys │Ctrl│FN │GUI│Alt│ │Alt│Ctl│ ← ├───┤ → │ - * │ │ │ │ │ │ │ │ │ ↓│ │ - * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ - * 78 total - */ - [_BASE] = LAYOUT( - 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_DEL, - 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_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_BSLS, - 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_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, MO(_FN), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT - ), - /* - * Function layer - * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ - * 14 keys │FN lk│Mut│vDn│vUp│Prv│Ply│Nxt│bDn│bUp│Scn│Air│Prt│App│Ins │ - * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ - * 14 keys │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ - * 14 keys │ │ │RGB│Nxt│Hue│Sat│Spd│Brt│ │ │Pau│ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤ - * 13 keys │ │ │SRq│Prv│Hue│Sat│Spd│Brt│ScL│ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───────┤ - * 12 keys │ │ │ │ │ │ │Brk│ │ │ │ │ │ - * ├────┬───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ - * │ │ │ │ │ │ │ │ │PgU│ │ - * 11 keys │ │ │ │ │ Toggle Backlight │ │ │Home├───┤End │ - * │ │ │ │ │ │ │ │ │PgD│ │ - * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ - * 78 total - */ - [_FN] = LAYOUT( - FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, G(KC_P), XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______, - _______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______, - _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END - ), - // Function lock layer - // Everything on F-row locked to function layer, except ESC and DEL - [_FN_LOCK] = LAYOUT( - _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, G(KC_P), XXXXXXX, KC_PSCR, KC_MSEL, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, MO(_FM), _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [_FM] = LAYOUT( - FN_LOCK, 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_INS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______, - _______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______, - _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END - ), -}; -// clang-format on - -// Make sure to keep FN Lock even after reset -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case FN_LOCK: - if (record->event.pressed) { - if (layer_state_is(_FN)) { - set_single_persistent_default_layer(_FN_LOCK); - } - if (layer_state_is(_FM)) { - set_single_persistent_default_layer(_BASE); - } - } - return false; - break; - default: - break; - } - return true; -} diff --git a/keyboards/framework/laptop16/ansi/keymaps/via/rules.mk b/keyboards/framework/laptop16/ansi/keymaps/via/rules.mk deleted file mode 100644 index 1e5b99807cb..00000000000 --- a/keyboards/framework/laptop16/ansi/keymaps/via/rules.mk +++ /dev/null @@ -1 +0,0 @@ -VIA_ENABLE = yes From e72eb79d0eb1b057451c2063be46ba6012342a78 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Tue, 6 May 2025 14:17:55 +0800 Subject: [PATCH 22/31] use qmk format-json on keyboard.json --- .../framework/laptop16/ansi/keyboard.json | 193 +++++++++--------- 1 file changed, 94 insertions(+), 99 deletions(-) diff --git a/keyboards/framework/laptop16/ansi/keyboard.json b/keyboards/framework/laptop16/ansi/keyboard.json index 47fd19c407e..995df3425de 100644 --- a/keyboards/framework/laptop16/ansi/keyboard.json +++ b/keyboards/framework/laptop16/ansi/keyboard.json @@ -1,119 +1,114 @@ { - "keyboard_name": "Laptop 16 Keyboard Module - ANSI", "manufacturer": "Framework", + "keyboard_name": "Laptop 16 Keyboard Module - ANSI", "maintainer": "JohnAZoidberg", + "backlight": { + "breathing": true, + "driver": "pwm", + "pin": "GP25" + }, "bootloader": "rp2040", "features": { + "audio": false, "bootmagic": false, - "mousekey": false, - "extrakey": true, - "console": true, "command": false, - "nkro": true, - "audio": false + "console": true, + "extrakey": true, + "mousekey": false, + "nkro": true + }, + "indicators": { + "caps_lock": "GP24" }, "processor": "RP2040", "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040", "usb": { "device_version": "0.2.2", + "force_nkro": true, "pid": "0x0012", - "vid": "0x32AC", - "force_nkro": true - }, - "backlight": { - "driver": "pwm", - "pin": "GP25", - "breathing": true - }, - "indicators": { - "caps_lock": "GP24" + "vid": "0x32AC" }, "layouts": { "LAYOUT": { "layout": [ - { "matrix": [7, 5], "label": "Esc", "x": 0, "y": 0, "w": 1.25, "h": 0.5 }, - { "matrix": [3, 5], "label": "F1", "x": 1.5, "y": 0, "h": 0.5 }, - { "matrix": [2, 5], "label": "F2", "x": 2.75, "y": 0, "h": 0.5 }, - { "matrix": [6, 4], "label": "F3", "x": 4, "y": 0, "h": 0.5 }, - { "matrix": [3, 4], "label": "F4", "x": 5.25, "y": 0, "h": 0.5 }, - { "matrix": [4, 10], "label": "F5", "x": 6.5, "y": 0, "h": 0.5 }, - { "matrix": [3, 10], "label": "F6", "x": 7.75, "y": 0, "h": 0.5 }, - { "matrix": [2, 10], "label": "F7", "x": 9, "y": 0, "h": 0.5 }, - { "matrix": [1, 15], "label": "F8", "x": 10.25, "y": 0, "h": 0.5 }, - { "matrix": [3, 11], "label": "F9", "x": 11.5, "y": 0, "h": 0.5 }, - { "matrix": [4, 8], "label": "F10", "x": 12.75, "y": 0, "h": 0.5 }, - { "matrix": [6, 8], "label": "F11", "x": 14, "y": 0, "h": 0.5 }, - { "matrix": [3, 13], "label": "F12", "x": 15.25, "y": 0, "h": 0.5 }, - { "matrix": [0, 1], "label": "Delete", "x": 16.5, "y": 0, "w": 1.75, "h": 0.5 }, - - { "matrix": [4, 2], "label": "~", "x": 0, "y": 0.75 }, - { "matrix": [5, 2], "label": "!", "x": 1.25, "y": 0.75 }, - { "matrix": [5, 5], "label": "@", "x": 2.5, "y": 0.75 }, - { "matrix": [5, 4], "label": "#", "x": 3.75, "y": 0.75 }, - { "matrix": [5, 6], "label": "$", "x": 5, "y": 0.75 }, - { "matrix": [4, 6], "label": "%", "x": 6.25, "y": 0.75 }, - { "matrix": [4, 7], "label": "^", "x": 7.5, "y": 0.75 }, - { "matrix": [5, 7], "label": "&", "x": 8.75, "y": 0.75 }, - { "matrix": [5, 10], "label": "*", "x": 10, "y": 0.75 }, - { "matrix": [5, 8], "label": "(", "x": 11.25, "y": 0.75 }, - { "matrix": [4, 13], "label": ")", "x": 12.5, "y": 0.75 }, - { "matrix": [2, 13], "label": "_", "x": 13.75, "y": 0.75 }, - { "matrix": [4, 14], "label": "+", "x": 15, "y": 0.75 }, - { "matrix": [5, 14], "label": "Backspace", "x": 16.25, "y": 0.75, "w": 2 }, - - { "matrix": [3, 2], "label": "Tab", "x": 0, "y": 2, "w": 1.5 }, - { "matrix": [0, 2], "label": "Q", "x": 1.75, "y": 2 }, - { "matrix": [6, 5], "label": "W", "x": 3, "y": 2 }, - { "matrix": [2, 4], "label": "E", "x": 4.25, "y": 2 }, - { "matrix": [6, 6], "label": "R", "x": 5.5, "y": 2 }, - { "matrix": [3, 6], "label": "T", "x": 6.75, "y": 2 }, - { "matrix": [3, 7], "label": "Y", "x": 8, "y": 2 }, - { "matrix": [6, 7], "label": "U", "x": 9.25, "y": 2 }, - { "matrix": [6, 10], "label": "I", "x": 10.5, "y": 2 }, - { "matrix": [3, 8], "label": "O", "x": 11.75, "y": 2 }, - { "matrix": [5, 13], "label": "P", "x": 13, "y": 2 }, - { "matrix": [6, 13], "label": "{", "x": 14.25, "y": 2 }, - { "matrix": [6, 14], "label": "}", "x": 15.5, "y": 2 }, - { "matrix": [2, 8], "label": "|", "x": 16.75, "y": 2, "w": 1.5 }, - - { "matrix": [4, 4], "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, - { "matrix": [7, 2], "label": "A", "x": 2, "y": 3.25 }, - { "matrix": [4, 5], "label": "S", "x": 3.25, "y": 3.25 }, - { "matrix": [7, 14], "label": "D", "x": 4.5, "y": 3.25 }, - { "matrix": [7, 6], "label": "F", "x": 5.75, "y": 3.25 }, - { "matrix": [2, 6], "label": "G", "x": 7, "y": 3.25 }, - { "matrix": [2, 7], "label": "H", "x": 8.25, "y": 3.25 }, - { "matrix": [7, 7], "label": "J", "x": 9.5, "y": 3.25 }, - { "matrix": [7, 10], "label": "K", "x": 10.75, "y": 3.25 }, - { "matrix": [7, 8], "label": "L", "x": 12, "y": 3.25 }, - { "matrix": [7, 13], "label": ":", "x": 13.25, "y": 3.25 }, - { "matrix": [0, 14], "label": "\"", "x": 14.5, "y": 3.25 }, - { "matrix": [1, 14], "label": "Enter", "x": 15.75, "y": 3.25, "w": 2.5 }, - - { "matrix": [1, 9], "label": "Shift", "x": 0, "y": 4.5, "w": 2.5 }, - { "matrix": [1, 5], "label": "Z", "x": 2.75, "y": 4.5 }, - { "matrix": [0, 5], "label": "X", "x": 4, "y": 4.5 }, - { "matrix": [0, 0], "label": "C", "x": 5.25, "y": 4.5 }, - { "matrix": [0, 6], "label": "V", "x": 6.5, "y": 4.5 }, - { "matrix": [1, 6], "label": "B", "x": 7.75, "y": 4.5 }, - { "matrix": [1, 7], "label": "N", "x": 9, "y": 4.5 }, - { "matrix": [0, 7], "label": "M", "x": 10.25, "y": 4.5 }, - { "matrix": [0, 10], "label": "<", "x": 11.5, "y": 4.5 }, - { "matrix": [0, 8], "label": ">", "x": 12.75, "y": 4.5 }, - { "matrix": [0, 13], "label": "?", "x": 14, "y": 4.5 }, - { "matrix": [0, 9], "label": "Shift", "x": 15.25, "y": 4.5, "w": 3 }, - - { "matrix": [1, 12], "label": "Ctrl", "x": 0, "y": 5.75, "w": 1.25 }, - { "matrix": [2, 2], "label": "Fn", "x": 1.5, "y": 5.75 }, - { "matrix": [3, 1], "label": "Win", "x": 2.75, "y": 5.75 }, - { "matrix": [1, 3], "label": "Alt", "x": 4, "y": 5.75 }, - { "matrix": [1, 4], "label": "Space", "x": 5.25, "y": 5.75, "w": 6 }, - { "matrix": [0, 3], "label": "Alt", "x": 11.5, "y": 5.75 }, - { "matrix": [0, 12], "label": "Ctrl", "x": 12.75, "y": 5.75 }, - { "matrix": [6, 11], "label": "←", "x": 14, "y": 5.75, "w": 1.25 }, - { "matrix": [1, 13], "label": "↑", "x": 15.5, "y": 5.75, "w": 1.25, "h": 0.5 }, - { "matrix": [1, 8], "label": "→", "x": 17, "y": 5.75, "w": 1.25 }, - { "matrix": [2, 15], "label": "↓", "x": 15.5, "y": 6.25, "w": 1.25, "h": 0.5 } + {"label": "Esc", "matrix": [7, 5], "x": 0, "y": 0, "w": 1.25, "h": 0.5}, + {"label": "F1", "matrix": [3, 5], "x": 1.5, "y": 0, "h": 0.5}, + {"label": "F2", "matrix": [2, 5], "x": 2.75, "y": 0, "h": 0.5}, + {"label": "F3", "matrix": [6, 4], "x": 4, "y": 0, "h": 0.5}, + {"label": "F4", "matrix": [3, 4], "x": 5.25, "y": 0, "h": 0.5}, + {"label": "F5", "matrix": [4, 10], "x": 6.5, "y": 0, "h": 0.5}, + {"label": "F6", "matrix": [3, 10], "x": 7.75, "y": 0, "h": 0.5}, + {"label": "F7", "matrix": [2, 10], "x": 9, "y": 0, "h": 0.5}, + {"label": "F8", "matrix": [1, 15], "x": 10.25, "y": 0, "h": 0.5}, + {"label": "F9", "matrix": [3, 11], "x": 11.5, "y": 0, "h": 0.5}, + {"label": "F10", "matrix": [4, 8], "x": 12.75, "y": 0, "h": 0.5}, + {"label": "F11", "matrix": [6, 8], "x": 14, "y": 0, "h": 0.5}, + {"label": "F12", "matrix": [3, 13], "x": 15.25, "y": 0, "h": 0.5}, + {"label": "Delete", "matrix": [0, 1], "x": 16.5, "y": 0, "w": 1.75, "h": 0.5}, + {"label": "~", "matrix": [4, 2], "x": 0, "y": 0.75}, + {"label": "!", "matrix": [5, 2], "x": 1.25, "y": 0.75}, + {"label": "@", "matrix": [5, 5], "x": 2.5, "y": 0.75}, + {"label": "#", "matrix": [5, 4], "x": 3.75, "y": 0.75}, + {"label": "$", "matrix": [5, 6], "x": 5, "y": 0.75}, + {"label": "%", "matrix": [4, 6], "x": 6.25, "y": 0.75}, + {"label": "^", "matrix": [4, 7], "x": 7.5, "y": 0.75}, + {"label": "&", "matrix": [5, 7], "x": 8.75, "y": 0.75}, + {"label": "*", "matrix": [5, 10], "x": 10, "y": 0.75}, + {"label": "(", "matrix": [5, 8], "x": 11.25, "y": 0.75}, + {"label": ")", "matrix": [4, 13], "x": 12.5, "y": 0.75}, + {"label": "_", "matrix": [2, 13], "x": 13.75, "y": 0.75}, + {"label": "+", "matrix": [4, 14], "x": 15, "y": 0.75}, + {"label": "Backspace", "matrix": [5, 14], "x": 16.25, "y": 0.75, "w": 2}, + {"label": "Tab", "matrix": [3, 2], "x": 0, "y": 2, "w": 1.5}, + {"label": "Q", "matrix": [0, 2], "x": 1.75, "y": 2}, + {"label": "W", "matrix": [6, 5], "x": 3, "y": 2}, + {"label": "E", "matrix": [2, 4], "x": 4.25, "y": 2}, + {"label": "R", "matrix": [6, 6], "x": 5.5, "y": 2}, + {"label": "T", "matrix": [3, 6], "x": 6.75, "y": 2}, + {"label": "Y", "matrix": [3, 7], "x": 8, "y": 2}, + {"label": "U", "matrix": [6, 7], "x": 9.25, "y": 2}, + {"label": "I", "matrix": [6, 10], "x": 10.5, "y": 2}, + {"label": "O", "matrix": [3, 8], "x": 11.75, "y": 2}, + {"label": "P", "matrix": [5, 13], "x": 13, "y": 2}, + {"label": "{", "matrix": [6, 13], "x": 14.25, "y": 2}, + {"label": "}", "matrix": [6, 14], "x": 15.5, "y": 2}, + {"label": "|", "matrix": [2, 8], "x": 16.75, "y": 2, "w": 1.5}, + {"label": "Caps Lock", "matrix": [4, 4], "x": 0, "y": 3.25, "w": 1.75}, + {"label": "A", "matrix": [7, 2], "x": 2, "y": 3.25}, + {"label": "S", "matrix": [4, 5], "x": 3.25, "y": 3.25}, + {"label": "D", "matrix": [7, 14], "x": 4.5, "y": 3.25}, + {"label": "F", "matrix": [7, 6], "x": 5.75, "y": 3.25}, + {"label": "G", "matrix": [2, 6], "x": 7, "y": 3.25}, + {"label": "H", "matrix": [2, 7], "x": 8.25, "y": 3.25}, + {"label": "J", "matrix": [7, 7], "x": 9.5, "y": 3.25}, + {"label": "K", "matrix": [7, 10], "x": 10.75, "y": 3.25}, + {"label": "L", "matrix": [7, 8], "x": 12, "y": 3.25}, + {"label": ":", "matrix": [7, 13], "x": 13.25, "y": 3.25}, + {"label": "\"", "matrix": [0, 14], "x": 14.5, "y": 3.25}, + {"label": "Enter", "matrix": [1, 14], "x": 15.75, "y": 3.25, "w": 2.5}, + {"label": "Shift", "matrix": [1, 9], "x": 0, "y": 4.5, "w": 2.5}, + {"label": "Z", "matrix": [1, 5], "x": 2.75, "y": 4.5}, + {"label": "X", "matrix": [0, 5], "x": 4, "y": 4.5}, + {"label": "C", "matrix": [0, 0], "x": 5.25, "y": 4.5}, + {"label": "V", "matrix": [0, 6], "x": 6.5, "y": 4.5}, + {"label": "B", "matrix": [1, 6], "x": 7.75, "y": 4.5}, + {"label": "N", "matrix": [1, 7], "x": 9, "y": 4.5}, + {"label": "M", "matrix": [0, 7], "x": 10.25, "y": 4.5}, + {"label": "<", "matrix": [0, 10], "x": 11.5, "y": 4.5}, + {"label": ">", "matrix": [0, 8], "x": 12.75, "y": 4.5}, + {"label": "?", "matrix": [0, 13], "x": 14, "y": 4.5}, + {"label": "Shift", "matrix": [0, 9], "x": 15.25, "y": 4.5, "w": 3}, + {"label": "Ctrl", "matrix": [1, 12], "x": 0, "y": 5.75, "w": 1.25}, + {"label": "Fn", "matrix": [2, 2], "x": 1.5, "y": 5.75}, + {"label": "Win", "matrix": [3, 1], "x": 2.75, "y": 5.75}, + {"label": "Alt", "matrix": [1, 3], "x": 4, "y": 5.75}, + {"label": "Space", "matrix": [1, 4], "x": 5.25, "y": 5.75, "w": 6}, + {"label": "Alt", "matrix": [0, 3], "x": 11.5, "y": 5.75}, + {"label": "Ctrl", "matrix": [0, 12], "x": 12.75, "y": 5.75}, + {"label": "\u2190", "matrix": [6, 11], "x": 14, "y": 5.75, "w": 1.25}, + {"label": "\u2191", "matrix": [1, 13], "x": 15.5, "y": 5.75, "w": 1.25, "h": 0.5}, + {"label": "\u2192", "matrix": [1, 8], "x": 17, "y": 5.75, "w": 1.25}, + {"label": "\u2193", "matrix": [2, 15], "x": 15.5, "y": 6.25, "w": 1.25, "h": 0.5} ] } } From 6bab324df733f8613b82a2a8aa11326ee8a5b0b3 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Wed, 7 May 2025 19:33:56 +0800 Subject: [PATCH 23/31] move rules.mk into /ansi to pass lint --- keyboards/framework/laptop16/{ => ansi}/rules.mk | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename keyboards/framework/laptop16/{ => ansi}/rules.mk (100%) diff --git a/keyboards/framework/laptop16/rules.mk b/keyboards/framework/laptop16/ansi/rules.mk similarity index 100% rename from keyboards/framework/laptop16/rules.mk rename to keyboards/framework/laptop16/ansi/rules.mk From 803e6e9897ccb1cc778d88f57aefd51bd5257827 Mon Sep 17 00:00:00 2001 From: peepeetee <43021794+peepeetee@users.noreply.github.com> Date: Thu, 8 May 2025 07:23:52 -0500 Subject: [PATCH 24/31] Update readme.md --- keyboards/framework/laptop16/readme.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/keyboards/framework/laptop16/readme.md b/keyboards/framework/laptop16/readme.md index 73d072061bf..09a7d49c7a3 100644 --- a/keyboards/framework/laptop16/readme.md +++ b/keyboards/framework/laptop16/readme.md @@ -29,8 +29,5 @@ Enter the bootloader in 3 ways: * **On Framework Laptop 16 Keyboard**: Hold down left ALT and right ALT while installing the module * **On Framework Laptop 16 Numpad**: Hold down keys for 2 and 6 while installing the module * **On Raspberry Pi Pico**: Hold down bootsel button when plugging in - -//TODO: BOOTMAGIC DOESN'T WORK!! -* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard - +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix and plug in the keyboard. On the ANSI board, this is the C key. * **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available From 9577e6d8afc0a06897e581a5447acef0985b5da6 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sat, 10 May 2025 20:59:55 +0800 Subject: [PATCH 25/31] update readme to reflect vender quirks --- keyboards/framework/laptop16/readme.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/keyboards/framework/laptop16/readme.md b/keyboards/framework/laptop16/readme.md index 09a7d49c7a3..fa64d8ad2fd 100644 --- a/keyboards/framework/laptop16/readme.md +++ b/keyboards/framework/laptop16/readme.md @@ -3,8 +3,12 @@ Keyboard input modules for the Framework Laptop 16. * Keyboard Maintainer: [Daniel Schaefer](https://github.com/JohnAZoidberg) -* Hardware Supported: Framework Laptop 16 Keyboard, Numpad and Macropad -* Hardware Availability: Soon available at https://frame.work/marketplace +* Hardware Supported: Framework Laptop 16 Keyboard, soon: Numpad and Macropad +* Hardware Availability: Available at https://frame.work/marketplace + + +## Vendor specific +On framework 16, KC_MSEL launches the framework website ## Variants From 91633cfaa5f61f0261cc6e54ef81d510133becf4 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sat, 21 Jun 2025 23:48:26 +0800 Subject: [PATCH 26/31] enable backlight --- keyboards/framework/laptop16/ansi/keyboard.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/framework/laptop16/ansi/keyboard.json b/keyboards/framework/laptop16/ansi/keyboard.json index 995df3425de..2c2b2ee8792 100644 --- a/keyboards/framework/laptop16/ansi/keyboard.json +++ b/keyboards/framework/laptop16/ansi/keyboard.json @@ -15,7 +15,8 @@ "console": true, "extrakey": true, "mousekey": false, - "nkro": true + "nkro": true, + "backlight": true }, "indicators": { "caps_lock": "GP24" From d8e4103d101873e8a93066b59007466bfe1d0b99 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sun, 22 Jun 2025 00:23:39 +0800 Subject: [PATCH 27/31] Clear TODO: Change PWM frequency to 24kHz --- keyboards/framework/laptop16/config.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/framework/laptop16/config.h b/keyboards/framework/laptop16/config.h index 289f6c7c9c1..6271a135213 100644 --- a/keyboards/framework/laptop16/config.h +++ b/keyboards/framework/laptop16/config.h @@ -27,5 +27,4 @@ #define BACKLIGHT_PWM_DRIVER PWMD4 #define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_B // Change PWM frequency to 24kHz, the default of 2048Hz causes loud noise -// TODO: Waiting for PR #21717 -// #define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 24000 +#define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 24000 From ceebb7da01d20283e5bcb16c0d8c2e59027fc3fb Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sun, 22 Jun 2025 00:52:09 +0800 Subject: [PATCH 28/31] split keyboard.json into a new info.json --- keyboards/framework/info.json | 8 ++++++++ keyboards/framework/laptop16/ansi/keyboard.json | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 keyboards/framework/info.json diff --git a/keyboards/framework/info.json b/keyboards/framework/info.json new file mode 100644 index 00000000000..11df2fcbb97 --- /dev/null +++ b/keyboards/framework/info.json @@ -0,0 +1,8 @@ +{ + "manufacturer": "Framework", + "keyboard_name": "Laptop 16 Keyboard Module - ANSI", + "maintainer": "JohnAZoidberg", + "bootloader": "rp2040", + "processor": "RP2040", + "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040" + } diff --git a/keyboards/framework/laptop16/ansi/keyboard.json b/keyboards/framework/laptop16/ansi/keyboard.json index 2c2b2ee8792..ba93cde999a 100644 --- a/keyboards/framework/laptop16/ansi/keyboard.json +++ b/keyboards/framework/laptop16/ansi/keyboard.json @@ -1,13 +1,9 @@ { - "manufacturer": "Framework", - "keyboard_name": "Laptop 16 Keyboard Module - ANSI", - "maintainer": "JohnAZoidberg", "backlight": { "breathing": true, "driver": "pwm", "pin": "GP25" }, - "bootloader": "rp2040", "features": { "audio": false, "bootmagic": false, @@ -21,8 +17,6 @@ "indicators": { "caps_lock": "GP24" }, - "processor": "RP2040", - "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040", "usb": { "device_version": "0.2.2", "force_nkro": true, From 632bbe98b1568bbe6272af4d0e0d2463df4b8aae Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sun, 22 Jun 2025 00:52:53 +0800 Subject: [PATCH 29/31] remove 'advanced' keymap --- .../laptop16/ansi/keymaps/advanced/keymap.c | 116 ------------------ 1 file changed, 116 deletions(-) delete mode 100644 keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c diff --git a/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c b/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c deleted file mode 100644 index fb0d584f284..00000000000 --- a/keyboards/framework/laptop16/ansi/keymaps/advanced/keymap.c +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2022-2023 Framework Computer -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H -#include "framework.h" - -// clang-format off -enum _layers { - _BASE, - _FN, - _FN_LOCK, - _FM -}; - -// Changes from regular layout -// - Capslock => Map as ctrl and escape -// - FN+Backtick => Sleep - - -// Control when held and combined, Escape when tapped -#define KC_ECPS CTL_T(KC_ESC) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ - * 14 keys │Esc │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Del│ - * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ - * 14 keys │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Backsp│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ - * 14 keys │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤ - * 13 keys │ECaps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───────┤ - * 12 keys │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ - * ├────┬───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ - * │ │ │ │ │ │ │ │ │↑ │ │ - * 11 keys │Ctrl│FN │GUI│Alt│ │Alt│Ctl│ ← ├───┤ → │ - * │ │ │ │ │ │ │ │ │ ↓│ │ - * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ - * 78 total - */ - [_BASE] = LAYOUT( - 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_DEL, - 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_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_BSLS, - KC_ECPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, MO(_FN), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT - ), - /* - * Function layer - * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┐ - * 14 keys │FN lk│Mut│vDn│vUp│Prv│Ply│Nxt│bDn│bUp│Scn│Air│Prt│App│Ins │ - * ├───┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ - * 14 keys │SLP│ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ - * 14 keys │ │ │RGB│Nxt│Hue│Sat│Spd│Brt│ │ │Pau│ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤ - * 13 keys │ │ │SRq│Prv│Hue│Sat│Spd│Brt│ScL│ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───────┤ - * 12 keys │ │ │ │ │ │ │Brk│ │ │ │ │ │ - * ├────┬───┼───┼───┼───┴───┴───┴───┴───┼───┼───┼───┴┬───┬────┤ - * │ │ │ │ │ │ │ │ │PgU│ │ - * 11 keys │ │ │ │ │ Toggle Backlight │ │ │Home├───┤End │ - * │ │ │ │ │ │ │ │ │PgD│ │ - * └────┴───┴───┴───┴───────────────────┴───┴───┴────┴───┴────┘ - * 78 total - */ - [_FN] = LAYOUT( - FN_LOCK, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, G(KC_P), XXXXXXX, KC_PSCR, KC_MSEL, KC_INS, - KC_SLEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______, - _______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______, - _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END - ), - // Function lock layer - // Everything on F-row locked to function layer, except ESC and DEL - [_FN_LOCK] = LAYOUT( - _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRID, KC_BRIU, G(KC_P), XXXXXXX, KC_PSCR, KC_MSEL, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, MO(_FM), _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [_FM] = LAYOUT( - FN_LOCK, 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_INS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_VAI, _______, _______, KC_PAUS, _______, _______, _______, - _______, _______, KC_SYRQ, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_SPD, RGB_VAD, KC_SCRL, _______, _______, _______, _______, - _______, _______, _______, BL_BRTG, _______, KC_BRK, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, BL_STEP, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END - ), -}; -// clang-format on - -// Make sure to keep FN Lock even after reset -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case FN_LOCK: - if (record->event.pressed) { - if (layer_state_is(_FN)) { - set_single_persistent_default_layer(_FN_LOCK); - } - if (layer_state_is(_FM)) { - set_single_persistent_default_layer(_BASE); - } - } - return false; - break; - default: - break; - } - return true; -} From 5c9bc8c250c4b2af05cd354e369a63ae6d5d516a Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sun, 22 Jun 2025 00:57:48 +0800 Subject: [PATCH 30/31] fix info.json location --- keyboards/framework/laptop16/ansi/keyboard.json | 2 ++ keyboards/framework/{ => laptop16}/info.json | 0 2 files changed, 2 insertions(+) rename keyboards/framework/{ => laptop16}/info.json (100%) diff --git a/keyboards/framework/laptop16/ansi/keyboard.json b/keyboards/framework/laptop16/ansi/keyboard.json index ba93cde999a..7e73326aa2d 100644 --- a/keyboards/framework/laptop16/ansi/keyboard.json +++ b/keyboards/framework/laptop16/ansi/keyboard.json @@ -1,4 +1,6 @@ { + + "keyboard_name": "Laptop 16 Keyboard Module - ANSI", "backlight": { "breathing": true, "driver": "pwm", diff --git a/keyboards/framework/info.json b/keyboards/framework/laptop16/info.json similarity index 100% rename from keyboards/framework/info.json rename to keyboards/framework/laptop16/info.json From 01d8a1002c2922b46168acef9978db389fa68d4d Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sun, 22 Jun 2025 01:06:30 +0800 Subject: [PATCH 31/31] more fixes for keyboard.json and info.json --- keyboards/framework/laptop16/ansi/keyboard.json | 3 ++- keyboards/framework/laptop16/info.json | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/keyboards/framework/laptop16/ansi/keyboard.json b/keyboards/framework/laptop16/ansi/keyboard.json index 7e73326aa2d..4a03422a0e9 100644 --- a/keyboards/framework/laptop16/ansi/keyboard.json +++ b/keyboards/framework/laptop16/ansi/keyboard.json @@ -13,9 +13,10 @@ "console": true, "extrakey": true, "mousekey": false, - "nkro": true, "backlight": true }, + + "indicators": { "caps_lock": "GP24" }, diff --git a/keyboards/framework/laptop16/info.json b/keyboards/framework/laptop16/info.json index 11df2fcbb97..5e6e1ad62ac 100644 --- a/keyboards/framework/laptop16/info.json +++ b/keyboards/framework/laptop16/info.json @@ -1,8 +1,12 @@ { "manufacturer": "Framework", - "keyboard_name": "Laptop 16 Keyboard Module - ANSI", "maintainer": "JohnAZoidberg", "bootloader": "rp2040", "processor": "RP2040", - "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040" + "url": "https://frame.work/de/en/products/laptop16-diy-amd-7040", + "host": { + "default": { + "nkro": true + } + } }