Merge remote-tracking branch 'upstream/develop' into xap

This commit is contained in:
Nick Brassel 2022-12-10 13:29:35 +11:00
commit ee93b00e6c
No known key found for this signature in database
101 changed files with 2060 additions and 2971 deletions

View File

@ -0,0 +1,353 @@
{
"aliases": {
/*
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
* │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
* │ │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
* │ │ │ │ │ │ │ │ │
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*/
"KC_GRV": {
"key": "UK_GRV",
"label": "`"
},
"KC_1": {
"key": "UK_1",
"label": "1"
},
"KC_2": {
"key": "UK_2",
"label": "2"
},
"KC_3": {
"key": "UK_3",
"label": "3"
},
"KC_4": {
"key": "UK_4",
"label": "4"
},
"KC_5": {
"key": "UK_5",
"label": "5"
},
"KC_6": {
"key": "UK_6",
"label": "6"
},
"KC_7": {
"key": "UK_7",
"label": "7"
},
"KC_8": {
"key": "UK_8",
"label": "8"
},
"KC_9": {
"key": "UK_9",
"label": "9"
},
"KC_0": {
"key": "UK_0",
"label": "0"
},
"KC_MINS": {
"key": "UK_MINS",
"label": "-"
},
"KC_EQL": {
"key": "UK_EQL",
"label": "="
},
"KC_Q": {
"key": "UK_Q",
"label": "Q"
},
"KC_W": {
"key": "UK_W",
"label": "W"
},
"KC_E": {
"key": "UK_E",
"label": "E"
},
"KC_R": {
"key": "UK_R",
"label": "R"
},
"KC_T": {
"key": "UK_T",
"label": "T"
},
"KC_Y": {
"key": "UK_Y",
"label": "Y"
},
"KC_U": {
"key": "UK_U",
"label": "U"
},
"KC_I": {
"key": "UK_I",
"label": "I"
},
"KC_O": {
"key": "UK_O",
"label": "O"
},
"KC_P": {
"key": "UK_P",
"label": "P"
},
"KC_LBRC": {
"key": "UK_LBRC",
"label": "["
},
"KC_RBRC": {
"key": "UK_RBRC",
"label": "]"
},
"KC_A": {
"key": "UK_A",
"label": "A"
},
"KC_S": {
"key": "UK_S",
"label": "S"
},
"KC_D": {
"key": "UK_D",
"label": "D"
},
"KC_F": {
"key": "UK_F",
"label": "F"
},
"KC_G": {
"key": "UK_G",
"label": "G"
},
"KC_H": {
"key": "UK_H",
"label": "H"
},
"KC_J": {
"key": "UK_J",
"label": "J"
},
"KC_K": {
"key": "UK_K",
"label": "K"
},
"KC_L": {
"key": "UK_L",
"label": "L"
},
"KC_SCLN": {
"key": "UK_SCLN",
"label": ";"
},
"KC_QUOT": {
"key": "UK_QUOT",
"label": "'"
},
"KC_NUHS": {
"key": "UK_HASH",
"label": "#"
},
"KC_NUBS": {
"key": "UK_BSLS",
"label": "\\"
},
"KC_Z": {
"key": "UK_Z",
"label": "Z"
},
"KC_X": {
"key": "UK_X",
"label": "X"
},
"KC_C": {
"key": "UK_C",
"label": "C"
},
"KC_V": {
"key": "UK_V",
"label": "V"
},
"KC_B": {
"key": "UK_B",
"label": "B"
},
"KC_N": {
"key": "UK_N",
"label": "N"
},
"KC_M": {
"key": "UK_M",
"label": "M"
},
"KC_COMM": {
"key": "UK_COMM",
"label": ","
},
"KC_DOT": {
"key": "UK_DOT",
"label": "."
},
"KC_SLSH": {
"key": "UK_SLSH",
"label": "/"
},
/* Shifted symbols
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
* │ ¬ │ ! │ " │ £ │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
* │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
* │ │ │ │ │ │ │ │ │ │ │ : │ @ │ ~ │ │
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
* │ │ | │ │ │ │ │ │ │ │ < │ > │ ? │ │
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
* │ │ │ │ │ │ │ │ │
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*/
"S(UK_GRV)": {
"key": "UK_NOT",
"label": "¬"
},
"S(UK_1)": {
"key": "UK_EXLM",
"label": "!"
},
"S(UK_2)": {
"key": "UK_DQUO",
"label": "\""
},
"S(UK_3)": {
"key": "UK_PND",
"label": "£"
},
"S(UK_4)": {
"key": "UK_DLR",
"label": "$"
},
"S(UK_5)": {
"key": "UK_PERC",
"label": "%"
},
"S(UK_6)": {
"key": "UK_CIRC",
"label": "^"
},
"S(UK_7)": {
"key": "UK_AMPR",
"label": "&"
},
"S(UK_8)": {
"key": "UK_ASTR",
"label": "*"
},
"S(UK_9)": {
"key": "UK_LPRN",
"label": "("
},
"S(UK_0)": {
"key": "UK_RPRN",
"label": ")"
},
"S(UK_MINS)": {
"key": "UK_UNDS",
"label": "_"
},
"S(UK_EQL)": {
"key": "UK_PLUS",
"label": "+"
},
"S(UK_LBRC)": {
"key": "UK_LCBR",
"label": "{"
},
"S(UK_RBRC)": {
"key": "UK_RCBR",
"label": "}"
},
"S(UK_SCLN)": {
"key": "UK_COLN",
"label": ":"
},
"S(UK_QUOT)": {
"key": "UK_AT",
"label": "@"
},
"S(UK_HASH)": {
"key": "UK_TILD",
"label": "~"
},
"S(UK_BSLS)": {
"key": "UK_PIPE",
"label": "|"
},
"S(UK_COMM)": {
"key": "UK_LABK",
"label": "<"
},
"S(UK_DOT)": {
"key": "UK_RABK",
"label": ">"
},
"S(UK_SLSH)": {
"key": "UK_QUES",
"label": "?"
},
/* AltGr symbols
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
* │ ¦ │ │ │ │ € │ │ │ │ │ │ │ │ │ │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
* │ │ │ │ É │ │ │ │ Ú │ Í │ Ó │ │ │ │ │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
* │ │ Á │ │ │ │ │ │ │ │ │ │ │ │ │
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
* │ │ │ │ │ │ │ │ │
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*/
"ALGR(UK_GRV)": {
"key": "UK_BRKP",
"label": "¦"
},
"ALGR(UK_4)": {
"key": "UK_EURO",
"label": "€"
},
"ALGR(KC_E)": {
"key": "UK_EACU",
"label": "É"
},
"ALGR(KC_U)": {
"key": "UK_UACU",
"label": "Ú"
},
"ALGR(KC_I)": {
"key": "UK_IACU",
"label": "Í"
},
"ALGR(KC_O)": {
"key": "UK_OACU",
"label": "Ó"
},
"ALGR(KC_A)": {
"key": "UK_AACU",
"label": "Á"
}
}
}

View File

@ -0,0 +1,155 @@
{
"aliases": {
/* Shifted symbols
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
* │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
* │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
* │ │ │ │ │ │ │ │ │ │ │ : │ " │ │
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
* │ │ │ │ │ │ │ │ │ < │ > │ ? │ │
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
* │ │ │ │ │ │ │ │ │
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*/
"S(KC_GRAVE)": {
"key": "KC_TILD",
"label": "~",
"aliases": [
"KC_TILDE"
]
},
"S(KC_1)": {
"key": "KC_EXLM",
"label": "!",
"aliases": [
"KC_EXCLAIM"
]
},
"S(KC_2)": {
"key": "KC_AT",
"label": "@"
},
"S(KC_3)": {
"key": "KC_HASH",
"label": "#"
},
"S(KC_4)": {
"key": "KC_DLR",
"label": "$",
"aliases": [
"KC_DOLLAR"
]
},
"S(KC_5)": {
"key": "KC_PERC",
"label": "%",
"aliases": [
"KC_PERCENT"
]
},
"S(KC_6)": {
"key": "KC_CIRC",
"label": "^",
"aliases": [
"KC_CIRCUMFLEX"
]
},
"S(KC_7)": {
"key": "KC_AMPR",
"label": "&",
"aliases": [
"KC_AMPERSAND"
]
},
"S(KC_8)": {
"key": "KC_ASTR",
"label": "*",
"aliases": [
"KC_ASTERISK"
]
},
"S(KC_9)": {
"key": "KC_LPRN",
"label": "(",
"aliases": [
"KC_LEFT_PAREN"
]
},
"S(KC_0)": {
"key": "KC_RPRN",
"label": ")",
"aliases": [
"KC_RIGHT_PAREN"
]
},
"S(KC_MINUS)": {
"key": "KC_UNDS",
"label": "_",
"aliases": [
"KC_UNDERSCORE"
]
},
"S(KC_EQUAL)": {
"key": "KC_PLUS",
"label": "+"
},
"S(KC_LEFT_BRACKET)": {
"key": "KC_LCBR",
"label": "{",
"aliases": [
"KC_LEFT_CURLY_BRACE"
]
},
"S(KC_RIGHT_BRACKET)": {
"key": "KC_RCBR",
"label": "}",
"aliases": [
"KC_RIGHT_CURLY_BRACE"
]
},
"S(KC_BACKSLASH)": {
"key": "KC_PIPE",
"label": "|"
},
"S(KC_SEMICOLON)": {
"key": "KC_COLN",
"label": ":",
"aliases": [
"KC_COLON"
]
},
"S(KC_QUOTE)": {
"key": "KC_DQUO",
"label": "\"",
"aliases": [
"KC_DOUBLE_QUOTE",
"KC_DQT"
]
},
"S(KC_COMMA)": {
"key": "KC_LABK",
"label": "<",
"aliases": [
"KC_LEFT_ANGLE_BRACKET",
"KC_LT"
]
},
"S(KC_DOT)": {
"key": "KC_RABK",
"label": ">",
"aliases": [
"KC_RIGHT_ANGLE_BRACKET",
"KC_GT"
]
},
"S(KC_SLASH)": {
"key": "KC_QUES",
"label": "?",
"aliases": [
"KC_QUESTION"
]
}
}
}

View File

@ -22,11 +22,11 @@ POINTING_DEVICE_DRIVER = adns5050
The ADNS 5050 sensor uses a serial type protocol for communication, and requires an additional light source.
| Setting | Description | Default |
| ------------------- | ------------------------------------------------------------------- | -------------------------- |
| `ADNS5050_SCLK_PIN` | (Required) The pin connected to the clock pin of the sensor. | `POINTING_DEVICE_SCLK_PIN` |
| `ADNS5050_SDIO_PIN` | (Required) The pin connected to the data pin of the sensor. | `POINTING_DEVICE_SDIO_PIN` |
| `ADNS5050_CS_PIN` | (Required) The pin connected to the cable select pin of the sensor. | `POINTING_DEVICE_CS_PIN` |
| Setting | Description | Default |
| ------------------- | ------------------------------------------------------------------ | -------------------------- |
| `ADNS5050_SCLK_PIN` | (Required) The pin connected to the clock pin of the sensor. | `POINTING_DEVICE_SCLK_PIN` |
| `ADNS5050_SDIO_PIN` | (Required) The pin connected to the data pin of the sensor. | `POINTING_DEVICE_SDIO_PIN` |
| `ADNS5050_CS_PIN` | (Required) The pin connected to the Chip Select pin of the sensor. | `POINTING_DEVICE_CS_PIN` |
@ -48,7 +48,7 @@ The ADNS 9800 is an SPI driven optical sensor, that uses laser output for surfac
| `ADNS9800_SPI_LSBFIRST` | (Optional) Sets the Least/Most Significant Byte First setting for SPI. | `false` |
| `ADNS9800_SPI_MODE` | (Optional) Sets the SPI Mode for the sensor. | `3` |
| `ADNS9800_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ |
| `ADNS9800_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | `POINTING_DEVICE_CS_PIN` |
| `ADNS9800_CS_PIN` | (Required) Sets the Chip Select pin connected to the sensor. | `POINTING_DEVICE_CS_PIN` |
The CPI range is 800-8200, in increments of 200. Defaults to 1800 CPI.
@ -124,7 +124,7 @@ Default attenuation is set to 4X, although if you are using a thicker overlay (s
| `CIRQUE_PINNACLE_SPI_LSBFIRST` | (Optional) Sets the Least/Most Significant Byte First setting for SPI. | `false` |
| `CIRQUE_PINNACLE_SPI_MODE` | (Optional) Sets the SPI Mode for the sensor. | `1` |
| `CIRQUE_PINNACLE_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ |
| `CIRQUE_PINNACLE_SPI_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | `POINTING_DEVICE_CS_PIN` |
| `CIRQUE_PINNACLE_SPI_CS_PIN` | (Required) Sets the Chip Select pin connected to the sensor. | `POINTING_DEVICE_CS_PIN` |
Default Scaling is 1024. Actual CPI depends on trackpad diameter.
@ -218,11 +218,14 @@ POINTING_DEVICE_DRIVER = pmw3389
The CPI range is 50-16000, in increments of 50. Defaults to 2000 CPI.
Both PMW 3360 and PMW 3389 are SPI driven optical sensors, that use a built in IR LED for surface tracking.
If you have different CS wiring on each half you can use `PMW33XX_CS_PIN_RIGHT` or `PMW33XX_CS_PINS_RIGHT` in combination with `PMW33XX_CS_PIN` or `PMW33XX_CS_PINS` to configure both sides independently. If `_RIGHT` values aren't provided, they default to be the same as the left ones.
| Setting | Description | Default |
| ---------------------------- | ------------------------------------------------------------------------------------------- | ------------------------ |
| `PMW33XX_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | `POINTING_DEVICE_CS_PIN` |
| `PMW33XX_CS_PINS` | (Alternative) Sets the Cable Select pins connected to multiple sensors. | _not defined_ |
| `PMW33XX_CS_PIN` | (Required) Sets the Chip Select pin connected to the sensor. | `POINTING_DEVICE_CS_PIN` |
| `PMW33XX_CS_PINS` | (Alternative) Sets the Chip Select pins connected to multiple sensors. | `{PMW33XX_CS_PIN}` |
| `PMW33XX_CS_PIN_RIGHT` | (Optional) Sets the Chip Select pin connected to the sensor on the right half. | `PMW33XX_CS_PIN` |
| `PMW33XX_CS_PINS_RIGHT` | (Optional) Sets the Chip Select pins connected to multiple sensors on the right half. | `{PMW33XX_CS_PIN_RIGHT}` |
| `PMW33XX_CPI` | (Optional) Sets counts per inch sensitivity of the sensor. | _varies_ |
| `PMW33XX_CLOCK_SPEED` | (Optional) Sets the clock speed that the sensor runs at. | `2000000` |
| `PMW33XX_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ |

View File

@ -9,8 +9,6 @@
#include "pmw33xx_common.h"
#include "progmem.h"
extern const size_t pmw33xx_number_of_sensors;
uint16_t pmw33xx_get_cpi(uint8_t sensor) {
if (sensor >= pmw33xx_number_of_sensors) {
return 0;

View File

@ -1,3 +1,4 @@
// Copyright 2022 Pablo Martinez (@elpekenin)
// Copyright 2022 Daniel Kao (dkao)
// Copyright 2022 Stefan Kerkmann (KarlK90)
// Copyright 2022 Ulrich Spörlein (@uqs)
@ -17,10 +18,11 @@
extern const uint8_t pmw33xx_firmware_data[PMW33XX_FIRMWARE_LENGTH] PROGMEM;
extern const uint8_t pmw33xx_firmware_signature[3] PROGMEM;
static const pin_t cs_pins[] = PMW33XX_CS_PINS;
static bool in_burst[ARRAY_SIZE(cs_pins)] = {0};
static const pin_t cs_pins_left[] = PMW33XX_CS_PINS;
static const pin_t cs_pins_right[] = PMW33XX_CS_PINS_RIGHT;
const size_t pmw33xx_number_of_sensors = ARRAY_SIZE(cs_pins);
static bool in_burst_left[ARRAY_SIZE(cs_pins_left)] = {0};
static bool in_burst_right[ARRAY_SIZE(cs_pins_right)] = {0};
bool __attribute__((cold)) pmw33xx_upload_firmware(uint8_t sensor);
bool __attribute__((cold)) pmw33xx_check_signature(uint8_t sensor);

View File

@ -1,3 +1,4 @@
// Copyright 2022 Pablo Martinez (@elpekenin)
// Copyright 2022 Daniel Kao (dkao)
// Copyright 2022 Stefan Kerkmann (KarlK90)
// Copyright 2022 Ulrich Spörlein (@uqs)
@ -9,6 +10,7 @@
#pragma once
#include "quantum.h" //to get is_keyboard_left
#include <stdint.h>
#include "spi_master.h"
#include "util.h"
@ -79,6 +81,20 @@ _Static_assert(sizeof((pmw33xx_report_t){0}.motion) == 1, "pmw33xx_report_t.moti
# endif
#endif
// Support single spelling and default to be the same as left side
#if !defined(PMW33XX_CS_PINS_RIGHT)
# if !defined(PMW33XX_CS_PIN_RIGHT)
# define PMW33XX_CS_PIN_RIGHT PMW33XX_CS_PIN
# endif
# define PMW33XX_CS_PINS_RIGHT \
{ PMW33XX_CS_PIN_RIGHT }
#endif
// Defines so the old variable names are swapped by the appropiate value on each half
#define cs_pins (is_keyboard_left() ? cs_pins_left : cs_pins_right)
#define in_burst (is_keyboard_left() ? in_burst_left : in_burst_right)
#define pmw33xx_number_of_sensors (is_keyboard_left() ? ARRAY_SIZE((pin_t[])PMW33XX_CS_PINS) : ARRAY_SIZE((pin_t[])PMW33XX_CS_PINS_RIGHT))
#if PMW33XX_CPI > PMW33XX_CPI_MAX || PMW33XX_CPI < PMW33XX_CPI_MIN || (PMW33XX_CPI % PMW33XX_CPI_STEP) != 0U
# pragma message "PMW33XX_CPI has to be in the range of " STR(PMW33XX_CPI_MAX) "-" STR(PMW33XX_CPI_MIN) " in increments of " STR(PMW33XX_CPI_STEP) ". But it is " STR(PMW33XX_CPI) "."
# error Use correct PMW33XX_CPI value.

View File

@ -1,51 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// Do not allow one macro to contain the other macro
#define DYNAMIC_MACRO_NO_NESTING
// "THE most important tap hold configuration setting"
// https://precondition.github.io/home-row-mods#ignore-mod-tap-interrupt
// https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
#define IGNORE_MOD_TAP_INTERRUPT
// This one is a style choice. Play with it both on and off to see which
// one suits you better.
// https://precondition.github.io/home-row-mods#permissive-hold
// https://docs.qmk.fm/#/tap_hold?id=permissive-hold
#define PERMISSIVE_HOLD
// If you press a dual-role key for longer than TAPPING_TERM, then
// release it without pressing another key, without this setting nothing
// would happen. With this setting, it sends the key's tap function.
// https://precondition.github.io/home-row-mods#retro-tapping
#define RETRO_TAPPING
// Disable some unused features to save space
#undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE
/////
// Flags for stuff in my userspace
#define USER_INCLUDE_GAMING_LAYER
#define USER_INCLUDE_MACRO_LAYER
// "Super Alt-Tab"
// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
#define USER_SUPER_ALT_TAB_TIMEOUT 500

View File

@ -1,95 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "replicaJunction.h"
#define BSP_SYM LT(L_SYMBOLS, KC_BSPC)
#define SPC_NAV LT(L_NAVIGATION, KC_SPC)
#define EQL_FUN LT(L_FN, KC_EQL)
#define ESC_SFT LSFT_T(KC_ESC)
#define TAB_SFT RSFT_T(KC_TAB)
#define DF_TYPE DF(L_BASE)
#define DF_GAME DF(L_GAMING)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[L_BASE] = LAYOUT(
KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O,
KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM,KC_DOT, KC_SLSH,
KC_ESC, KC_LGUI,KC_TAB, ESC_SFT,BSP_SYM,CTL_DEL,ALT_ENT,SPC_NAV,TAB_SFT,KC_MINS,KC_QUOT,EQL_FUN
),
[L_GAMING] = LAYOUT(
_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
_______,_______,KC_C, KC_D, _______, _______,_______,_______,_______,_______,
_______,KC_TAB, KC_LALT,KC_LSFT,KC_SPC, KC_LCTL,KC_LALT,KC_BSPC,KC_BTN1,KC_BTN2,KC_BTN3,_______
),
[L_NUMBERS] = LAYOUT(
_______,_______,_______,_______,_______, KC_HASH,KC_7, KC_8, KC_9, KC_SLSH,
_______,_______,_______,_______,_______, KC_PLUS,KC_4, KC_5, KC_6, KC_ASTR,
_______,_______,_______,_______,_______, KC_MINS,KC_1, KC_2, KC_3, KC_BSLS,
_______,_______,_______,_______,_______,_______,_______,_______,KC_0, KC_0, KC_DOT, KC_ENT
),
[L_SYMBOLS] = LAYOUT(
KC_AT, KC_LT, KC_DLR, KC_GT, XXXXXXX, XXXXXXX,KC_LBRC,KC_UNDS,KC_RBRC,XXXXXXX,
KC_BSLS,KC_LPRN,KC_DQUO,KC_RPRN,KC_HASH, KC_PERC,KC_LCBR,KC_EQL, KC_RCBR,KC_PIPE,
KC_EXLM,KC_COLN,KC_ASTR,KC_PLUS,XXXXXXX, XXXXXXX,KC_AMPR,KC_CIRC,KC_TILD,KC_GRV,
_______,_______,_______,_______,ooooooo,_______,_______,ooooooo,CAPWORD,_______,_______,_______
),
[L_NAVIGATION] = LAYOUT(
OS_UNDO,OS_CUT, OS_PAST,OS_COPY,OS_SALL, KC_PGUP,KC_HOME,KC_UP, KC_END, KC_DEL,
KC_LGUI,KC_LALT,KC_LSFT,KC_LCTL,_______, KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_BSPC,
WIN_V, _______,_______,OS_FIND,SEARCH, _______,SFT_TAB,KC_TAB, KC_APP, KC_PSCR,
_______,_______,_______,NUMWORD,ooooooo,_______,_______,ooooooo,_______,_______,_______,_______
),
[L_FN] = LAYOUT(
QK_BOOT, _______,_______,_______,_______, KC_VOLU,KC_F9, KC_F10, KC_F11, KC_F12,
MS_JIGL,_______,_______,_______,_______, KC_MUTE,KC_F5, KC_F6, KC_F7, KC_F8,
_______,K_SECR1,K_SECR2,K_SECR3,K_SECR4, KC_VOLD,KC_F1, KC_F2, KC_F3, KC_F4,
DF_TYPE,DF_GAME,_______,_______,_______,KC_LCTL,KC_LALT,_______,_______,_______,_______,ooooooo
),
[L_MACROS] = LAYOUT(
QK_MAKE,_______,DM_REC2,DM_REC1,DM_RSTP, _______,SHEBANG,_______,_______,_______,
QK_FLSH,_______,DM_PLY2,DM_PLY1,_______, PRG_NE, PRG_EQ, PRG_GEQ,PRG_LEQ,PRG_ARR,
QK_VERS,_______,_______,_______,_______, _______,PS_ITEM,FS_PIPE,_______,FS_ARR,
_______,_______,_______,_______,ooooooo,_______,_______,ooooooo,_______,_______,_______,_______
)
// Template
// [L_FUNC] = LAYOUT(
// _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
// ),
};
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, L_SYMBOLS, L_NAVIGATION, L_MACROS);
}

View File

@ -1,7 +0,0 @@
# replicaJunction - Atreus Layout
I no longer actively use this keyboard. I've replaced it with the [Keyboardio Atreus](../../../keyboardio/atreus/keymaps/replicaJunction/readme.md).
I still try to make sure the layout compiles, but I'm no longer tweaking it or adding new features.
Most of the interesting features in this layout are defined in [my userspace folder](../../../../users/replicaJunction/readme.md). Refer to the documentation and code there for more details.

View File

@ -1,28 +0,0 @@
# Userspace options
USER_CAPS_WORD_ENABLE = yes
USER_MOUSE_JIGGLE_ENABLE = yes
USER_NUM_WORD_ENABLE = yes
USER_SECRETS_ENABLE = yes
DYNAMIC_MACRO_ENABLE = yes
# Extra features that are nice but takes space. Enable only if they're
# used in the layout.
WPM_ENABLE = no
# EXTRAKEY_ENABLE = no # For volume keys and similar
# MOUSEKEY_ENABLE = no # Them mouse keys yo
KEY_OVERRIDE_ENABLE = no
LEADER_ENABLE = no
TAP_DANCE_ENABLE = no
# RGBLIGHT_ENABLE = no # Keyboard RGB underglow
RGB_MATRIX_ENABLE = no
# Features I definitely don't care aboud
LTO_ENABLE = yes
CONSOLE_ENABLE = no
VERBOSE = no
DEBUG_MATRIX_SCAN_RATE = no
DEBUG_MATRIX = no
MAGIC_ENABLE = no
SPACE_CADET_ENABLE = no
GRAVE_ESC_ENABLE = no

View File

@ -15,7 +15,7 @@
*/
#include "modelm101.h"
void keyboard_pre_init_kb(void) {
void led_init_ports(void) {
/* Setting status LEDs pins to output and +5V (off) */
setPinOutput(B4);
setPinOutput(B5);
@ -25,22 +25,12 @@ void keyboard_pre_init_kb(void) {
writePinHigh(B6);
}
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
writePinLow(B4);
} else {
writePinHigh(B4);
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
writePin(B4, !led_state.num_lock);
writePin(B6, !led_state.caps_lock);
writePin(B5, !led_state.scroll_lock);
}
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
writePinLow(B6);
} else {
writePinHigh(B6);
}
if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
writePinLow(B5);
} else {
writePinHigh(B5);
}
led_set_user(usb_led);
return res;
}

View File

@ -42,20 +42,23 @@ void backlight_set(uint8_t level) {
}
}
// Port from backlight_update_state
void led_set_kb(uint8_t usb_led) {
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
bool status[8] = {
host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK), /* LED 3 */
host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK), /* LED 2 */
host_keyboard_leds() & (1<<USB_LED_NUM_LOCK), /* LED 1 */
led_state.scroll_lock, /* LED 3 */
led_state.caps_lock, /* LED 2 */
led_state.num_lock, /* LED 1 */
layer_state & (1<<2), /* LED 6 */
layer_state & (1<<1), /* LED 5 */
layer_state & (1<<0) ? 0: 1, /* LED 4 */
layer_state & (1<<2), /* LED 6 */
layer_state & (1<<1), /* LED 5 */
layer_state & (1<<0) ? 0: 1, /* LED 4 */
layer_state & (1<<5), /* LED 8 */
layer_state & (1<<4) /* LED 7 */
};
layer_state & (1<<5), /* LED 8 */
layer_state & (1<<4) /* LED 7 */
};
indicator_leds_set(status);
indicator_leds_set(status);
}
return res;
}

View File

@ -95,22 +95,25 @@ void backlight_update_state()
show();
}
void led_set_kb(uint8_t usb_led)
{
if(usb_led & (1<<USB_LED_CAPS_LOCK)) {
backlight_state_led |= 1<<STATE_LED_CAPS_LOCK;
} else {
backlight_state_led &= ~(1<<STATE_LED_CAPS_LOCK);
}
if(usb_led & (1<<USB_LED_SCROLL_LOCK)) {
backlight_state_led |= 1<<STATE_LED_SCROLL_LOCK;
} else {
backlight_state_led &= ~(1<<STATE_LED_SCROLL_LOCK);
}
if(usb_led & (1<<USB_LED_NUM_LOCK)) {
backlight_state_led |= 1<<STATE_LED_NUM_LOCK;
} else {
backlight_state_led &= ~(1<<STATE_LED_NUM_LOCK);
}
backlight_update_state();
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
if(led_state.caps_lock) {
backlight_state_led |= 1<<STATE_LED_CAPS_LOCK;
} else {
backlight_state_led &= ~(1<<STATE_LED_CAPS_LOCK);
}
if(led_state.scroll_lock) {
backlight_state_led |= 1<<STATE_LED_SCROLL_LOCK;
} else {
backlight_state_led &= ~(1<<STATE_LED_SCROLL_LOCK);
}
if(led_state.num_lock) {
backlight_state_led |= 1<<STATE_LED_NUM_LOCK;
} else {
backlight_state_led &= ~(1<<STATE_LED_NUM_LOCK);
}
backlight_update_state();
}
return res;
}

View File

@ -39,18 +39,20 @@ void backlight_set(uint8_t level) {
}
}
void led_set_kb(uint8_t usb_led) {
bool leds[8] = {
usb_led & (1<<USB_LED_CAPS_LOCK),
usb_led & (1<<USB_LED_SCROLL_LOCK),
usb_led & (1<<USB_LED_NUM_LOCK),
layer_state & (1<<1),
layer_state & (1<<2),
layer_state & (1<<3),
layer_state & (1<<4),
layer_state & (1<<5)
};
indicator_leds_set(leds);
led_set_user(usb_led);
}
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
bool leds[8] = {
led_state.caps_lock,
led_state.scroll_lock,
led_state.num_lock,
layer_state & (1<<1),
layer_state & (1<<2),
layer_state & (1<<3),
layer_state & (1<<4),
layer_state & (1<<5)
};
indicator_leds_set(leds);
}
return res;
}

View File

@ -62,8 +62,10 @@ void matrix_init_kb(void) {
matrix_init_user();
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
writePin(LED_02, !IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
led_set_user(usb_led);
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
writePin(LED_02, !led_state.num_lock);
}
return res;
}

View File

@ -62,8 +62,10 @@ void matrix_init_kb(void) {
matrix_init_user();
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
writePin(LED_02, !IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
led_set_user(usb_led);
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
writePin(LED_02, !led_state.num_lock);
}
return res;
}

View File

@ -62,8 +62,10 @@ void matrix_init_kb(void) {
matrix_init_user();
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
writePin(LED_02, !IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
led_set_user(usb_led);
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
writePin(LED_02, !led_state.num_lock);
}
return res;
}

View File

@ -100,20 +100,10 @@ void matrix_init_user(void) {
setPinOutput(C6);
}
void led_set_kb(uint8_t usb_led) {
if (IS_LED_OFF(usb_led, USB_LED_NUM_LOCK)) {
writePinLow(C4);
} else {
writePinHigh(C4);
}
if (IS_LED_OFF(usb_led, USB_LED_CAPS_LOCK)) {
writePinLow(C5);
} else {
writePinHigh(C5);
}
if (IS_LED_OFF(usb_led, USB_LED_SCROLL_LOCK)) {
writePinLow(C6);
} else {
writePinHigh(C6);
}
bool led_update_user(led_t led_state) {
writePin(C4, led_state.num_lock);
writePin(C5, led_state.caps_lock);
writePin(C6, led_state.scroll_lock);
return false;
}

View File

@ -31,12 +31,12 @@
"layout": [
{ "matrix": [0, 0], "x": 0, "y": 0 },
{ "matrix": [0, 1], "x": 1, "y": 0 },
{ "matrix": [0, 2], "x": 2, "y": 0 }
{ "matrix": [0, 2], "x": 2, "y": 0 },
// Row 2
{ "matrix": [1, 0], "x": 0, "y": 1 },
{ "matrix": [1, 1], "x": 1, "y": 1 },
{ "matrix": [1, 2], "x": 2, "y": 1 }
{ "matrix": [1, 2], "x": 2, "y": 1 },
// Row 3
{ "matrix": [2, 0], "x": 0, "y": 2 },

View File

@ -87,8 +87,8 @@
{ "matrix": [4, 2], "x": 2, "y": 4},
{ "matrix": [4, 4], "x": 4, "y": 4},
{ "matrix": [4, 7], "x": 7, "y": 4},
{ "matrix": [4, 8], "x": 8, "y": 4 }
{ "matrix": [4, 9], "x": 9, "y": 4 }
{ "matrix": [4, 8], "x": 8, "y": 4 },
{ "matrix": [4, 9], "x": 9, "y": 4 },
{ "matrix": [4, 10], "x": 10, "y": 4 }
]
}

View File

@ -40,3 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
#define NUM_LOCK_LED_PIN B6
#define CAPS_LOCK_LED_PIN B5
#define SCROLL_LOCK_LED_PIN C6

View File

@ -94,45 +94,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void matrix_init_user(void) {
// set CapsLock LED to output and low
setPinOutput(C6);
writePinHigh(C6);
// set NumLock LED to output and low
setPinOutput(B6);
writePinHigh(B6);
// set ScrollLock LED to output and low
setPinOutput(B5);
writePinHigh(B5);
}
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
writePinHigh(B6);
} else {
writePinLow(B6);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinHigh(B5);
} else {
writePinLow(B5);
}
/*
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
writePinHigh(C6);
} else {
writePinLow(C6);
}
*/
bool led_update_user(led_t led_state) {
writePin(NUM_LOCK_LED_PIN, led_state.num_lock);
writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock);
// writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock);
return false;
}
//function for layer indicator LED
layer_state_t layer_state_set_user(layer_state_t state)
{
if (get_highest_layer(state) == 2) {
writePinHigh(C6);
} else {
writePinLow(C6);
}
writePin(SCROLL_LOCK_LED_PIN, (get_highest_layer(state) == 1));
return state;
}

View File

@ -51,46 +51,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
void matrix_init_user(void) {
// set CapsLock LED to output and low
setPinOutput(C6);
writePinHigh(C6);
// set NumLock LED to output and low
setPinOutput(B6);
writePinHigh(B6);
// set ScrollLock LED to output and low
setPinOutput(B5);
writePinHigh(B5);
}
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
writePinHigh(B6);
} else {
writePinLow(B6);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinHigh(B5);
} else {
writePinLow(B5);
}
/*
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
writePinHigh(C6);
} else {
writePinLow(C6);
}
*/
bool led_update_user(led_t led_state) {
writePin(NUM_LOCK_LED_PIN, led_state.num_lock);
writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock);
// writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock);
return false;
}
//function for layer indicator LED
layer_state_t layer_state_set_user(layer_state_t state)
{
if (get_highest_layer(state) == 1) {
writePinHigh(C6);
} else {
writePinLow(C6);
}
writePin(SCROLL_LOCK_LED_PIN, (get_highest_layer(state) == 1));
return state;
}

View File

@ -3,8 +3,6 @@
#include "quantum.h"
void battery_poll(uint8_t level);
void led_set_kb(uint8_t usb_led);
void led_set_user(uint8_t usb_led);
#define XXX KC_NO

View File

@ -12,36 +12,13 @@ void matrix_init_kb(void) {
matrix_init_user();
};
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
writePin(D0, !led_state.caps_lock);
writePin(D1, !led_state.num_lock);
writePin(C6, !led_state.scroll_lock);
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// output low
DDRD |= (1<<0);
PORTD &= ~(1<<0);
} else {
// Hi-Z
DDRD &= ~(1<<0);
PORTD &= ~(1<<0);
}
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
// output low
DDRD |= (1<<1);
PORTD &= ~(1<<1);
} else {
// Hi-Z
DDRD &= ~(1<<1);
PORTD &= ~(1<<1);
}
if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
// output low
DDRC |= (1<<6);
PORTC &= ~(1<<6);
} else {
// Hi-Z
DDRC &= ~(1<<6);
PORTC &= ~(1<<6);
}
led_set_user(usb_led);
};
return res;
}

View File

@ -47,7 +47,7 @@
"max_brightness": 128
},
"rgblight": {
"pin": "F5",
"pin": "F5"
},
"usb": {
"device_version": "3.0.0",

View File

@ -1,51 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// Do not allow one macro to contain the other macro
#define DYNAMIC_MACRO_NO_NESTING
// "THE most important tap hold configuration setting"
// https://precondition.github.io/home-row-mods#ignore-mod-tap-interrupt
// https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
#define IGNORE_MOD_TAP_INTERRUPT
// This one is a style choice. Play with it both on and off to see which
// one suits you better.
// https://precondition.github.io/home-row-mods#permissive-hold
// https://docs.qmk.fm/#/tap_hold?id=permissive-hold
#define PERMISSIVE_HOLD
// If you press a dual-role key for longer than TAPPING_TERM, then
// release it without pressing another key, without this setting nothing
// would happen. With this setting, it sends the key's tap function.
// https://precondition.github.io/home-row-mods#retro-tapping
#define RETRO_TAPPING
// Disable some unused features to save space
#undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE
/////
// Flags for stuff in my userspace
#define USER_INCLUDE_GAMING_LAYER
#define USER_INCLUDE_MACRO_LAYER
// "Super Alt-Tab"
// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
#define USER_SUPER_ALT_TAB_TIMEOUT 500

View File

@ -1,94 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "replicaJunction.h"
#define BSP_SYM LT(L_SYMBOLS, KC_BSPC)
#define SPC_NAV LT(L_NAVIGATION, KC_SPC)
#define EQL_FUN LT(L_FN, KC_EQL)
#define ESC_SFT LSFT_T(KC_ESC)
#define TAB_SFT RSFT_T(KC_TAB)
#define DF_TYPE DF(L_BASE)
#define DF_GAME DF(L_GAMING)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[L_BASE] = LAYOUT(
KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O,
KC_Z, KC_X, KC_C, KC_D, KC_V, SALTTAB,KC_BSLS,KC_K, KC_H, KC_COMM,KC_DOT, KC_SLSH,
KC_ESC, KC_LGUI,KC_TAB, ESC_SFT,BSP_SYM,CTL_DEL,ALT_ENT,SPC_NAV,TAB_SFT,KC_MINS,KC_QUOT,EQL_FUN
),
[L_GAMING] = LAYOUT(
_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
_______,_______,KC_C, KC_D, _______,_______,QK_LOCK,_______,_______,_______,_______,_______,
_______,KC_TAB, KC_LALT,KC_LSFT,KC_SPC, KC_LCTL,KC_LALT,KC_BSPC,KC_BTN1,KC_BTN2,KC_BTN3,_______
),
[L_NUMBERS] = LAYOUT(
_______,_______,_______,_______,_______, KC_HASH,KC_7, KC_8, KC_9, KC_SLSH,
_______,_______,_______,_______,_______, KC_PLUS,KC_4, KC_5, KC_6, KC_ASTR,
_______,_______,_______,_______,_______,_______,_______,KC_MINS,KC_1, KC_2, KC_3, KC_BSLS,
_______,_______,_______,_______,_______,_______,_______,_______,KC_0, KC_0, KC_DOT, KC_ENT
),
[L_SYMBOLS] = LAYOUT(
KC_AT, KC_LT, KC_DLR, KC_GT, XXXXXXX, XXXXXXX,KC_LBRC,KC_UNDS,KC_RBRC,XXXXXXX,
KC_BSLS,KC_LPRN,KC_DQUO,KC_RPRN,KC_HASH, KC_PERC,KC_LCBR,KC_EQL, KC_RCBR,KC_PIPE,
KC_EXLM,KC_COLN,KC_ASTR,KC_PLUS,XXXXXXX,_______,_______,XXXXXXX,KC_AMPR,KC_CIRC,KC_TILD,KC_GRV,
_______,_______,_______,_______,ooooooo,_______,_______,ooooooo,CAPWORD,_______,_______,_______
),
[L_NAVIGATION] = LAYOUT(
OS_UNDO,OS_CUT, OS_PAST,OS_COPY,OS_SALL, KC_PGUP,KC_HOME,KC_UP, KC_END, KC_DEL,
KC_LGUI,KC_LALT,KC_LSFT,KC_LCTL,_______, KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_BSPC,
WIN_V, _______,_______,OS_FIND,SEARCH, _______,_______,_______,SFT_TAB,KC_TAB, KC_APP, KC_PSCR,
_______,_______,_______,NUMWORD,ooooooo,_______,_______,ooooooo,_______,_______,_______,_______
),
[L_FN] = LAYOUT(
_______,_______,_______,_______,_______, KC_VOLU,KC_F9, KC_F10, KC_F11, KC_F12,
_______,_______,_______,_______,_______, KC_MUTE,KC_F5, KC_F6, KC_F7, KC_F8,
_______,K_SECR1,K_SECR2,K_SECR3,K_SECR4,MS_JIGL,QK_BOOT, KC_VOLD,KC_F1, KC_F2, KC_F3, KC_F4,
DF_TYPE,DF_GAME,_______,_______,_______,KC_LCTL,KC_LALT,_______,_______,_______,_______,ooooooo
),
[L_MACROS] = LAYOUT(
QK_MAKE,_______,DM_REC2,DM_REC1,DM_RSTP, _______,SHEBANG,_______,_______,_______,
QK_FLSH,_______,DM_PLY2,DM_PLY1,_______, PRG_NE, PRG_EQ, PRG_GEQ,PRG_LEQ,PRG_ARR,
QK_VERS,_______,_______,_______,_______,_______,_______,_______,PS_ITEM,FS_PIPE,_______,FS_ARR,
_______,_______,_______,_______,ooooooo,_______,_______,ooooooo,_______,_______,_______,_______
)
// Template
// [L_FUNC] = LAYOUT(
// _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
// ),
};
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, L_SYMBOLS, L_NAVIGATION, L_MACROS);
}

View File

@ -1,6 +0,0 @@
replicaJunction - Keyboardio Atreus
===================================
A 44-key layout designed for daily programming usage and occasional, light gaming.
Most of the interesting logic in this is defined and described in [my userspace](../../../../../users/replicaJunction/readme.md), so check that out if you're interested in how things work. The CAPSWORD and NUMWORD features are especially important for a keyboard this size.

View File

@ -1,29 +0,0 @@
# Userspace options
USER_CAPS_WORD_ENABLE = yes
USER_MOUSE_JIGGLE_ENABLE = yes
USER_NUM_WORD_ENABLE = yes
USER_SECRETS_ENABLE = yes
USER_SUPER_ALT_TAB_ENABLE = yes
DYNAMIC_MACRO_ENABLE = yes
# Extra features that are nice but takes space. Enable only if they're
# used in the layout.
WPM_ENABLE = no
# EXTRAKEY_ENABLE = no # For volume keys and similar
# MOUSEKEY_ENABLE = no # Them mouse keys yo
KEY_OVERRIDE_ENABLE = no
LEADER_ENABLE = no
TAP_DANCE_ENABLE = no
# RGBLIGHT_ENABLE = no # Keyboard RGB underglow
RGB_MATRIX_ENABLE = no
# Features I definitely don't care aboud
LTO_ENABLE = yes
CONSOLE_ENABLE = no
VERBOSE = no
DEBUG_MATRIX_SCAN_RATE = no
DEBUG_MATRIX = no
MAGIC_ENABLE = no
SPACE_CADET_ENABLE = no
GRAVE_ESC_ENABLE = no

View File

@ -70,19 +70,20 @@ void blink_all_leds(void)
matrix_init_user();
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
//Copyright 2014 Warren Janssens <warren.janssens@gmail.com>
uint8_t leds = 0xF0;
if (usb_led & 1 << USB_LED_NUM_LOCK)
leds &= ~0x10;
if (usb_led & 1 << USB_LED_CAPS_LOCK)
leds &= ~0x80;
if (usb_led & 1 << USB_LED_SCROLL_LOCK)
leds &= ~0x20;
PORTD = (PORTD & 0x0F) | leds;
led_set_user(usb_led);
uint8_t leds = 0xF0;
if (led_state.num_lock)
leds &= ~0x10;
if (led_state.caps_lock)
leds &= ~0x80;
if (led_state.scroll_lock)
leds &= ~0x20;
PORTD = (PORTD & 0x0F) | leds;
}
return res;
}

View File

@ -1,16 +0,0 @@
/* Copyright 2019
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bm16a.h"

View File

@ -1,39 +0,0 @@
/* Copyright 2019
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
/* This a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT_ortho_4x4( \
K01, K02, K03, K04, \
K11, K12, K13, K14, \
K21, K22, K23, K24, \
K31, K32, K33, K34 \
) \
{ \
{ K01, K02, K03, K04 }, \
{ K11, K12, K13, K14 }, \
{ K21, K22, K23, K24 }, \
{ K31, K32, K33, K34 } \
}

View File

@ -1,128 +0,0 @@
/* Copyright 2019
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 4
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define MATRIX_ROW_PINS { D3, D5, D1, D2}
#define MATRIX_COL_PINS { D6, D4, D7, B4}
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
#define BACKLIGHT_PIN B6
// #define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 5
#define RGB_DI_PIN E2
#define RGBLED_NUM 4
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_TWINKLE
// #ifdef RGB_DI_PIN
// #define RGBLED_NUM 16
// #define RGBLIGHT_HUE_STEP 8
// #define RGBLIGHT_SAT_STEP 8
// #define RGBLIGHT_VAL_STEP 8
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
// #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
*/
// #define GRAVE_ESC_CTRL_OVERRIDE
/*
* Force NKRO
*
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
* makefile for this to work.)
*
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
* until the next keyboard reset.
*
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
* fully operational during normal computer usage.
*
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
* power-up.
*
*/
//#define FORCE_NKRO
/*
* 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
/* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0

View File

@ -1,33 +0,0 @@
{
"keyboard_name": "bm16a",
"manufacturer": "KPrepublic",
"url": "",
"maintainer": "qmk",
"usb": {
"vid": "0x4B50",
"pid": "0x016A",
"device_version": "0.0.1"
},
"layouts": {
"LAYOUT_ortho_4x4": {
"layout": [
{"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":0, "y":1},
{"x":1, "y":1},
{"x":2, "y":1},
{"x":3, "y":1},
{"x":0, "y":2},
{"x":1, "y":2},
{"x":2, "y":2},
{"x":3, "y":2},
{"x":0, "y":3},
{"x":1, "y":3},
{"x":2, "y":3},
{"x":3, "y":3}
]
}
}
}

View File

@ -1,20 +0,0 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
LAYOUTS = ortho_4x4

View File

@ -0,0 +1,75 @@
{
"keyboard_name": "bm16a",
"manufacturer": "KPrepublic",
"url": "",
"maintainer": "qmk",
"usb": {
"vid": "0x4B50",
"pid": "0x016A",
"device_version": "0.0.1"
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"features": {
"bootmagic": true,
"mousekey": true,
"extrakey": true,
"console": false,
"command": false,
"nkro": true,
"backlight": true,
"rgblight": true,
"audio": false
},
"matrix_pins": {
"rows": ["D3", "D5", "D1", "D2"],
"cols": ["D6", "D4", "D7", "B4"]
},
"diode_direction": "COL2ROW",
"backlight": {
"pin": "B6",
"levels": 5
},
"rgblight": {
"pin": "E2",
"led_count": 4,
"animations": {
"breathing": true,
"rainbow_mood": true,
"rainbow_swirl": true,
"snake": true,
"knight": true,
"christmas": true,
"static_gradient": true,
"rgb_test": true,
"alternating": true,
"twinkle": true
}
},
"community_layouts": ["ortho_4x4"],
"layouts": {
"LAYOUT_ortho_4x4": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2, "y": 0},
{"matrix": [0, 3], "x": 3, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1, "y": 1},
{"matrix": [1, 2], "x": 2, "y": 1},
{"matrix": [1, 3], "x": 3, "y": 1},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1, "y": 2},
{"matrix": [2, 2], "x": 2, "y": 2},
{"matrix": [2, 3], "x": 3, "y": 2},
{"matrix": [3, 0], "x": 0, "y": 3},
{"matrix": [3, 1], "x": 1, "y": 3},
{"matrix": [3, 2], "x": 2, "y": 3},
{"matrix": [3, 3], "x": 3, "y": 3}
]
}
}
}

View File

@ -10,6 +10,6 @@ A 16 key macropad, with USB C, RGB underglow and backlight.
Make example for this keyboard (after setting up your build environment):
make kprepublic/bm16a:default
make kprepublic/bm16a/v1: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).

View File

@ -0,0 +1 @@
# This file intentionally left blank

View File

@ -0,0 +1,12 @@
// Copyright 2022 fauxpark (@fauxpark)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#define RGB_DI_PIN B9
#define RGB_MATRIX_LED_COUNT 16
#define WS2812_PWM_DRIVER PWMD4
#define WS2812_PWM_CHANNEL 4
#define WS2812_DMA_STREAM STM32_DMA1_STREAM7
#define WS2812_DMA_CHANNEL 7

View File

@ -0,0 +1,8 @@
// Copyright 2022 fauxpark (@fauxpark)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#define HAL_USE_PWM TRUE
#include_next <halconf.h>

View File

@ -0,0 +1,120 @@
{
"manufacturer": "kprepublic",
"keyboard_name": "BM16v2",
"maintainer": "qmk",
"bootloader": "stm32duino",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix": true
},
"matrix_pins": {
"cols": ["B1", "A3", "B0", "B4"],
"rows": ["A8", "A9", "B5", "B3"]
},
"processor": "STM32F103", // GD32F303CCT6
"url": "",
"usb": {
"device_version": "0.0.2",
"pid": "0x016C",
"vid": "0x4B50"
},
"layouts": {
"LAYOUT_ortho_4x4": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2, "y": 0},
{"matrix": [0, 3], "x": 3, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1, "y": 1},
{"matrix": [1, 2], "x": 2, "y": 1},
{"matrix": [1, 3], "x": 3, "y": 1},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1, "y": 2},
{"matrix": [2, 2], "x": 2, "y": 2},
{"matrix": [2, 3], "x": 3, "y": 2},
{"matrix": [3, 0], "x": 0, "y": 3},
{"matrix": [3, 1], "x": 1, "y": 3},
{"matrix": [3, 2], "x": 2, "y": 3},
{"matrix": [3, 3], "x": 3, "y": 3}
]
}
},
"community_layouts": ["ortho_4x4"],
"rgb_matrix": {
"driver": "WS2812",
"animations": {
"alphas_mods": true,
"gradient_up_down": true,
"gradient_left_right": true,
"breathing": true,
"band_sat": true,
"band_val": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"rainbow_moving_chevron": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"dual_beacon": true,
"rainbow_beacon": true,
"rainbow_pinwheels": true,
"raindrops": true,
"jellybean_raindrops": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"pixel_fractal": true,
"pixel_flow": true,
"pixel_rain": true,
"solid_reactive_simple": true,
"solid_reactive": true,
"solid_reactive_wide": true,
"solid_reactive_multiwide": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_nexus": true,
"solid_reactive_multinexus": true,
"splash": true,
"multisplash": true,
"solid_splash": true,
"solid_multisplash": true
},
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
{"matrix": [0, 1], "x": 75, "y": 0, "flags": 4},
{"matrix": [0, 2], "x": 149, "y": 0, "flags": 4},
{"matrix": [0, 3], "x": 224, "y": 0, "flags": 4},
{"matrix": [1, 0], "x": 0, "y": 21, "flags": 4},
{"matrix": [1, 1], "x": 75, "y": 21, "flags": 4},
{"matrix": [1, 2], "x": 149, "y": 21, "flags": 4},
{"matrix": [1, 3], "x": 224, "y": 21, "flags": 4},
{"matrix": [2, 0], "x": 0, "y": 43, "flags": 4},
{"matrix": [2, 1], "x": 75, "y": 43, "flags": 4},
{"matrix": [2, 2], "x": 149, "y": 43, "flags": 4},
{"matrix": [2, 3], "x": 224, "y": 43, "flags": 4},
{"matrix": [3, 0], "x": 0, "y": 64, "flags": 4},
{"matrix": [3, 1], "x": 75, "y": 64, "flags": 4},
{"matrix": [3, 2], "x": 149, "y": 64, "flags": 4},
{"matrix": [3, 3], "x": 224, "y": 64, "flags": 4},
]
}
}

View File

@ -0,0 +1,19 @@
// Copyright 2022 fauxpark (@fauxpark)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_4x4(
KC_P7, KC_P8, KC_P9, KC_PMNS,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, KC_PENT,
KC_P0, KC_PDOT, KC_SPC, MO(1)
),
[1] = LAYOUT_ortho_4x4(
QK_BOOT, KC_PAST, KC_PSLS, _______,
RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD,
RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD,
_______, _______, _______, _______
)
};

View File

@ -0,0 +1,9 @@
// Copyright 2022 fauxpark (@fauxpark)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include_next <mcuconf.h>
#undef STM32_PWM_USE_TIM4
#define STM32_PWM_USE_TIM4 TRUE

View File

@ -0,0 +1,27 @@
# BM16A V2
![bm16v2](https://i.imgur.com/3nr7bSoh.png)
A 16 key macropad, with USB-C and per-key RGB.
* Keyboard Maintainer: QMK Community
* Hardware Supported: BM16A PCB (`BM16V2-ARM`)
* Hardware Availability: [KPrepublic](https://kprepublic.com/collections/bm16/products/bm16a-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx)
Make example for this keyboard (after setting up your build environment):
make kprepublic/bm16v2:default
Flashing example for this keyboard:
make kprepublic/bm16a/v2:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
## Bootloader
Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available

View File

@ -0,0 +1 @@
WS2812_DRIVER = pwm

View File

@ -151,11 +151,12 @@ void reset_keyboard_kb() {
reset_keyboard();
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
#ifdef ISSI_ENABLE
# ifdef CAPSLOCK_LED
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
if (led_state.caps_lock) {
activateLED(0, 3, 7, 255);
} else {
activateLED(0, 3, 7, 0);
@ -163,7 +164,8 @@ void led_set_kb(uint8_t usb_led) {
# endif // CAPSLOCK_LED
#endif // ISS_ENABLE
led_set_user(usb_led);
}
return res;
}
// LFK lighting info

View File

@ -128,15 +128,17 @@ void reset_keyboard_kb(){
reset_keyboard();
}
void led_set_kb(uint8_t usb_led)
{
// Set capslock LED to Blue
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
set_rgb(31, 0x00, 0x00, 0x7F);
}else{
set_rgb(31, 0x00, 0x00, 0x00);
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
// Set capslock LED to Blue
if (led_state.caps_lock) {
set_rgb(31, 0x00, 0x00, 0x7F);
} else{
set_rgb(31, 0x00, 0x00, 0x00);
}
}
led_set_user(usb_led);
return res;
}
// Lighting info, see lighting.h for details

View File

@ -134,15 +134,17 @@ void reset_keyboard_kb(){
reset_keyboard();
}
void led_set_kb(uint8_t usb_led)
{
// Set capslock LED to Blue
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
set_rgb(31, 0x00, 0x00, 0x7F);
}else{
set_rgb(31, 0x00, 0x00, 0x00);
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
// Set capslock LED to Blue
if (led_state.caps_lock) {
set_rgb(31, 0x00, 0x00, 0x7F);
} else{
set_rgb(31, 0x00, 0x00, 0x00);
}
}
led_set_user(usb_led);
return res;
}
// Lighting info, see lighting.h for details

View File

@ -22,13 +22,13 @@ void led_init_ports(void) {
setPinOutput(D2);
}
void led_set_kb(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinHigh(B2);
} else {
writePinLow(B2);
}
led_set_user(usb_led);
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
writePin(B2, led_state.caps_lock);
}
return res;
}
layer_state_t layer_state_set_user(layer_state_t state)

View File

@ -8,12 +8,14 @@ extern inline void org60_caps_led_off(void);
extern inline void org60_bl_led_off(void);
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
org60_caps_led_on();
} else {
org60_caps_led_off();
}
led_set_user(usb_led);
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
if (led_state.caps_lock) {
org60_caps_led_on();
} else {
org60_caps_led_off();
}
}
return res;
}

View File

@ -1,40 +1,702 @@
{
"keyboard_name": "Jane v2 CE",
"manufacturer": "TGR",
"url": "",
"maintainer": "qmk",
"usb": {
"vid": "0x5447",
"pid": "0x4A43",
"device_version": "2.0.0"
},
"layouts": {
"LAYOUT_all_f13": {
"layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5}, {"x":14, "y":1.5}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":13.75, "y":3.5, "w":1.25}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5}, {"x":2.25, "y":5.5}, {"x":3.25, "y":5.5, "w":1.25}, {"x":4.5, "y":5.5, "w":1.25}, {"x":5.75, "y":5.5, "w":1.25}, {"x":7, "y":5.5, "w":1.25}, {"x":8.25, "y":5.5, "w":1.25}, {"x":9.5, "y":5.5, "w":1.25}, {"x":10.75, "y":5.5}, {"x":11.75, "y":5.5}, {"x":12.75, "y":5.5}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}]
},
"keyboard_name": "Jane v2 CE",
"manufacturer": "TGR",
"url": "",
"maintainer": "qmk",
"usb": {
"vid": "0x5447",
"pid": "0x4A43",
"device_version": "2.0.0"
},
"layouts": {
"LAYOUT_all_f13": {
"layout": [
{"x":0, "y":0},
{"x":1.25, "y":0},
{"x":2.25, "y":0},
{"x":3.25, "y":0},
{"x":4.25, "y":0},
{"x":5.5, "y":0},
{"x":6.5, "y":0},
{"x":7.5, "y":0},
{"x":8.5, "y":0},
{"x":9.75, "y":0},
{"x":10.75, "y":0},
{"x":11.75, "y":0},
{"x":12.75, "y":0},
{"x":14, "y":0},
{"x":15.25, "y":0},
{"x":16.25, "y":0},
{"x":17.25, "y":0},
"LAYOUT_tkl_f13_ansi": {
"layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}]
},
{"x":0, "y":1.5},
{"x":1, "y":1.5},
{"x":2, "y":1.5},
{"x":3, "y":1.5},
{"x":4, "y":1.5},
{"x":5, "y":1.5},
{"x":6, "y":1.5},
{"x":7, "y":1.5},
{"x":8, "y":1.5},
{"x":9, "y":1.5},
{"x":10, "y":1.5},
{"x":11, "y":1.5},
{"x":12, "y":1.5},
{"x":13, "y":1.5},
{"x":14, "y":1.5},
{"x":15.25, "y":1.5},
{"x":16.25, "y":1.5},
{"x":17.25, "y":1.5},
"LAYOUT_tkl_f13_ansi_tsangan": {
"layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":1.5, "y":5.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":12.5, "y":5.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}]
},
{"x":0, "y":2.5, "w":1.5},
{"x":1.5, "y":2.5},
{"x":2.5, "y":2.5},
{"x":3.5, "y":2.5},
{"x":4.5, "y":2.5},
{"x":5.5, "y":2.5},
{"x":6.5, "y":2.5},
{"x":7.5, "y":2.5},
{"x":8.5, "y":2.5},
{"x":9.5, "y":2.5},
{"x":10.5, "y":2.5},
{"x":11.5, "y":2.5},
{"x":12.5, "y":2.5},
{"x":13.5, "y":2.5, "w":1.5},
{"x":15.25, "y":2.5},
{"x":16.25, "y":2.5},
{"x":17.25, "y":2.5},
"LAYOUT_tkl_f13_ansi_tsangan_split_rshift": {
"layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":1.5, "y":5.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":12.5, "y":5.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}]
},
{"x":0, "y":3.5, "w":1.75},
{"x":1.75, "y":3.5},
{"x":2.75, "y":3.5},
{"x":3.75, "y":3.5},
{"x":4.75, "y":3.5},
{"x":5.75, "y":3.5},
{"x":6.75, "y":3.5},
{"x":7.75, "y":3.5},
{"x":8.75, "y":3.5},
{"x":9.75, "y":3.5},
{"x":10.75, "y":3.5},
{"x":11.75, "y":3.5},
{"x":12.75, "y":3.5},
{"x":13.75, "y":3.5, "w":1.25},
"LAYOUT_tkl_f13_iso": {
"layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}]
},
{"x":0, "y":4.5, "w":1.25},
{"x":1.25, "y":4.5},
{"x":2.25, "y":4.5},
{"x":3.25, "y":4.5},
{"x":4.25, "y":4.5},
{"x":5.25, "y":4.5},
{"x":6.25, "y":4.5},
{"x":7.25, "y":4.5},
{"x":8.25, "y":4.5},
{"x":9.25, "y":4.5},
{"x":10.25, "y":4.5},
{"x":11.25, "y":4.5},
{"x":12.25, "y":4.5, "w":1.75},
{"x":14, "y":4.5},
{"x":16.25, "y":4.5},
"LAYOUT_tkl_f13_iso_tsangan": {
"layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":1.5, "y":5.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":12.5, "y":5.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}]
},
{"x":0, "y":5.5, "w":1.25},
{"x":1.25, "y":5.5},
{"x":2.25, "y":5.5},
{"x":3.25, "y":5.5, "w":1.25},
{"x":4.5, "y":5.5, "w":1.25},
{"x":5.75, "y":5.5, "w":1.25},
{"x":7, "y":5.5, "w":1.25},
{"x":8.25, "y":5.5, "w":1.25},
{"x":9.5, "y":5.5, "w":1.25},
{"x":10.75, "y":5.5},
{"x":11.75, "y":5.5},
{"x":12.75, "y":5.5},
{"x":13.75, "y":5.5, "w":1.25},
{"x":15.25, "y":5.5},
{"x":16.25, "y":5.5},
{"x":17.25, "y":5.5}
]
},
"LAYOUT_tkl_f13_ansi": {
"layout": [
{"x":0, "y":0},
{"x":1.25, "y":0},
{"x":2.25, "y":0},
{"x":3.25, "y":0},
{"x":4.25, "y":0},
{"x":5.5, "y":0},
{"x":6.5, "y":0},
{"x":7.5, "y":0},
{"x":8.5, "y":0},
{"x":9.75, "y":0},
{"x":10.75, "y":0},
{"x":11.75, "y":0},
{"x":12.75, "y":0},
{"x":14, "y":0},
{"x":15.25, "y":0},
{"x":16.25, "y":0},
{"x":17.25, "y":0},
"LAYOUT_tkl_f13_iso_tsangan_split_rshift": {
"layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":1.5, "y":5.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":12.5, "y":5.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}]
}
}
{"x":0, "y":1.5},
{"x":1, "y":1.5},
{"x":2, "y":1.5},
{"x":3, "y":1.5},
{"x":4, "y":1.5},
{"x":5, "y":1.5},
{"x":6, "y":1.5},
{"x":7, "y":1.5},
{"x":8, "y":1.5},
{"x":9, "y":1.5},
{"x":10, "y":1.5},
{"x":11, "y":1.5},
{"x":12, "y":1.5},
{"x":13, "y":1.5, "w":2},
{"x":15.25, "y":1.5},
{"x":16.25, "y":1.5},
{"x":17.25, "y":1.5},
{"x":0, "y":2.5, "w":1.5},
{"x":1.5, "y":2.5},
{"x":2.5, "y":2.5},
{"x":3.5, "y":2.5},
{"x":4.5, "y":2.5},
{"x":5.5, "y":2.5},
{"x":6.5, "y":2.5},
{"x":7.5, "y":2.5},
{"x":8.5, "y":2.5},
{"x":9.5, "y":2.5},
{"x":10.5, "y":2.5},
{"x":11.5, "y":2.5},
{"x":12.5, "y":2.5},
{"x":13.5, "y":2.5, "w":1.5},
{"x":15.25, "y":2.5},
{"x":16.25, "y":2.5},
{"x":17.25, "y":2.5},
{"x":0, "y":3.5, "w":1.75},
{"x":1.75, "y":3.5},
{"x":2.75, "y":3.5},
{"x":3.75, "y":3.5},
{"x":4.75, "y":3.5},
{"x":5.75, "y":3.5},
{"x":6.75, "y":3.5},
{"x":7.75, "y":3.5},
{"x":8.75, "y":3.5},
{"x":9.75, "y":3.5},
{"x":10.75, "y":3.5},
{"x":11.75, "y":3.5},
{"x":12.75, "y":3.5, "w":2.25},
{"x":0, "y":4.5, "w":2.25},
{"x":2.25, "y":4.5},
{"x":3.25, "y":4.5},
{"x":4.25, "y":4.5},
{"x":5.25, "y":4.5},
{"x":6.25, "y":4.5},
{"x":7.25, "y":4.5},
{"x":8.25, "y":4.5},
{"x":9.25, "y":4.5},
{"x":10.25, "y":4.5},
{"x":11.25, "y":4.5},
{"x":12.25, "y":4.5, "w":2.75},
{"x":16.25, "y":4.5},
{"x":0, "y":5.5, "w":1.25},
{"x":1.25, "y":5.5, "w":1.25},
{"x":2.5, "y":5.5, "w":1.25},
{"x":3.75, "y":5.5, "w":6.25},
{"x":10, "y":5.5, "w":1.25},
{"x":11.25, "y":5.5, "w":1.25},
{"x":12.5, "y":5.5, "w":1.25},
{"x":13.75, "y":5.5, "w":1.25},
{"x":15.25, "y":5.5},
{"x":16.25, "y":5.5},
{"x":17.25, "y":5.5}
]
},
"LAYOUT_tkl_f13_ansi_tsangan": {
"layout": [
{"x":0, "y":0},
{"x":1.25, "y":0},
{"x":2.25, "y":0},
{"x":3.25, "y":0},
{"x":4.25, "y":0},
{"x":5.5, "y":0},
{"x":6.5, "y":0},
{"x":7.5, "y":0},
{"x":8.5, "y":0},
{"x":9.75, "y":0},
{"x":10.75, "y":0},
{"x":11.75, "y":0},
{"x":12.75, "y":0},
{"x":14, "y":0},
{"x":15.25, "y":0},
{"x":16.25, "y":0},
{"x":17.25, "y":0},
{"x":0, "y":1.5},
{"x":1, "y":1.5},
{"x":2, "y":1.5},
{"x":3, "y":1.5},
{"x":4, "y":1.5},
{"x":5, "y":1.5},
{"x":6, "y":1.5},
{"x":7, "y":1.5},
{"x":8, "y":1.5},
{"x":9, "y":1.5},
{"x":10, "y":1.5},
{"x":11, "y":1.5},
{"x":12, "y":1.5},
{"x":13, "y":1.5, "w":2},
{"x":15.25, "y":1.5},
{"x":16.25, "y":1.5},
{"x":17.25, "y":1.5},
{"x":0, "y":2.5, "w":1.5},
{"x":1.5, "y":2.5},
{"x":2.5, "y":2.5},
{"x":3.5, "y":2.5},
{"x":4.5, "y":2.5},
{"x":5.5, "y":2.5},
{"x":6.5, "y":2.5},
{"x":7.5, "y":2.5},
{"x":8.5, "y":2.5},
{"x":9.5, "y":2.5},
{"x":10.5, "y":2.5},
{"x":11.5, "y":2.5},
{"x":12.5, "y":2.5},
{"x":13.5, "y":2.5, "w":1.5},
{"x":15.25, "y":2.5},
{"x":16.25, "y":2.5},
{"x":17.25, "y":2.5},
{"x":0, "y":3.5, "w":1.75},
{"x":1.75, "y":3.5},
{"x":2.75, "y":3.5},
{"x":3.75, "y":3.5},
{"x":4.75, "y":3.5},
{"x":5.75, "y":3.5},
{"x":6.75, "y":3.5},
{"x":7.75, "y":3.5},
{"x":8.75, "y":3.5},
{"x":9.75, "y":3.5},
{"x":10.75, "y":3.5},
{"x":11.75, "y":3.5},
{"x":12.75, "y":3.5, "w":2.25},
{"x":0, "y":4.5, "w":2.25},
{"x":2.25, "y":4.5},
{"x":3.25, "y":4.5},
{"x":4.25, "y":4.5},
{"x":5.25, "y":4.5},
{"x":6.25, "y":4.5},
{"x":7.25, "y":4.5},
{"x":8.25, "y":4.5},
{"x":9.25, "y":4.5},
{"x":10.25, "y":4.5},
{"x":11.25, "y":4.5},
{"x":12.25, "y":4.5, "w":2.75},
{"x":16.25, "y":4.5},
{"x":0, "y":5.5, "w":1.5},
{"x":1.5, "y":5.5},
{"x":2.5, "y":5.5, "w":1.5},
{"x":4, "y":5.5, "w":7},
{"x":11, "y":5.5, "w":1.5},
{"x":12.5, "y":5.5},
{"x":13.5, "y":5.5, "w":1.5},
{"x":15.25, "y":5.5},
{"x":16.25, "y":5.5},
{"x":17.25, "y":5.5}
]
},
"LAYOUT_tkl_f13_ansi_tsangan_split_rshift": {
"layout": [
{"x":0, "y":0},
{"x":1.25, "y":0},
{"x":2.25, "y":0},
{"x":3.25, "y":0},
{"x":4.25, "y":0},
{"x":5.5, "y":0},
{"x":6.5, "y":0},
{"x":7.5, "y":0},
{"x":8.5, "y":0},
{"x":9.75, "y":0},
{"x":10.75, "y":0},
{"x":11.75, "y":0},
{"x":12.75, "y":0},
{"x":14, "y":0},
{"x":15.25, "y":0},
{"x":16.25, "y":0},
{"x":17.25, "y":0},
{"x":0, "y":1.5},
{"x":1, "y":1.5},
{"x":2, "y":1.5},
{"x":3, "y":1.5},
{"x":4, "y":1.5},
{"x":5, "y":1.5},
{"x":6, "y":1.5},
{"x":7, "y":1.5},
{"x":8, "y":1.5},
{"x":9, "y":1.5},
{"x":10, "y":1.5},
{"x":11, "y":1.5},
{"x":12, "y":1.5},
{"x":13, "y":1.5, "w":2},
{"x":15.25, "y":1.5},
{"x":16.25, "y":1.5},
{"x":17.25, "y":1.5},
{"x":0, "y":2.5, "w":1.5},
{"x":1.5, "y":2.5},
{"x":2.5, "y":2.5},
{"x":3.5, "y":2.5},
{"x":4.5, "y":2.5},
{"x":5.5, "y":2.5},
{"x":6.5, "y":2.5},
{"x":7.5, "y":2.5},
{"x":8.5, "y":2.5},
{"x":9.5, "y":2.5},
{"x":10.5, "y":2.5},
{"x":11.5, "y":2.5},
{"x":12.5, "y":2.5},
{"x":13.5, "y":2.5, "w":1.5},
{"x":15.25, "y":2.5},
{"x":16.25, "y":2.5},
{"x":17.25, "y":2.5},
{"x":0, "y":3.5, "w":1.75},
{"x":1.75, "y":3.5},
{"x":2.75, "y":3.5},
{"x":3.75, "y":3.5},
{"x":4.75, "y":3.5},
{"x":5.75, "y":3.5},
{"x":6.75, "y":3.5},
{"x":7.75, "y":3.5},
{"x":8.75, "y":3.5},
{"x":9.75, "y":3.5},
{"x":10.75, "y":3.5},
{"x":11.75, "y":3.5},
{"x":12.75, "y":3.5, "w":2.25},
{"x":0, "y":4.5, "w":2.25},
{"x":2.25, "y":4.5},
{"x":3.25, "y":4.5},
{"x":4.25, "y":4.5},
{"x":5.25, "y":4.5},
{"x":6.25, "y":4.5},
{"x":7.25, "y":4.5},
{"x":8.25, "y":4.5},
{"x":9.25, "y":4.5},
{"x":10.25, "y":4.5},
{"x":11.25, "y":4.5},
{"x":12.25, "y":4.5, "w":1.75},
{"x":14, "y":4.5},
{"x":16.25, "y":4.5},
{"x":0, "y":5.5, "w":1.5},
{"x":1.5, "y":5.5},
{"x":2.5, "y":5.5, "w":1.5},
{"x":4, "y":5.5, "w":7},
{"x":11, "y":5.5, "w":1.5},
{"x":12.5, "y":5.5},
{"x":13.5, "y":5.5, "w":1.5},
{"x":15.25, "y":5.5},
{"x":16.25, "y":5.5},
{"x":17.25, "y":5.5}
]
},
"LAYOUT_tkl_f13_iso": {
"layout": [
{"x":0, "y":0},
{"x":1.25, "y":0},
{"x":2.25, "y":0},
{"x":3.25, "y":0},
{"x":4.25, "y":0},
{"x":5.5, "y":0},
{"x":6.5, "y":0},
{"x":7.5, "y":0},
{"x":8.5, "y":0},
{"x":9.75, "y":0},
{"x":10.75, "y":0},
{"x":11.75, "y":0},
{"x":12.75, "y":0},
{"x":14, "y":0},
{"x":15.25, "y":0},
{"x":16.25, "y":0},
{"x":17.25, "y":0},
{"x":0, "y":1.5},
{"x":1, "y":1.5},
{"x":2, "y":1.5},
{"x":3, "y":1.5},
{"x":4, "y":1.5},
{"x":5, "y":1.5},
{"x":6, "y":1.5},
{"x":7, "y":1.5},
{"x":8, "y":1.5},
{"x":9, "y":1.5},
{"x":10, "y":1.5},
{"x":11, "y":1.5},
{"x":12, "y":1.5},
{"x":13, "y":1.5, "w":2},
{"x":15.25, "y":1.5},
{"x":16.25, "y":1.5},
{"x":17.25, "y":1.5},
{"x":0, "y":2.5, "w":1.5},
{"x":1.5, "y":2.5},
{"x":2.5, "y":2.5},
{"x":3.5, "y":2.5},
{"x":4.5, "y":2.5},
{"x":5.5, "y":2.5},
{"x":6.5, "y":2.5},
{"x":7.5, "y":2.5},
{"x":8.5, "y":2.5},
{"x":9.5, "y":2.5},
{"x":10.5, "y":2.5},
{"x":11.5, "y":2.5},
{"x":12.5, "y":2.5},
{"x":15.25, "y":2.5},
{"x":16.25, "y":2.5},
{"x":17.25, "y":2.5},
{"x":0, "y":3.5, "w":1.75},
{"x":1.75, "y":3.5},
{"x":2.75, "y":3.5},
{"x":3.75, "y":3.5},
{"x":4.75, "y":3.5},
{"x":5.75, "y":3.5},
{"x":6.75, "y":3.5},
{"x":7.75, "y":3.5},
{"x":8.75, "y":3.5},
{"x":9.75, "y":3.5},
{"x":10.75, "y":3.5},
{"x":11.75, "y":3.5},
{"x":12.75, "y":3.5},
{"x":13.75, "y":2.5, "w":1.25, "h":2},
{"x":0, "y":4.5, "w":1.25},
{"x":1.25, "y":4.5},
{"x":2.25, "y":4.5},
{"x":3.25, "y":4.5},
{"x":4.25, "y":4.5},
{"x":5.25, "y":4.5},
{"x":6.25, "y":4.5},
{"x":7.25, "y":4.5},
{"x":8.25, "y":4.5},
{"x":9.25, "y":4.5},
{"x":10.25, "y":4.5},
{"x":11.25, "y":4.5},
{"x":12.25, "y":4.5, "w":2.75},
{"x":16.25, "y":4.5},
{"x":0, "y":5.5, "w":1.25},
{"x":1.25, "y":5.5, "w":1.25},
{"x":2.5, "y":5.5, "w":1.25},
{"x":3.75, "y":5.5, "w":6.25},
{"x":10, "y":5.5, "w":1.25},
{"x":11.25, "y":5.5, "w":1.25},
{"x":12.5, "y":5.5, "w":1.25},
{"x":13.75, "y":5.5, "w":1.25},
{"x":15.25, "y":5.5},
{"x":16.25, "y":5.5},
{"x":17.25, "y":5.5}
]
},
"LAYOUT_tkl_f13_iso_tsangan": {
"layout": [
{"x":0, "y":0},
{"x":1.25, "y":0},
{"x":2.25, "y":0},
{"x":3.25, "y":0},
{"x":4.25, "y":0},
{"x":5.5, "y":0},
{"x":6.5, "y":0},
{"x":7.5, "y":0},
{"x":8.5, "y":0},
{"x":9.75, "y":0},
{"x":10.75, "y":0},
{"x":11.75, "y":0},
{"x":12.75, "y":0},
{"x":14, "y":0},
{"x":15.25, "y":0},
{"x":16.25, "y":0},
{"x":17.25, "y":0},
{"x":0, "y":1.5},
{"x":1, "y":1.5},
{"x":2, "y":1.5},
{"x":3, "y":1.5},
{"x":4, "y":1.5},
{"x":5, "y":1.5},
{"x":6, "y":1.5},
{"x":7, "y":1.5},
{"x":8, "y":1.5},
{"x":9, "y":1.5},
{"x":10, "y":1.5},
{"x":11, "y":1.5},
{"x":12, "y":1.5},
{"x":13, "y":1.5, "w":2},
{"x":15.25, "y":1.5},
{"x":16.25, "y":1.5},
{"x":17.25, "y":1.5},
{"x":0, "y":2.5, "w":1.5},
{"x":1.5, "y":2.5},
{"x":2.5, "y":2.5},
{"x":3.5, "y":2.5},
{"x":4.5, "y":2.5},
{"x":5.5, "y":2.5},
{"x":6.5, "y":2.5},
{"x":7.5, "y":2.5},
{"x":8.5, "y":2.5},
{"x":9.5, "y":2.5},
{"x":10.5, "y":2.5},
{"x":11.5, "y":2.5},
{"x":12.5, "y":2.5},
{"x":15.25, "y":2.5},
{"x":16.25, "y":2.5},
{"x":17.25, "y":2.5},
{"x":0, "y":3.5, "w":1.75},
{"x":1.75, "y":3.5},
{"x":2.75, "y":3.5},
{"x":3.75, "y":3.5},
{"x":4.75, "y":3.5},
{"x":5.75, "y":3.5},
{"x":6.75, "y":3.5},
{"x":7.75, "y":3.5},
{"x":8.75, "y":3.5},
{"x":9.75, "y":3.5},
{"x":10.75, "y":3.5},
{"x":11.75, "y":3.5},
{"x":12.75, "y":3.5},
{"x":13.75, "y":2.5, "w":1.25, "h":2},
{"x":0, "y":4.5, "w":1.25},
{"x":1.25, "y":4.5},
{"x":2.25, "y":4.5},
{"x":3.25, "y":4.5},
{"x":4.25, "y":4.5},
{"x":5.25, "y":4.5},
{"x":6.25, "y":4.5},
{"x":7.25, "y":4.5},
{"x":8.25, "y":4.5},
{"x":9.25, "y":4.5},
{"x":10.25, "y":4.5},
{"x":11.25, "y":4.5},
{"x":12.25, "y":4.5, "w":2.75},
{"x":16.25, "y":4.5},
{"x":0, "y":5.5, "w":1.5},
{"x":1.5, "y":5.5},
{"x":2.5, "y":5.5, "w":1.5},
{"x":4, "y":5.5, "w":7},
{"x":11, "y":5.5, "w":1.5},
{"x":12.5, "y":5.5},
{"x":13.5, "y":5.5, "w":1.5},
{"x":15.25, "y":5.5},
{"x":16.25, "y":5.5},
{"x":17.25, "y":5.5}
]
},
"LAYOUT_tkl_f13_iso_tsangan_split_rshift": {
"layout": [
{"x":0, "y":0},
{"x":1.25, "y":0},
{"x":2.25, "y":0},
{"x":3.25, "y":0},
{"x":4.25, "y":0},
{"x":5.5, "y":0},
{"x":6.5, "y":0},
{"x":7.5, "y":0},
{"x":8.5, "y":0},
{"x":9.75, "y":0},
{"x":10.75, "y":0},
{"x":11.75, "y":0},
{"x":12.75, "y":0},
{"x":14, "y":0},
{"x":15.25, "y":0},
{"x":16.25, "y":0},
{"x":17.25, "y":0},
{"x":0, "y":1.5},
{"x":1, "y":1.5},
{"x":2, "y":1.5},
{"x":3, "y":1.5},
{"x":4, "y":1.5},
{"x":5, "y":1.5},
{"x":6, "y":1.5},
{"x":7, "y":1.5},
{"x":8, "y":1.5},
{"x":9, "y":1.5},
{"x":10, "y":1.5},
{"x":11, "y":1.5},
{"x":12, "y":1.5},
{"x":13, "y":1.5, "w":2},
{"x":15.25, "y":1.5},
{"x":16.25, "y":1.5},
{"x":17.25, "y":1.5},
{"x":0, "y":2.5, "w":1.5},
{"x":1.5, "y":2.5},
{"x":2.5, "y":2.5},
{"x":3.5, "y":2.5},
{"x":4.5, "y":2.5},
{"x":5.5, "y":2.5},
{"x":6.5, "y":2.5},
{"x":7.5, "y":2.5},
{"x":8.5, "y":2.5},
{"x":9.5, "y":2.5},
{"x":10.5, "y":2.5},
{"x":11.5, "y":2.5},
{"x":12.5, "y":2.5},
{"x":15.25, "y":2.5},
{"x":16.25, "y":2.5},
{"x":17.25, "y":2.5},
{"x":0, "y":3.5, "w":1.75},
{"x":1.75, "y":3.5},
{"x":2.75, "y":3.5},
{"x":3.75, "y":3.5},
{"x":4.75, "y":3.5},
{"x":5.75, "y":3.5},
{"x":6.75, "y":3.5},
{"x":7.75, "y":3.5},
{"x":8.75, "y":3.5},
{"x":9.75, "y":3.5},
{"x":10.75, "y":3.5},
{"x":11.75, "y":3.5},
{"x":12.75, "y":3.5},
{"x":13.75, "y":2.5, "w":1.25, "h":2},
{"x":0, "y":4.5, "w":1.25},
{"x":1.25, "y":4.5},
{"x":2.25, "y":4.5},
{"x":3.25, "y":4.5},
{"x":4.25, "y":4.5},
{"x":5.25, "y":4.5},
{"x":6.25, "y":4.5},
{"x":7.25, "y":4.5},
{"x":8.25, "y":4.5},
{"x":9.25, "y":4.5},
{"x":10.25, "y":4.5},
{"x":11.25, "y":4.5},
{"x":12.25, "y":4.5, "w":1.75},
{"x":14, "y":4.5},
{"x":16.25, "y":4.5},
{"x":0, "y":5.5, "w":1.5},
{"x":1.5, "y":5.5},
{"x":2.5, "y":5.5, "w":1.5},
{"x":4, "y":5.5, "w":7},
{"x":11, "y":5.5, "w":1.5},
{"x":12.5, "y":5.5},
{"x":13.5, "y":5.5, "w":1.5},
{"x":15.25, "y":5.5},
{"x":16.25, "y":5.5},
{"x":17.25, "y":5.5}
]
}
}
}

View File

@ -17,11 +17,14 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_tkl_f13_ansi(
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_F13, KC_PSCR,KC_SCRL,KC_PAUS,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS ,KC_HOME,KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL ,KC_END ,KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_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_UP,
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT)
[0] = LAYOUT_tkl_f13_ansi(
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_F13, KC_PSCR, KC_SCRL, KC_PAUS,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_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_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
)
};

View File

@ -1 +1 @@
# The default keymap for Jane
# The default keymap for the Jane V2 CE

View File

@ -17,27 +17,32 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_tkl_f13_ansi(
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_F13, KC_PSCR,KC_SCRL,KC_PAUS,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS ,KC_HOME,KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL ,KC_END ,KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_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_UP,
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT),
[1] = LAYOUT_tkl_f13_ansi(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS),
[0] = LAYOUT_tkl_f13_ansi(
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_F13, KC_PSCR, KC_SCRL, KC_PAUS,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_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_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT_tkl_f13_ansi(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[2] = LAYOUT_tkl_f13_ansi(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[2] = LAYOUT_tkl_f13_ansi(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS),
};

View File

@ -17,133 +17,159 @@
#include "quantum.h"
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define XXX KC_NO
/*
*
* 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 6A 0D 0E 6B
*
*
* 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 6C 6D 6E 1D 2u Backspace
*
* 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 7C 7D 7E
* 2.25u 3D ISO Enter
* LShift 30 31 32 33 34 35 36 37 38 39 3A 3B 3D 3C
*
* 40 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 2E 4C 2.75u RShift
*
* 50 51 52 53 54 55 57 58 59 5A 5B 5C 5D 5E 3E 4E
*
*
* 50 51 52 55 58 59 5A 5D Standard
*
*
* 50 51 52 55 58 59 5A Tsangan/WKL
*
*
* I'm not entirely convinced the LAYOUT_all bottom row is accurate, but it's
* what was already in the code.
* - @noroadsleft
* 2022-12-07
*/
#define LAYOUT_all_f13( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \
k50, k51, k52, k53, k54, k55, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k3E, k4E \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \
k50, k51, k52, k53, k54, k55, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k3E, k4E \
){ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \
{ k50, k51, k52, k53, k54, k55, KC_NO, k57, k58, k59, k5A, k5B, k5C, k5D, k5E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6A, k6B, k6C, k6D, k6E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \
{ k50, k51, k52, k53, k54, k55, XXX, k57, k58, k59, k5A, k5B, k5C, k5D, k5E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k6A, k6B, k6C, k6D, k6E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k7C, k7D, k7E } \
}
#define LAYOUT_tkl_f13_ansi( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \
k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5D, k5E, k3E, k4E \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \
k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5D, k5E, k3E, k4E \
){ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E }, \
{ k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, k4E }, \
{ k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, k5D, k5E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6A, k6B, k6C, k6D, k6E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \
{ k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX, k4E }, \
{ k50, k51, k52, XXX, XXX, k55, XXX, XXX, k58, k59, k5A, XXX, XXX, k5D, k5E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k6A, k6B, k6C, k6D, k6E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k7C, k7D, k7E } \
}
#define LAYOUT_tkl_f13_ansi_tsangan( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \
k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, k4E \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \
k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, k4E \
){ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E }, \
{ k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, k4E }, \
{ k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, KC_NO, k5E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6A, k6B, k6C, k6D, k6E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \
{ k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX, k4E }, \
{ k50, k51, k52, XXX, XXX, k55, XXX, XXX, k58, k59, k5A, XXX, XXX, XXX, k5E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k6A, k6B, k6C, k6D, k6E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k7C, k7D, k7E } \
}
#define LAYOUT_tkl_f13_ansi_tsangan_split_rshift( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \
k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, k4E \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \
k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, k4E \
){ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E }, \
{ k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \
{ k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, KC_NO, k5E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6A, k6B, k6C, k6D, k6E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \
{ k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \
{ k50, k51, k52, XXX, XXX, k55, XXX, XXX, k58, k59, k5A, XXX, XXX, XXX, k5E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k6A, k6B, k6C, k6D, k6E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k7C, k7D, k7E } \
}
#define LAYOUT_tkl_f13_iso( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5D, k5E, k3E, k4E \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5D, k5E, k3E, k4E \
){ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, k4E }, \
{ k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, k5D, k5E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6A, k6B, k6C, k6D, k6E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX, k4E }, \
{ k50, k51, k52, XXX, XXX, k55, XXX, XXX, k58, k59, k5A, XXX, XXX, k5D, k5E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k6A, k6B, k6C, k6D, k6E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k7C, k7D, k7E } \
}
#define LAYOUT_tkl_f13_iso_tsangan( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, k4E \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, k4E \
){ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, k4E }, \
{ k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, KC_NO, k5E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6A, k6B, k6C, k6D, k6E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX, k4E }, \
{ k50, k51, k52, XXX, XXX, k55, XXX, XXX, k58, k59, k5A, XXX, XXX, XXX, k5E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k6A, k6B, k6C, k6D, k6E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k7C, k7D, k7E } \
}
#define LAYOUT_tkl_f13_iso_tsangan_split_rshift( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, k4E \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k7C, k7D, k7E, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \
k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, k4E \
){ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \
{ k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, KC_NO, k5E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6A, k6B, k6C, k6D, k6E }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \
{ k50, k51, k52, XXX, XXX, k55, XXX, XXX, k58, k59, k5A, XXX, XXX, XXX, k5E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k6A, k6B, k6C, k6D, k6E }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k7C, k7D, k7E } \
}

View File

@ -8,26 +8,14 @@ extern inline void xd60_caps_led_off(void);
extern inline void xd60_bl_led_off(void);
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
xd60_caps_led_on();
} else {
xd60_caps_led_off();
}
// if (usb_led & (1<<USB_LED_NUM_LOCK)) {
// xd60_esc_led_on();
// } else {
// xd60_esc_led_off();
// }
// if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
// xd60_fn_led_on();
// } else {
// xd60_fn_led_off();
// }
led_set_user(usb_led);
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
if (led_state.caps_lock) {
xd60_caps_led_on();
} else {
xd60_caps_led_off();
}
}
return res;
}

View File

@ -1,51 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// Do not allow one macro to contain the other macro
#define DYNAMIC_MACRO_NO_NESTING
// "THE most important tap hold configuration setting"
// https://precondition.github.io/home-row-mods#ignore-mod-tap-interrupt
// https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
#define IGNORE_MOD_TAP_INTERRUPT
// This one is a style choice. Play with it both on and off to see which
// one suits you better.
// https://precondition.github.io/home-row-mods#permissive-hold
// https://docs.qmk.fm/#/tap_hold?id=permissive-hold
#define PERMISSIVE_HOLD
// If you press a dual-role key for longer than TAPPING_TERM, then
// release it without pressing another key, without this setting nothing
// would happen. With this setting, it sends the key's tap function.
// https://precondition.github.io/home-row-mods#retro-tapping
#define RETRO_TAPPING
// Disable some unused features to save space
#undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE
/////
// Flags for stuff in my userspace
#define USER_INCLUDE_GAMING_LAYER
#define USER_INCLUDE_MACRO_LAYER
// "Super Alt-Tab"
// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
#define USER_SUPER_ALT_TAB_TIMEOUT 500

View File

@ -1,138 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "replicaJunction.h"
// enum additional_keyboard_layers {
// L_RGB = _LAYER_SAFE_RANGE
// };
#define BSP_SYM LT(L_SYMBOLS, KC_BSPC)
#define SPC_NAV LT(L_NAVIGATION, KC_SPC)
#define ESC_NUM LT(L_NUMBERS, KC_ESC)
#define MO_FN MO(L_FN)
#define MO_MAC MO(L_MACROS)
#define DF_TYPE DF(L_BASE)
#define DF_GAME DF(L_GAMING)
#define ESC_SFT LSFT_T(KC_ESC)
#define TAB_SFT RSFT_T(KC_TAB)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[L_BASE] = LAYOUT_ortho_5x15(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_EQL, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_BSLS, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
KC_MINS, KC_A, KC_R, KC_S, KC_T, KC_G, SALTTAB, KC_UP, KC_END, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
NUMWORD, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_LEFT, KC_DOWN, KC_RGHT, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, CAPWORD,
KC_LCTL, KC_LGUI, KC_LALT, MO_FN, ESC_SFT, BSP_SYM, CTL_DEL, KC_ENT, ALT_ENT, SPC_NAV, TAB_SFT, MO_FN, KC_RALT, KC_RGUI, KC_RCTL
),
[L_GAMING] = LAYOUT_ortho_5x15(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LCTL, KC_LALT, KC_LSFT, KC_SPC, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_SPC, MO_FN, KC_RALT, KC_RGUI, KC_RCTL
),
// [L_QWERTY] = LAYOUT_ortho_5x15(
// KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
// KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
// KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
// KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
// KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL
// ),
// [L_CURSOR] = LAYOUT_ortho_5x15(
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, OS_SALL, OS_COPY, OS_PAST, OS_CUT, OS_UNDO, _______,
// _______, KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, _______, _______, _______, SEARCH, SALTTAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______,
// _______, KC_RGUI, KC_RALT, KC_RSFT, KC_RCTL, _______, _______, _______, _______, OS_FIND, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______,
// _______, _______, _______, _______, _______, ooooooo, _______, _______, _______, SPC_NAV, _______, _______, _______, _______, _______
// ),
[L_NUMBERS] = LAYOUT_ortho_5x15(
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NUM, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HASH, KC_P7, KC_P8, KC_P9, KC_PSLS, SFT_TAB,
_______, KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, _______, _______, _______, _______, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PAST, KC_TAB,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_BSLS, KC_EQL,
_______, _______, _______, _______, ooooooo, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PENT, _______
),
[L_SYMBOLS] = LAYOUT_ortho_5x15(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_AT, KC_LT, KC_DLR, KC_GT, XXXXXXX, _______, _______, _______, XXXXXXX, KC_LBRC, KC_UNDS, KC_RBRC, XXXXXXX, _______,
_______, KC_BSLS, KC_LPRN, KC_DQUO, KC_RPRN, KC_HASH, _______, _______, _______, KC_PERC, KC_LCBR, KC_EQL, KC_RCBR, KC_PIPE, _______,
_______, KC_EXLM, KC_COLN, KC_ASTR, KC_PLUS, XXXXXXX, _______, _______, _______, XXXXXXX, KC_AMPR, KC_CIRC, KC_TILD, KC_GRV, _______,
_______, _______, _______, _______, _______, ooooooo, _______, _______, _______, ooooooo, _______, _______, _______, _______, _______
),
[L_NAVIGATION] = LAYOUT_ortho_5x15(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, OS_UNDO, OS_CUT, OS_PAST, OS_COPY, OS_SALL, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______,
_______, KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, _______, _______, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, _______,
_______, WIN_V, _______, _______, OS_FIND, SEARCH, _______, _______, _______, _______, SFT_TAB, KC_TAB, KC_APP, KC_PSCR, _______,
_______, _______, _______, _______, _______, ooooooo, _______, _______, _______, ooooooo, _______, _______, _______, _______, _______
),
[L_FN] = LAYOUT_ortho_5x15(
DF_TYPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, MS_JIGL, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
DF_GAME, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, KC_F12,
_______, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_CAPS, QK_BOOT, _______, KC_MUTE, _______, _______, _______, _______, _______,
_______, RGB_M_P, RGB_M_B, _______, _______, _______, _______, _______, _______, KC_VOLD, K_SECR1, K_SECR2, K_SECR3, K_SECR4, _______,
_______, _______, _______, ooooooo, _______, _______, _______, _______, _______, _______, _______, ooooooo, _______, _______, _______
),
[L_MACROS] = LAYOUT_ortho_5x15(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, QK_MAKE, _______, DM_REC2, DM_REC1, _______, _______, _______, _______, _______, SHEBANG, _______, _______, _______, _______,
_______, QK_FLSH, _______, DM_PLY2, DM_PLY1, DM_RSTP, _______, _______, _______, PRG_NE, PRG_EQ, PRG_GEQ, PRG_LEQ, PRG_ARR, _______,
_______, QK_VERS, _______, _______, _______, _______, _______, _______, _______, _______, PS_ITEM, FS_PIPE, _______, FS_ARR, _______,
_______, _______, _______, _______, ooooooo, _______, _______, _______, _______, ooooooo, _______, _______, _______, _______, _______
)
// [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */
// _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NUM, KC_SLSH, KC_ASTR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
// KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SCRL, KC_F12,
// KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, QK_BOOT, _______, _______, _______,
// KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______,
// _______, _______, RGB_TOG, ooooooo, RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, ooooooo, _______, _______, _______
// )
// // Template
// [_LAYER] = LAYOUT_ortho_5x15(
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
// ),
};
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, L_SYMBOLS, L_NAVIGATION, L_MACROS);
}

View File

@ -1,5 +0,0 @@
# replicaJunction - XD75 layout
As a longtime ortho user, I prefer the "pseudo-split" keymap, where the center 3 columns are used for other purposes. This leaves 6 columns on each side to used like a split Preonic.
Most of the goodies in this layout are defined in [my userspace folder](../../../../users/replicaJunction/readme.md). Better explanations of the interesting features are provided there.

View File

@ -1,29 +0,0 @@
# Userspace options
USER_CAPS_WORD_ENABLE = yes
USER_MOUSE_JIGGLE_ENABLE = yes
USER_NUM_WORD_ENABLE = yes
USER_SECRETS_ENABLE = yes
USER_SUPER_ALT_TAB_ENABLE = yes
DYNAMIC_MACRO_ENABLE = yes
# Extra features that are nice but takes space. Enable only if they're
# used in the layout.
WPM_ENABLE = no
# EXTRAKEY_ENABLE = no # For volume keys and similar
# MOUSEKEY_ENABLE = no # Them mouse keys yo
KEY_OVERRIDE_ENABLE = no
LEADER_ENABLE = no
TAP_DANCE_ENABLE = no
# RGBLIGHT_ENABLE = no # Keyboard RGB underglow
RGB_MATRIX_ENABLE = no
# Features I definitely don't care aboud
LTO_ENABLE = yes
CONSOLE_ENABLE = no
VERBOSE = no
DEBUG_MATRIX_SCAN_RATE = no
DEBUG_MATRIX = no
MAGIC_ENABLE = no
SPACE_CADET_ENABLE = no
GRAVE_ESC_ENABLE = no

View File

@ -27,14 +27,11 @@ void matrix_init_kb(void) {
matrix_init_user();
}
void led_set_kb(uint8_t usb_led) {
// Bit 3 is Green LED, bit 4 is Red LED.
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
send_data = 0x18;
} else {
send_data = 0x10;
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
send_data = led_state.caps_lock ? 0x18 : 0x10;
i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x09, &send_data, 1, 20);
}
i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x09, &send_data, 1, 20);
led_set_user(usb_led);
return res;
}

View File

@ -1,51 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// Do not allow one macro to contain the other macro
#define DYNAMIC_MACRO_NO_NESTING
// "THE most important tap hold configuration setting"
// https://precondition.github.io/home-row-mods#ignore-mod-tap-interrupt
// https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
#define IGNORE_MOD_TAP_INTERRUPT
// This one is a style choice. Play with it both on and off to see which
// one suits you better.
// https://precondition.github.io/home-row-mods#permissive-hold
// https://docs.qmk.fm/#/tap_hold?id=permissive-hold
#define PERMISSIVE_HOLD
// If you press a dual-role key for longer than TAPPING_TERM, then
// release it without pressing another key, without this setting nothing
// would happen. With this setting, it sends the key's tap function.
// https://precondition.github.io/home-row-mods#retro-tapping
#define RETRO_TAPPING
// Disable some unused features to save space
#undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE
/////
// Flags for stuff in my userspace
#define USER_INCLUDE_GAMING_LAYER
#define USER_INCLUDE_MACRO_LAYER
// "Super Alt-Tab"
// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
#define USER_SUPER_ALT_TAB_TIMEOUT 500

View File

@ -1,378 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "replicaJunction.h"
// Most layers are defined in my userspace, but this keyboard has
// an extra one.
enum additional_keyboard_layers {
L_SYSLEDS = _LAYER_SAFE_RANGE
};
#define BSP_SYM LT(L_SYMBOLS, KC_BSPC)
#define SPC_NAV LT(L_NAVIGATION, KC_SPC)
#define MO_FN MO(L_FN)
#define MO_MAC MO(L_MACROS)
#define MO_SLED MO(L_SYSLEDS)
#define TG_GAME TG(L_GAMING)
#define ESC_SFT LSFT_T(KC_ESC)
#define TAB_SFT RSFT_T(KC_TAB)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[L_BASE] = LAYOUT_ergodox(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS,
KC_EQL, KC_Q, KC_W, KC_F, KC_P, KC_B, NUMWORD,
KC_MINS, KC_A, KC_R, KC_S, KC_T, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_RBRC,
KC_LCTL, KC_LGUI ,KC_LALT, MO_FN, ESC_SFT,
KC_HOME, KC_END,
KC_PGUP,
BSP_SYM, CTL_DEL, KC_PGDN,
TG_GAME, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
CAPWORD, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
QK_LOCK, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
TAB_SFT, MO_FN, KC_RALT, KC_RGUI, MO_SLED,
KC_LEFT, KC_RGHT,
KC_UP,
KC_DOWN, ALT_ENT, SPC_NAV
),
[L_GAMING] = LAYOUT_ergodox(
KC_GRV, _______,_______,_______,_______,_______,_______,
KC_TAB, _______,_______,_______,_______,_______,_______,
KC_ESC, KC_A, KC_R, KC_S, KC_T, _______,
KC_LSFT,_______,_______,KC_C, KC_D, _______,_______,
_______,_______,KC_TAB, KC_LALT,KC_LCTL,
QK_LOCK,_______,
_______,
KC_SPC, KC_LSFT,_______,
ooooooo,_______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,_______,_______,
_______,KC_N, KC_E, KC_I, KC_O, _______,
_______,_______,_______,_______,_______,_______,_______,
MO_FN, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,
KC_BTN3,_______,
KC_BTN2,
KC_BTN1,KC_ENT, KC_BSPC
),
[L_NUMBERS] = LAYOUT_ergodox(
_______,_______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,_______,_______,
_______,KC_LGUI,KC_LALT,KC_LSFT,KC_LCTL,_______,
_______,_______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,
_______,_______,
_______,
_______,_______,_______,
_______,KC_NUM, _______,_______,_______,_______,_______,
KC_NUM, KC_HASH,KC_P7, KC_P8, KC_P9, KC_PSLS,SFT_TAB,
KC_PPLS,KC_P4, KC_P5, KC_P6, KC_PAST,KC_TAB,
_______,KC_PMNS,KC_P1, KC_P2, KC_P3, KC_BSLS,KC_EQL,
KC_P0, KC_P0, KC_PDOT,KC_PENT,_______,
_______,_______,
_______,
_______,_______,_______
),
[L_SYMBOLS] = LAYOUT_ergodox(
_______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______,
_______,KC_AT, KC_LT, KC_DLR, KC_GT, XXXXXXX,_______,
_______,KC_BSLS,KC_LPRN,KC_DQUO,KC_RPRN,KC_HASH,
_______,KC_EXLM,KC_COLN,KC_ASTR,KC_PLUS,XXXXXXX,_______,
_______,_______,_______,_______,_______,
_______,_______,
_______,
ooooooo,_______,_______,
_______,KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
_______,XXXXXXX,KC_LBRC,KC_UNDS,KC_RBRC,XXXXXXX,KC_F12,
KC_PERC,KC_LCBR,KC_EQL, KC_RCBR,KC_PIPE,_______,
_______,XXXXXXX,KC_AMPR,KC_CIRC,KC_TILD,KC_GRV, _______,
_______,_______,_______,_______,_______,
_______,_______,
_______,
_______,_______,ooooooo
),
[L_NAVIGATION] = LAYOUT_ergodox(
_______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______,
_______,OS_UNDO,OS_CUT, OS_PAST,OS_COPY,OS_SALL,_______,
_______,KC_LGUI,KC_LSFT,KC_LALT,KC_LCTL,_______,
_______,WIN_V, _______,_______,OS_FIND,SEARCH, _______,
_______,_______,_______,_______,_______,
_______,_______,
_______,
_______,_______,_______,
_______,KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
_______,KC_PGUP,KC_HOME,KC_UP, KC_END, KC_DEL, KC_F12,
KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_BSPC,_______,
_______,_______,SFT_TAB,KC_TAB, KC_APP, KC_PSCR,_______,
_______,_______,_______,_______,_______,
_______,_______,
_______,
_______,_______,ooooooo
),
[L_FN] = LAYOUT_ergodox(
_______,_______,_______,_______,_______,_______,_______,
_______,QK_VERS,_______,DM_REC2,DM_REC1,DM_RSTP,_______,
_______,QK_MAKE,_______,DM_PLY2,DM_PLY1,_______,
_______,QK_FLSH,K_SECR1,K_SECR2,K_SECR3,K_SECR4,_______,
_______,_______,_______,ooooooo,_______,
_______,_______,
_______,
KC_LCTL,_______,_______,
_______,_______,_______,_______,_______,_______,_______,
_______,KC_VOLU,KC_F9, KC_F10, KC_F11, KC_F12, _______,
KC_MUTE,KC_F5, KC_F6, KC_F7, KC_F8, _______,
_______,KC_VOLD,KC_F1, KC_F2, KC_F3, KC_F4, _______,
_______,ooooooo,_______,_______,_______,
_______,QK_BOOT,
_______,
_______,_______,KC_LALT
),
[L_MACROS] = LAYOUT_ergodox(
_______,_______,_______,_______,_______,_______,_______,
_______,_______,_______,DM_REC2,DM_REC1,_______,_______,
_______,_______,_______,DM_PLY2,DM_PLY1,DM_RSTP,
_______,_______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,
_______,_______,
_______,
ooooooo,_______,_______,
_______,_______,_______,_______,_______,_______,_______,
_______,_______,SHEBANG,_______,_______,_______,_______,
PRG_NE, PRG_EQ, PRG_GEQ,PRG_LEQ,PRG_ARR,_______,
_______,_______,PS_ITEM,FS_PIPE,_______,FS_ARR, _______,
_______,_______,_______,_______,_______,
_______,_______,
_______,
_______,_______,ooooooo
),
[L_SYSLEDS] = LAYOUT_ergodox(
_______,_______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,
_______,_______,
_______,
_______,_______,_______,
KC_NUM, _______,_______,_______,_______,_______,_______,
KC_CAPS,_______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,_______,
KC_SCRL,_______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,ooooooo,
_______,_______,
_______,
_______,_______,_______
)
// Template
// [_NUMBERS] = LAYOUT_ergodox(
// _______,_______,_______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,
// _______,_______,
// _______,
// _______,_______,_______,
// _______,_______,_______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,
// _______,_______,
// _______,
// _______,_______,_______
// ),
};
void keyboard_post_init_user_kb(void) {
ergodox_right_led_1_on();
}
////////////////////////////////////////////////////////////
// System LED code
////////////////////////////////////////////////////////////
// We need to track both the layer state and the system LED state in
// order to update the LEDs appropriately when either one changes.
// These are both represented as a bitmask.
//
// There is a global 'layer_state' variable but it is set after the call
// to layer_state_set_user(), so it doesn't work properly for our
// purposes.
static uint32_t current_layer_state = 0;
static uint8_t sys_led_state = 0;
// Whether the given layer (one of the constant defined at the top) is active.
#define LAYER_ON(state, layer) (state & (1<<layer))
// Brightness of LEDs (0-255)
// Default value is 255. Use a lesser value for dimmer LEDs.
static const uint8_t max_led_value = 255;
void led_1_on(void) {
ergodox_right_led_1_on();
ergodox_right_led_1_set(max_led_value);
}
void led_2_on(void) {
ergodox_right_led_2_on();
ergodox_right_led_2_set(max_led_value);
}
void led_3_on(void) {
ergodox_right_led_3_on();
ergodox_right_led_3_set(max_led_value);
}
// The onboard LED doesn't support brightness, but this function keeps
// things consistent.
void led_board_on(void) {
ergodox_board_led_on();
}
void led_1_off(void) {
ergodox_right_led_1_off();
}
void led_2_off(void) {
ergodox_right_led_2_off();
}
void led_3_off(void) {
ergodox_right_led_3_off();
}
void led_board_off(void) {
ergodox_board_led_off();
}
void set_leds_by_system_state(uint8_t led_state) {
led_t host_led_state = host_keyboard_led_state();
if (led_state & host_led_state.num_lock) {
led_1_on();
}
else {
led_1_off();
}
if (led_state & host_led_state.caps_lock) {
led_2_on();
}
else {
led_2_off();
}
if (led_state & host_led_state.scroll_lock) {
led_3_on();
}
else {
led_3_off();
}
}
void set_leds_by_layer_state(uint32_t layer_state) {
if (LAYER_ON(layer_state, L_FN)) {
led_1_on();
led_2_on();
led_3_on();
led_board_off();
}
else if (LAYER_ON(layer_state, L_GAMING)) {
led_1_off();
led_2_off();
led_3_off();
led_board_on();
}
else if (LAYER_ON(layer_state, L_NUMBERS)) {
led_1_on();
led_2_off();
led_3_off();
led_board_off();
}
else if (LAYER_ON(layer_state, L_NAVIGATION)) {
led_1_off();
led_2_on();
led_3_off();
led_board_off();
}
else {
led_1_on();
led_2_off();
led_3_off();
led_board_off();
}
}
void led_set_kb(uint8_t usb_led) {
sys_led_state = usb_led;
if (LAYER_ON(current_layer_state, L_SYSLEDS)) {
set_leds_by_system_state(sys_led_state);
}
else {
set_leds_by_layer_state(current_layer_state);
}
led_set_user(usb_led);
}
layer_state_t layer_state_set_kb(layer_state_t state) {
current_layer_state = state;
if (LAYER_ON(state, L_SYSLEDS)) {
set_leds_by_system_state(sys_led_state);
}
else {
set_leds_by_layer_state(state);
}
return update_tri_layer_state(state, L_SYMBOLS, L_NAVIGATION, L_MACROS);
}

View File

@ -1,5 +0,0 @@
# replicaJunction - Ergodox (EZ) Layout
Most of the goodies in this layout are defined in [my userspace folder](../../../../users/replicaJunction/readme.md). Better explanations of the interesting features are provided there.
One feature is worth pointing out here, since it's keyboard-specific: handling of the LEDs. Normally, I use the LEDs to indicate layer state, but it's occasionally useful to be able to view the system state as well (num lock, caps lock, scroll lock). The final layer in the keymap, `L_SYSLEDS`, is used to indicate this. I have a MO key that temporarily switches the LED behavior to show system state, and on this layer, the three keys with LEDs are each used to toggle the respective lock.

View File

@ -1,33 +0,0 @@
# https://docs.qmk.fm/getting_started_make_guide.html
# Userspace options
USER_CAPS_WORD_ENABLE = yes
USER_NUM_WORD_ENABLE = yes
USER_SECRETS_ENABLE = yes
USER_SUPER_ALT_TAB_ENABLE = yes
# Features to enable
DYNAMIC_MACRO_ENABLE = yes
KEY_LOCK_ENABLE = yes
# Extra features that are nice but takes space. Enable only if they're
# used in the layout.
WPM_ENABLE = no
# EXTRAKEY_ENABLE = no # For volume keys and similar
# MOUSEKEY_ENABLE = no # Them mouse keys yo
KEY_OVERRIDE_ENABLE = no
LEADER_ENABLE = no
TAP_DANCE_ENABLE = no
# RGBLIGHT_ENABLE = no # Keyboard RGB underglow
RGB_MATRIX_ENABLE = no
# Features I definitely don't care aboud
LTO_ENABLE = yes
CONSOLE_ENABLE = no
VERBOSE = no
DEBUG_MATRIX_SCAN_RATE = no
DEBUG_MATRIX = no
MAGIC_ENABLE = no
SPACE_CADET_ENABLE = no
GRAVE_ESC_ENABLE = no

View File

@ -12,7 +12,7 @@ from qmk.info import info_json
from qmk.json_encoders import InfoJSONEncoder
from qmk.json_schema import json_load
from qmk.keyboard import find_readme, list_keyboards
from qmk.keycodes import load_spec, list_versions
from qmk.keycodes import load_spec, list_versions, list_languages
from qmk.xap.common import get_xap_definition_files, update_xap_definitions
DATA_PATH = Path('data')
@ -46,6 +46,13 @@ def _resolve_keycode_specs(output_folder):
output_file = output_folder / f'constants/keycodes_{version}.json'
output_file.write_text(json.dumps(overall, indent=4), encoding='utf-8')
for lang in list_languages():
for version in list_versions(lang):
overall = load_spec(version, lang)
output_file = output_folder / f'constants/keycodes_{lang}_{version}.json'
output_file.write_text(json.dumps(overall, indent=4), encoding='utf-8')
# Purge files consumed by 'load_spec'
shutil.rmtree(output_folder / 'constants/keycodes/')

View File

@ -8,6 +8,24 @@ from qmk.path import normpath
from qmk.keycodes import load_spec
def _render_key(key):
width = 7
if 'S(' in key:
width += len('S()')
if 'A(' in key:
width += len('A()')
if 'RCTL(' in key:
width += len('RCTL()')
if 'ALGR(' in key:
width += len('ALGR()')
return key.ljust(width)
def _render_label(label):
label = label.replace("\\", "(backslash)")
return label
def _generate_ranges(lines, keycodes):
lines.append('')
lines.append('enum qk_keycode_ranges {')
@ -67,6 +85,22 @@ def _generate_helpers(lines, keycodes):
lines.append(f'#define IS_{ group.upper() }_KEYCODE(code) ((code) >= {lo} && (code) <= {hi})')
def _generate_aliases(lines, keycodes):
lines.append('')
lines.append('// Aliases')
for key, value in keycodes["aliases"].items():
define = _render_key(value.get("key"))
val = _render_key(key)
label = _render_label(value.get("label"))
lines.append(f'#define {define} {val} // {label}')
lines.append('')
for key, value in keycodes["aliases"].items():
for alias in value.get("aliases", []):
lines.append(f'#define {alias} {value.get("key")}')
@cli.argument('-v', '--version', arg_only=True, required=True, help='Version of keycodes to generate.')
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
@ -86,3 +120,23 @@ def generate_keycodes(cli):
# Show the results
dump_lines(cli.args.output, keycodes_h_lines, cli.args.quiet)
@cli.argument('-v', '--version', arg_only=True, required=True, help='Version of keycodes to generate.')
@cli.argument('-l', '--lang', arg_only=True, required=True, help='Language of keycodes to generate.')
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
@cli.subcommand('Used by the make system to generate keymap_{lang}.h from keycodes_{lang}_{version}.json', hidden=True)
def generate_keycode_extras(cli):
"""Generates the header file.
"""
# Build the header file.
keycodes_h_lines = [GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, '#pragma once', '#include "keymap.h"', '// clang-format off']
keycodes = load_spec(cli.args.version, cli.args.lang)
_generate_aliases(keycodes_h_lines, keycodes)
# Show the results
dump_lines(cli.args.output, keycodes_h_lines, cli.args.quiet)

View File

@ -2,7 +2,42 @@ from pathlib import Path
from qmk.json_schema import deep_update, json_load, validate
CONSTANTS_PATH = Path('data/constants/keycodes/')
CONSTANTS_PATH = Path('data/constants/')
KEYCODES_PATH = CONSTANTS_PATH / 'keycodes'
EXTRAS_PATH = KEYCODES_PATH / 'extras'
def _find_versions(path, prefix):
ret = []
for file in path.glob(f'{prefix}_[0-9].[0-9].[0-9].hjson'):
ret.append(file.stem.split('_')[-1])
ret.sort(reverse=True)
return ret
def _load_fragments(path, prefix, version):
file = path / f'{prefix}_{version}.hjson'
if not file.exists():
raise ValueError(f'Requested keycode spec ({prefix}:{version}) is invalid!')
# Load base
spec = json_load(file)
# Merge in fragments
fragments = path.glob(f'{prefix}_{version}_*.hjson')
for file in fragments:
deep_update(spec, json_load(file))
return spec
def _search_path(lang=None):
return EXTRAS_PATH if lang else KEYCODES_PATH
def _search_prefix(lang=None):
return f'keycodes_{lang}' if lang else 'keycodes'
def _validate(spec):
@ -19,26 +54,20 @@ def _validate(spec):
raise ValueError(f'Keycode spec contains duplicate keycodes! ({",".join(duplicates)})')
def load_spec(version):
def load_spec(version, lang=None):
"""Build keycode data from the requested spec file
"""
if version == 'latest':
version = list_versions()[0]
version = list_versions(lang)[0]
file = CONSTANTS_PATH / f'keycodes_{version}.hjson'
if not file.exists():
raise ValueError(f'Requested keycode spec ({version}) is invalid!')
path = _search_path(lang)
prefix = _search_prefix(lang)
# Load base
spec = json_load(file)
# Merge in fragments
fragments = CONSTANTS_PATH.glob(f'keycodes_{version}_*.hjson')
for file in fragments:
deep_update(spec, json_load(file))
spec = _load_fragments(path, prefix, version)
# Sort?
spec['keycodes'] = dict(sorted(spec['keycodes'].items()))
spec['keycodes'] = dict(sorted(spec.get('keycodes', {}).items()))
# Validate?
_validate(spec)
@ -46,12 +75,20 @@ def load_spec(version):
return spec
def list_versions():
def list_versions(lang=None):
"""Return available versions - sorted newest first
"""
ret = []
for file in CONSTANTS_PATH.glob('keycodes_[0-9].[0-9].[0-9].hjson'):
ret.append(file.stem.split('_')[1])
path = _search_path(lang)
prefix = _search_prefix(lang)
return _find_versions(path, prefix)
def list_languages():
"""Return available languages
"""
ret = set()
for file in EXTRAS_PATH.glob('keycodes_*_[0-9].[0-9].[0-9].hjson'):
ret.add(file.stem.split('_')[1])
ret.sort(reverse=True)
return ret

View File

@ -0,0 +1,11 @@
include $(CHIBIOS_CONTRIB)/os/hal/boards/PJRC_TEENSY_3_5/board.mk
# List of all the board related files.
BOARDSRC += $(BOARD_PATH)/board/extra.c
# Required include directories
BOARDINC += $(BOARD_PATH)/board
# Shared variables
ALLCSRC += $(BOARDSRC)
ALLINC += $(BOARDINC)

View File

@ -0,0 +1,7 @@
#include <hal.h>
void restart_usb_driver(USBDriver *usbp) {
// Do nothing. Restarting the USB driver on the Teensy 3.6 breaks it,
// resulting in a keyboard which can wake up a PC from Suspend-to-RAM, but
// does not actually produce any keypresses until you un-plug and re-plug.
}

View File

@ -1,39 +1,33 @@
/* Copyright 2015-2016 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Copyright 2022 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
/*******************************************************************************
88888888888 888 d8b .d888 d8b 888 d8b
888 888 Y8P d88P" Y8P 888 Y8P
888 888 888 888
888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b
888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K
888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b.
888 888 888 888 X88 888 888 888 Y8b. 888 X88
888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P'
888 888
888 888
888 888
.d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888
d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888
888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888
Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888
"Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888
888
Y8b d88P
"Y88P"
*******************************************************************************/
#pragma once
#include "keymap.h"
// clang-format off
/*
*
* ` 1 2 3 4 5 6 7 8 9 0 - =
*
* Q W E R T Y U I O P [ ]
*
* A S D F G H J K L ; ' #
*
* \ Z X C V B N M , . /
*
*
*
*/
// Row 1
// Aliases
#define UK_GRV KC_GRV // `
#define UK_1 KC_1 // 1
#define UK_2 KC_2 // 2
@ -47,7 +41,6 @@
#define UK_0 KC_0 // 0
#define UK_MINS KC_MINS // -
#define UK_EQL KC_EQL // =
// Row 2
#define UK_Q KC_Q // Q
#define UK_W KC_W // W
#define UK_E KC_E // E
@ -60,7 +53,6 @@
#define UK_P KC_P // P
#define UK_LBRC KC_LBRC // [
#define UK_RBRC KC_RBRC // ]
// Row 3
#define UK_A KC_A // A
#define UK_S KC_S // S
#define UK_D KC_D // D
@ -73,7 +65,6 @@
#define UK_SCLN KC_SCLN // ;
#define UK_QUOT KC_QUOT // '
#define UK_HASH KC_NUHS // #
// Row 4
#define UK_BSLS KC_NUBS // (backslash)
#define UK_Z KC_Z // Z
#define UK_X KC_X // X
@ -85,21 +76,6 @@
#define UK_COMM KC_COMM // ,
#define UK_DOT KC_DOT // .
#define UK_SLSH KC_SLSH // /
/* Shifted symbols
*
* ¬ ! " │ £ │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │
*
* { }
*
* : @ ~
*
* | < > ?
*
*
*
*/
// Row 1
#define UK_NOT S(UK_GRV) // ¬
#define UK_EXLM S(UK_1) // !
#define UK_DQUO S(UK_2) // "
@ -113,39 +89,21 @@
#define UK_RPRN S(UK_0) // )
#define UK_UNDS S(UK_MINS) // _
#define UK_PLUS S(UK_EQL) // +
// Row 2
#define UK_LCBR S(UK_LBRC) // {
#define UK_RCBR S(UK_RBRC) // }
// Row 3
#define UK_COLN S(UK_SCLN) // :
#define UK_AT S(UK_QUOT) // @
#define UK_TILD S(UK_HASH) // ~
// Row 4
#define UK_PIPE S(UK_BSLS) // |
#define UK_LABK S(UK_COMM) // <
#define UK_RABK S(UK_DOT) // >
#define UK_QUES S(UK_SLSH) // ?
/* AltGr symbols
*
* ¦
*
* É Ú Í Ó
*
* Á
*
*
*
*
*
*/
// Row 1
#define UK_BRKP ALGR(UK_GRV) // ¦
#define UK_EURO ALGR(UK_4) // €
// Row 2
#define UK_EACU ALGR(KC_E) // É
#define UK_UACU ALGR(KC_U) // Ú
#define UK_IACU ALGR(KC_I) // Í
#define UK_OACU ALGR(KC_O) // Ó
// Row 3
#define UK_AACU ALGR(KC_A) // Á

View File

@ -1,52 +1,55 @@
// Copyright 2022 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
/*******************************************************************************
88888888888 888 d8b .d888 d8b 888 d8b
888 888 Y8P d88P" Y8P 888 Y8P
888 888 888 888
888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b
888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K
888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b.
888 888 888 888 X88 888 888 888 Y8b. 888 X88
888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P'
888 888
888 888
888 888
.d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888
d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888
888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888
Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888
"Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888
888
Y8b d88P
"Y88P"
*******************************************************************************/
#pragma once
#include "keymap.h"
// clang-format off
/* Shifted symbols
*
* ~ ! @ # $ % ^ & * ( ) _ +
*
* { } |
*
* : " │ │
*
* < > ?
*
*
*
*/
// Row 1
// Aliases
#define KC_TILD S(KC_GRAVE) // ~
#define KC_EXLM S(KC_1) // !
#define KC_AT S(KC_2) // @
#define KC_HASH S(KC_3) // #
#define KC_DLR S(KC_4) // $
#define KC_PERC S(KC_5) // %
#define KC_CIRC S(KC_6) // ^
#define KC_AMPR S(KC_7) // &
#define KC_ASTR S(KC_8) // *
#define KC_LPRN S(KC_9) // (
#define KC_RPRN S(KC_0) // )
#define KC_EXLM S(KC_1) // !
#define KC_AT S(KC_2) // @
#define KC_HASH S(KC_3) // #
#define KC_DLR S(KC_4) // $
#define KC_PERC S(KC_5) // %
#define KC_CIRC S(KC_6) // ^
#define KC_AMPR S(KC_7) // &
#define KC_ASTR S(KC_8) // *
#define KC_LPRN S(KC_9) // (
#define KC_RPRN S(KC_0) // )
#define KC_UNDS S(KC_MINUS) // _
#define KC_PLUS S(KC_EQUAL) // +
// Row 2
#define KC_LCBR S(KC_LEFT_BRACKET) // {
#define KC_LCBR S(KC_LEFT_BRACKET) // {
#define KC_RCBR S(KC_RIGHT_BRACKET) // }
#define KC_PIPE S(KC_BACKSLASH) // |
// Row 3
#define KC_PIPE S(KC_BACKSLASH) // |
#define KC_COLN S(KC_SEMICOLON) // :
#define KC_DQUO S(KC_QUOTE) // "
// Row 4
#define KC_DQUO S(KC_QUOTE) // "
#define KC_LABK S(KC_COMMA) // <
#define KC_RABK S(KC_DOT) // >
#define KC_RABK S(KC_DOT) // >
#define KC_QUES S(KC_SLASH) // ?
// alias stuff
#define KC_TILDE KC_TILD
#define KC_EXCLAIM KC_EXLM
#define KC_DOLLAR KC_DLR
@ -57,16 +60,14 @@
#define KC_LEFT_PAREN KC_LPRN
#define KC_RIGHT_PAREN KC_RPRN
#define KC_UNDERSCORE KC_UNDS
#define KC_LEFT_CURLY_BRACE KC_LCBR
#define KC_RIGHT_CURLY_BRACE KC_RCBR
#define KC_COLON KC_COLN
#define KC_DOUBLE_QUOTE KC_DQUO
#define KC_DQT KC_DQUO
#define KC_LEFT_ANGLE_BRACKET KC_LABK
#define KC_LT KC_LABK
#define KC_RIGHT_ANGLE_BRACKET KC_RABK
#define KC_GT KC_RABK
#define KC_QUESTION KC_QUES

View File

@ -1,2 +0,0 @@
# Do not include the secrets definitions
secret_definitions.h

View File

@ -1,105 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "caps_word.h"
static bool is_caps_word_on = false;
bool is_caps_word_enabled(void) {
return is_caps_word_on;
}
void enable_caps_word(void) {
if (is_caps_word_on) return;
is_caps_word_on = true;
tap_code(KC_CAPS);
}
void disable_caps_word(void) {
if (!is_caps_word_on) return;
is_caps_word_on = false;
tap_code(KC_CAPS);
}
void toggle_caps_word(void) {
if (is_caps_word_on) {
disable_caps_word();
}
else {
enable_caps_word();
}
}
bool should_terminate_caps_word(uint16_t keycode, const keyrecord_t *record) {
switch (keycode) {
// Keycodes which should not disable caps word mode
case KC_A ... KC_Z:
case KC_1 ... KC_0:
case KC_MINS:
case KC_UNDS:
case KC_BSPC:
return false;
default:
if (record->event.pressed) {
return true;
}
return false;
}
// Should be unreachable
return false;
}
bool process_record_caps_word(uint16_t keycode, const keyrecord_t *record) {
// Nothing in this function acts on key release
if (!record->event.pressed) {
return true;
}
// Handle the custom keycodes that go with this feature
if (keycode == CAPWORD) {
enable_caps_word();
return false;
}
// If the behavior isn't enabled and the keypress isn't a keycode to
// toggle the behavior, allow QMK to handle the keypress as usual
if (!is_caps_word_on) {
return true;
}
// Get the base keycode of a mod or layer tap key
switch (keycode) {
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
case QK_TAP_DANCE ... QK_TAP_DANCE_MAX:
// Earlier return if this has not been considered tapped yet
if (record->tap.count == 0)
return true;
keycode = keycode & 0xFF;
break;
default:
break;
}
if (should_terminate_caps_word(keycode, record)) {
disable_caps_word();
}
return true;
}

View File

@ -1,26 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include QMK_KEYBOARD_H
#include "rj_keycodes.h"
bool is_caps_word_enabled(void);
void enable_caps_word(void);
void disable_caps_word(void);
void toggle_caps_word(void);
bool process_record_caps_word(uint16_t keycode, const keyrecord_t *record);

View File

@ -1,46 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "mouse_jiggle.h"
bool is_mouse_jiggle_active = false;
void matrix_scan_mouse_jiggle(void) {
if (is_mouse_jiggle_active) {
tap_code(KC_MS_UP);
tap_code(KC_MS_DOWN);
}
}
bool process_record_mouse_jiggle(uint16_t keycode, const keyrecord_t *record) {
if (!record->event.pressed) {
return true;
}
if (is_mouse_jiggle_active) {
// If active, quit whenever another key is pressed
is_mouse_jiggle_active = false;
return true;
}
if (keycode != MS_JIGL) {
return true;
}
is_mouse_jiggle_active = true;
SEND_STRING("Mouse jiggler enabled");
return false;
}

View File

@ -1,23 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include QMK_KEYBOARD_H
#include "rj_keycodes.h"
void matrix_scan_mouse_jiggle(void);
bool process_record_mouse_jiggle(uint16_t keycode, const keyrecord_t *record);

View File

@ -1,129 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "num_word.h"
static uint16_t num_word_timer = 0;
static bool is_num_word_on = false;
bool is_num_word_enabled(void) {
return is_num_word_on;
}
void enable_num_word(void) {
if (is_num_word_on) return;
is_num_word_on = true;
layer_on(L_NUMBERS);
}
void disable_num_word(void) {
if (!is_num_word_on) return;
is_num_word_on = false;
layer_off(L_NUMBERS);
}
void toggle_num_word(void) {
if (is_num_word_on) {
disable_num_word();
}
else {
enable_num_word();
}
}
bool should_terminate_num_word(uint16_t keycode, const keyrecord_t *record) {
switch (keycode) {
// Keycodes which should not disable num word mode.
// We could probably be more brief with these definitions by using
// a couple more ranges, but I believe "explicit is better than
// implicit"
case KC_1 ... KC_0:
case KC_EQL:
case KC_SCLN:
case KC_MINS:
case KC_DOT:
// Numpad keycodes
case KC_P1 ... KC_P0:
case KC_PSLS ... KC_PPLS:
case KC_PDOT:
// Misc
case KC_UNDS:
case KC_BSPC:
return false;
default:
if (record->event.pressed) {
return true;
}
return false;
}
// Should be unreachable
return false;
}
bool process_record_num_word(uint16_t keycode, const keyrecord_t *record) {
// Handle the custom keycodes that go with this feature
if (keycode == NUMWORD) {
if (record->event.pressed) {
enable_num_word();
num_word_timer = timer_read();
return false;
}
else {
if (timer_elapsed(num_word_timer) > TAPPING_TERM) {
// If the user held the key longer than TAPPING_TERM,
// consider it a hold, and disable the behavior on
// key release.
disable_num_word();
return false;
}
}
}
// Other than the custom keycodes, nothing else in this feature will
// activate if the behavior is not on, so allow QMK to handle the
// event as usual
if (!is_num_word_on) return true;
// Nothing else acts on key release, either
if (!record->event.pressed) {
return true;
}
// Get the base keycode of a mod or layer tap key
switch (keycode) {
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
case QK_TAP_DANCE ... QK_TAP_DANCE_MAX:
// Earlier return if this has not been considered tapped yet
if (record->tap.count == 0)
return true;
keycode = keycode & 0xFF;
break;
default:
break;
}
if (should_terminate_num_word(keycode, record)) {
disable_num_word();
}
return true;
}

View File

@ -1,27 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include QMK_KEYBOARD_H
#include "rj_keycodes.h"
#include "rj_layers.h"
bool is_num_word_enabled(void);
void enable_num_word(void);
void disable_num_word(void);
void toggle_num_word(void);
bool process_record_num_word(uint16_t keycode, const keyrecord_t *record);

View File

@ -1,51 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Before you can compile with this feature, you'll need to manually
// create a file in this directory called "secret_definitions.h"
// containing the data to be added.
//
// Example implementation:
//
// #pragma once
// static const char * const secrets[] = {
// "secret1",
// "secret2",
// "secret3",
// "secret4"
// }
#include QMK_KEYBOARD_H
#include "replicaJunction.h"
#include "secrets.h"
#include "secret_definitions.h"
#ifndef MACRO_TIMER
# define MACRO_TIMER 5
#endif
bool process_record_secrets(uint16_t keycode, const keyrecord_t *record) {
switch (keycode) {
case K_SECR1 ... K_SECR4: // Secrets! Externally defined strings, not stored in repo
if (!record->event.pressed) {
clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
send_string_with_delay(secrets[keycode - K_SECR1], MACRO_TIMER);
}
return false;
}
return true;
}

View File

@ -1,30 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include QMK_KEYBOARD_H
// NOTE: In some implementations of the "secrets" functionality, the
// secrets.h file is the file that actually contains secret text.
//
// This is not the case in my implementation. That file is called
// "secret_definitions.h", and it's in a local .gitignore file so it
// does not get committed.
//
// The inclusion of this file is not an error, and there is no sensitive
// text here.
bool process_record_secrets(uint16_t keycode, const keyrecord_t *record);

View File

@ -1,52 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "super_alt_tab.h"
// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
bool is_alt_tab_active = false;
uint16_t alt_tab_timer = 0;
void matrix_scan_super_alt_tab(void) {
if (is_alt_tab_active) {
if (timer_elapsed(alt_tab_timer) > USER_SUPER_ALT_TAB_TIMEOUT) {
unregister_code(KC_LALT);
is_alt_tab_active = false;
}
}
}
bool process_record_super_alt_tab(uint16_t keycode, const keyrecord_t *record) {
if (keycode != SALTTAB) {
return true;
}
if (record->event.pressed) {
if (!is_alt_tab_active) {
is_alt_tab_active = true;
register_code(KC_LALT);
}
alt_tab_timer = timer_read();
register_code(KC_TAB);
}
else {
unregister_code(KC_TAB);
}
return false;
}

View File

@ -1,27 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include QMK_KEYBOARD_H
#include "rj_keycodes.h"
#ifndef USER_SUPER_ALT_TAB_TIMEOUT
# define USER_SUPER_ALT_TAB_TIMEOUT 500
#endif
void matrix_scan_super_alt_tab(void);
bool process_record_super_alt_tab(uint16_t keycode, const keyrecord_t *record);

View File

@ -1,85 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include QMK_KEYBOARD_H
// Transparent, but indicates that this key must be blocked (for example, a layer shift key)
#define ooooooo KC_TRNS
#define SFT_TAB LSFT(KC_TAB)
#define WIN_TAB LGUI(KC_TAB)
#define WIN_L LGUI(KC_L)
#define WIN_V LGUI(KC_V)
#define ALT_F4 LALT(KC_F4)
#define CTL_DEL LCTL_T(KC_DEL)
#define CTL_ESC CTL_T(KC_ESC)
#define ALT_ENT ALT_T(KC_ENT)
#define ALT_TAB ALT_T(KC_TAB)
#define OSM_LSF OSM(MOD_LSFT)
#define OSM_RSF OSM(MOD_RSFT)
// OS shortcuts (Windows)
#define OS_COPY LCTL(KC_C)
#define OS_PAST LCTL(KC_V)
#define OS_CUT LCTL(KC_X)
#define OS_UNDO LCTL(KC_Z)
#define OS_SALL LCTL(KC_A)
#define OS_FIND LCTL(KC_F)
// Home row modifiers
#define GUI_A LGUI_T(KC_A)
#define ALT_R LALT_T(KC_R)
#define SFT_S LSFT_T(KC_S)
#define CRT_T LCTL_T(KC_T) // we can't call this CTL_T because that name is taken!
#define CRT_N RCTL_T(KC_N)
#define SFT_E RSFT_T(KC_E)
#define ALT_I RALT_T(KC_I)
#define GUI_O RGUI_T(KC_O)
// Mouse keys
#define M_UP KC_MS_UP
#define M_DOWN KC_MS_DOWN
#define M_LEFT KC_MS_LEFT
#define M_RIGHT KC_MS_RIGHT
#define M_LCLIK KC_MS_BTN1
#define M_RCLIK KC_MS_BTN2
#define M_MCLIK KC_MS_BTN3
#define M_WHLUP KC_WH_U
#define M_WHLDN KC_WH_D
// Windows 10 shortcuts: change desktop to the left/right
#define DESKLFT LCTL(LGUI(KC_LEFT))
#define DESKRGT LCTL(LGUI(KC_RGHT))
// Application-specific shortcuts
// Search: defined in Everything Search Engine as the keypress to show/hide the window
#define SEARCH HYPR(KC_S)
// Microsoft PowerToys hotkeys
// https://github.com/microsoft/PowerToys
#define PTYRUN LALT(KC_SPC) // PowerToys Run
#define PTYZONE LGUI(KC_GRV) // PowerToys FancyZones
#define PTYCOLR LGUI(LSFT(KC_C)) // PowerToys ColorPicker

View File

@ -1,35 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "replicaJunction.h"
__attribute__ ((weak))
void matrix_scan_user_kb(void) { }
// Runs on every matrix scan. Be careful what goes here - you can really impact the
// responsiveness of your keyboard if you add too much in this function.
void matrix_scan_user(void) {
#ifdef USER_MOUSE_JIGGLE_ENABLE
matrix_scan_mouse_jiggle();
#endif
#ifdef USER_SUPER_ALT_TAB_ENABLE
matrix_scan_super_alt_tab();
#endif
matrix_scan_user_kb();
}

View File

@ -1,149 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "process_records.h"
uint8_t mod_state;
__attribute__ ((weak))
bool process_record_user_kb(uint16_t keycode, keyrecord_t *record) {
return true;
}
// Runs for each key down or up event.
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// Returning true here will cause QMK to continue handling the key normally.
// Returning false indicates that we've handled everything the keycode should do, and QMK
// should not continue handling the keypress.
//
// NOTE: There is also a process_record_kb function that can be defined in the keyboard-
// specific code. This allows the keyboard to have its own process_record function.
// This is supposed to be "higher" than the user function, meaning the kb function
// is shared for all keymaps for the keyboard.
//
// For this reason, I add my own function, called process_record_user_kb, and at the end
// of this function, I defer to that one if it exists.
// return process_record_user(keycode, record);
// Custom keycode / function handling, based on the core function
// process_record_quantum
// https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c
if (!(
#ifdef USER_CAPS_WORD_ENABLE
process_record_caps_word(keycode, record) &&
#endif
#ifdef USER_MOUSE_JIGGLE_ENABLE
process_record_mouse_jiggle(keycode, record) &&
#endif
#ifdef USER_NUM_WORD_ENABLE
process_record_num_word(keycode, record) &&
#endif
#ifdef USER_SECRETS_ENABLE
process_record_secrets(keycode, record) &&
#endif
#ifdef USER_SUPER_ALT_TAB_ENABLE
process_record_super_alt_tab(keycode, record) &&
#endif
true)) {
return false;
}
// Miscellaneous keycode handling
mod_state = get_mods();
switch(keycode)
{
case QK_MAKE: {
if (record->event.pressed)
SEND_STRING("qmk compile --keyboard " QMK_KEYBOARD " --keymap " QMK_KEYMAP);
return false;
}
case QK_FLSH: {
if (record->event.pressed) {
SEND_STRING("qmk flash --keyboard " QMK_KEYBOARD " --keymap " QMK_KEYMAP);
}
return false;
}
case QK_VERS: {
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE);
}
return false;
}
case PRG_EQ: {
if (record->event.pressed) {
SEND_STRING("==");
}
return false;
}
case PRG_NE: {
if (record->event.pressed) {
SEND_STRING("!=");
}
return false;
}
case PRG_GEQ: {
if (record->event.pressed) {
SEND_STRING(">=");
}
return false;
}
case PRG_LEQ: {
if (record->event.pressed) {
SEND_STRING("<=");
}
return false;
}
case PRG_ARR: {
if (record->event.pressed) {
SEND_STRING("=>");
}
return false;
}
case PS_ITEM: {
if (record->event.pressed) {
SEND_STRING("$_");
}
return false;
}
case FS_PIPE: {
if (record->event.pressed) {
SEND_STRING("|>");
}
return false;
}
case FS_ARR: {
if (record->event.pressed) {
SEND_STRING("->");
}
return false;
}
case SHEBANG: {
if (record->event.pressed) {
SEND_STRING("#!");
}
return false;
}
}
return process_record_user_kb(keycode, record);
}

View File

@ -1,21 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include QMK_KEYBOARD_H
#include "replicaJunction.h"
bool process_record_user_kb(uint16_t keycode, keyrecord_t *record);

View File

@ -1,93 +0,0 @@
replicaJunction QMK Userspace
=============================
# Overview
I alternate between a few keyboards, one of which is the 44-key Keyboardio Atreus. Small keyboards require a liberal use of layers. Even though larger keyboards don't rely on layers as heavily, my muscle memory adapted to my Atreus layout, so I've ended up building several of those features in my keymaps for larger boards as well.
The result, I believe, is a good compromise between ergonomics and ease of use.
The code in this userspace is designed to be very modular. I use a few different keyboards, and I'm constantly tweaking one or another, so I want the ability to add and remove features from the firmware at compile-time. While my endgame goal is to get all the layouts to be compatible, in practice, it's been years and I'm still not to that point...
Modular code also means that it should be easy to identify and adapt specific pieces to your own firmware.
## Keyboards and Keymaps
The following keyboards use the files in this userspace:
* [Atreus](../../keyboards/atreus/keymaps/replicaJunction/readme.md) (42-key)
* [Ergodox](../../layouts/community/ergodox/replicaJunction/readme.md)
* [Keyboardio Atreus](../../keyboards/keyboardio/atreus/keymaps/replicaJunction/readme.md) (44-key)
* [XD75](../../keyboards/xd75/keymaps/replicaJunction/readme.md)
# Features
* **Secrets**, as [explained by Drashna](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme_secrets.md)
* **CAPSWORD** and **NUMWORD**
* Mouse jiggler
* Super alt-tab
## Secrets
My implementation of the "secrets" concept is very similar to Drashna's, but I've chosen to allow most of the supporting code to be committed to the repo. The only thing missing is a file called `secret_definitions.h`, which contains the actual text contained in those macros.
To use my implementation, create a file of that name in the same directory. Make sure you've got a `.gitignore` file in place, and add these contents to the definitions file:
```c
#pragma once
static const char * const secrets[] = {
"secret1",
"secret2",
"secret3",
"secret4"
}
```
Change the quoted text to the text you'd like and you're golden. If you need more (or fewer) items, you'll probably need to adjust the code in `secrets.c` as well, since it looks for up to four items in a switch case.
## CAPSWORD and NUMWORD
The concept here is simple: more often than you'd think, you need to type a single word in ALL CAPS. An easy example for me, as a programmer, is a constant value; in most programming languages, constants are typed in all caps by convention.
You typically have a few choices, but each one comes with a drawback. Here are the options I'm aware of:
* Use proper typing technique and alternate which hand holds Shift for each keypress
* This can often end up requiring you to switch / re-press Shift again and again, making this a tedious process
* Hold a single Shift key down
* This can lead to uncomfortable finger gymnastics
* Hit the Caps Lock key, then hit it again when you're done
* Requires you to remember to hit it again, meaning a higher cognitive load
* In some layouts for smaller keyboards, Caps Lock is not easily accessible (sometimes not mapped at all)
The solution to this problem is CAPSWORD. When enabled, it activates Caps Lock and begins running an additional callback on each keypress. If the keypress is an alphanumeric key or one of a specific few symbols (such as the underscore), nothing happens. Otherwise, before processing the keypress, Caps Lock is disabled again.
NUMWORD is a similar concept, but has a slightly more elaborate implementation. There's a bit of extra logic in the NUMWORD code that allows the keycode to act as a tap/hold key as well. Tapping enables NUMWORD while number keys are in use, while holding the key enables a number layer for the duration of the key hold and disables it again afterwards.
**Note:** The implementation of NUMWORD requires that the keyboard's layer definitions be accessible in a header file. In my case, since I use a fairly standard set of layers, I've declared it in my userspace.
## Mouse Jiggler
This adds a keycode that will move the mouse cursor on each matrix scan. Used to prevent the screen from locking if you're temporarily doing something else (working on a different machine, reading / writing, etc.).
When you press the keycode, the keyboard will write the text "Mouse jiggler enabled" to signify that the behavior is active. I suggest opening a Notepad window before pressing the key.
Pressing any key will automatically disable the feature again. This is because it causes a huge hit to the reliability and performance of the keyboard while it's active (adding stuff to every matrix scan will do that). I kept forgetting to turn it off before trying to use the keyboard again, so I decided to make it automatically disable itself.
Enable this by setting `USER_MOUSE_JIGGLE_ENABLE = yes` in your `rules.mk` file. The feature also depends on the Mouse Keys feature, so ensure you don't disable `MOUSEKEY_ENABLE`.
## Super Alt-Tab
Taken [straight out of the QMK documentation](https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab), this is an easy way to shift between a couple different windows. I use it with a very low interval when I'm alternating back and forth between two known windows with no real need for the visual feedback and thought. If you want to be able to browse the open windows before the function releases Alt, I'd suggest raising `USER_SUPER_ALT_TAB_TIMEOUT` to a higher value.
# Credits
I'm absolutely sure I've missed a few sources here. If you see something in my code that you think is yours and isn't credited here, I sincerely apologize.
[bpruitt-goddard](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/bpruitt-goddard/readme.md)
* Dynamic macro tap-dance (no longer used, but I did use this for a while)
[Drashna](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme.md)
* Secrets concept and basic implementation
* "Wrappers" concept (no longer used, but I did use this for a while)
[Treeman](https://github.com/treeman/qmk_firmware/blob/master/keyboards/kyria/keymaps/treeman)
* CAPSWORD and NUMBERWORD concept
* I re-implented some of the code based on my own prefences, but I did use some implementation code from here
* [Treeman's blog post](https://www.jonashietala.se/blog/2021/06/03/the-t-34-keyboard-layout/) provides more context on these features, and is a great read
[QMK issue #452](https://github.com/qmk/qmk_firmware/issues/452)
* Helped clarify a good organizational structure for the individual features in this userspace

View File

@ -1,25 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "replicaJunction.h"
__attribute__ ((weak))
void keyboard_post_init_user_kb(void) { }
void keyboard_post_init_user(void) {
keyboard_post_init_user_kb();
}

View File

@ -1,42 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include QMK_KEYBOARD_H
#include "rj_keycodes.h"
#include "rj_layers.h"
#include "keycode_aliases.h"
#include "version.h"
#ifdef USER_CAPS_WORD_ENABLE
# include "features/caps_word.h"
#endif
#ifdef USER_MOUSE_JIGGLE_ENABLE
# include "features/mouse_jiggle.h"
#endif
#ifdef USER_NUM_WORD_ENABLE
# include "features/num_word.h"
#endif
#ifdef USER_SECRETS_ENABLE
# include "features/secrets.h"
#endif
#ifdef USER_SUPER_ALT_TAB_ENABLE
# include "features/super_alt_tab.h"
#endif

View File

@ -1,63 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include QMK_KEYBOARD_H
// Custom keycodes and macros
enum userspace_custom_keycodes {
QK_MAKE = SAFE_RANGE, // QMK make command
QK_FLSH, // QMK flash command
QK_VERS, // QMK version
// Programming macros
PRG_EQ, // ==
PRG_NE, // !=
PRG_GEQ, // >=
PRG_LEQ, // <=
PRG_ARR, // =>
PS_ITEM, // $_ (PowerShell - $PSItem variable)
FS_PIPE, // |> (F# pipe operator)
FS_ARR, // -> (F# lambda / pattern matching)
SHEBANG, // #!
// USER_CAPS_WORD_ENABLE
CAPWORD,
#ifdef USER_NUM_WORD_ENABLE
NUMWORD,
#endif
// USER_ENABLE_CUSTOM_SHIFT_CODES
// Custom characters that send different symbols than usual when shifted
KCC_COM, // , or !
KCC_DOT, // . or @
KCC_QUO, // ' or ~
// USER_MOUSE_JIGGLE_ENABLE
MS_JIGL,
// USER_ENABLE_SUPER_ALT_TAB
SALTTAB,
// USER_ENABLE_SECRETS
K_SECR1,
K_SECR2,
K_SECR3,
K_SECR4,
DYNAMIC_MACRO_RANGE
};

View File

@ -1,40 +0,0 @@
/* Copyright 2021 Joshua T.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
enum rj_layers {
L_BASE,
#ifdef USER_INCLUDE_QWERTY
L_QWERTY,
#endif
#ifdef USER_INCLUDE_GAMING_LAYER
L_GAMING,
#endif
L_NUMBERS,
L_SYMBOLS,
L_NAVIGATION,
L_FN,
#ifdef USER_INCLUDE_MACRO_LAYER
L_MACROS,
#endif
_LAYER_SAFE_RANGE
};

Some files were not shown because too many files have changed in this diff Show More