diff options
53 files changed, 2769 insertions, 157 deletions
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index b4e32f981b..309b9eeda1 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -36,7 +36,7 @@ jobs: - name: Get changed files id: file_changes - uses: tj-actions/changed-files@v45 + uses: tj-actions/changed-files@v46 with: use_rest_api: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 829ca6392c..581fe02156 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,7 +27,7 @@ jobs: - name: Get changed files id: file_changes - uses: tj-actions/changed-files@v45 + uses: tj-actions/changed-files@v46 with: use_rest_api: true diff --git a/builddefs/generic_features.mk b/builddefs/generic_features.mk index f14f440877..015a804d91 100644 --- a/builddefs/generic_features.mk +++ b/builddefs/generic_features.mk @@ -34,6 +34,7 @@ GENERIC_FEATURES = \ DYNAMIC_TAPPING_TERM \ GRAVE_ESC \ HAPTIC \ + KEYCODE_STRING \ KEY_LOCK \ KEY_OVERRIDE \ LAYER_LOCK \ diff --git a/data/mappings/keyboard_aliases.hjson b/data/mappings/keyboard_aliases.hjson index b601a42761..c8d9bff052 100644 --- a/data/mappings/keyboard_aliases.hjson +++ b/data/mappings/keyboard_aliases.hjson @@ -581,6 +581,9 @@ "ploopyco/trackball": { "target": "ploopyco/trackball/rev1_005" }, + "plywrks/ply8x": { + "target": "plywrks/ply8x/solder" + }, "polilla": { "target": "polilla/rev1" }, diff --git a/docs/cli.md b/docs/cli.md index 7d4c10cedd..36983d5e00 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -6,7 +6,7 @@ The QMK CLI (command line interface) makes building and working with QMK keyboar ### Requirements {#requirements} -QMK requires Python 3.7 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI. +QMK requires Python 3.9 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI. ### Install Using Homebrew (macOS, some Linux) {#install-using-homebrew} @@ -20,7 +20,7 @@ qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build ### Install Using pip {#install-using-easy_install-or-pip} -If your system is not listed above you can install QMK manually. First ensure that you have Python 3.7 (or later) installed and have installed pip. Then install QMK with this command: +If your system is not listed above you can install QMK manually. First ensure that you have Python 3.9 (or later) installed and have installed pip. Then install QMK with this command: ``` python3 -m pip install qmk diff --git a/docs/cli_development.md b/docs/cli_development.md index 2e74220d4b..74ac53d327 100644 --- a/docs/cli_development.md +++ b/docs/cli_development.md @@ -44,7 +44,7 @@ def hello(cli): First we import the `cli` object from `milc`. This is how we interact with the user and control the script's behavior. We use `@cli.argument()` to define a command line flag, `--name`. This also creates a configuration variable named `hello.name` (and the corresponding `user.name`) which the user can set so they don't have to specify the argument. The `cli.subcommand()` decorator designates this function as a subcommand. The name of the subcommand will be taken from the name of the function. -Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.7/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator. +Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.9/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator. # User Interaction @@ -56,13 +56,13 @@ There are two main methods for outputting text in a subcommand- `cli.log` and `c You can use special tokens to colorize your text, to make it easier to understand the output of your program. See [Colorizing Text](#colorizing-text) below. -Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.7/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example. +Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.9/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example. You should never use the format operator (`%`) directly, always pass values as arguments. ### Logging (`cli.log`) -The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.7/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong. +The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.9/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong. The default log level is `INFO`. If the user runs `qmk -v <subcommand>` the default log level will be set to `DEBUG`. diff --git a/docs/coding_conventions_python.md b/docs/coding_conventions_python.md index 502ee9102e..b25466bf82 100644 --- a/docs/coding_conventions_python.md +++ b/docs/coding_conventions_python.md @@ -2,7 +2,7 @@ Most of our style follows PEP8 with some local modifications to make things less nit-picky. -* We target Python 3.7 for compatibility with all supported platforms. +* We target Python 3.9 for compatibility with all supported platforms. * We indent using four (4) spaces (soft tabs) * We encourage liberal use of comments * Think of them as a story describing the feature @@ -317,7 +317,7 @@ At the time of this writing our tests are not very comprehensive. Looking at the ## Integration Tests -Integration tests can be found in `lib/python/qmk/tests/test_cli_commands.py`. This is where CLI commands are actually run and their overall behavior is verified. We use [`subprocess`](https://docs.python.org/3.7/library/subprocess.html#module-subprocess) to launch each CLI command and a combination of checking output and returncode to determine if the right thing happened. +Integration tests can be found in `lib/python/qmk/tests/test_cli_commands.py`. This is where CLI commands are actually run and their overall behavior is verified. We use [`subprocess`](https://docs.python.org/3.9/library/subprocess.html#module-subprocess) to launch each CLI command and a combination of checking output and returncode to determine if the right thing happened. ## Unit Tests diff --git a/docs/faq_debug.md b/docs/faq_debug.md index 35a4160e27..269049afb8 100644 --- a/docs/faq_debug.md +++ b/docs/faq_debug.md @@ -77,6 +77,17 @@ KL: kc: 172, col: 2, row: 0, pressed: 1, time: 16303, int: 0, count: 0 KL: kc: 172, col: 2, row: 0, pressed: 0, time: 16411, int: 0, count: 0 ``` +### Which keycode is this keypress? + +Keycodes are logged in the example above as numerical codes, which may be difficult to interpret. For more readable logging, add `KEYCODE_STRING_ENABLE = yes` in your `rules.mk` and use `get_keycode_string(kc)`. For example: + +```c +uprintf("kc: %s\n", get_keycode_string(keycode)); +``` + +This logs the keycode as a human-readable string like "`LT(2,KC_D)`" rather than a numerical code like "`0x4207`." See the [Keycode String](unit_testing#keycode-string) section of the Unit Testing page for more information. + + ### How long did it take to scan for a keypress? When testing performance issues, it can be useful to know the frequency at which the switch matrix is being scanned. To enable logging for this scenario, add the following code to your keymaps `config.h` diff --git a/docs/features/split_keyboard.md b/docs/features/split_keyboard.md index 49582c3946..fbf5d3d3e2 100644 --- a/docs/features/split_keyboard.md +++ b/docs/features/split_keyboard.md @@ -444,7 +444,7 @@ This setting implies that `RGBLIGHT_SPLIT` is enabled, and will forcibly enable #define SPLIT_USB_DETECT ``` -Enabling this option changes the startup behavior to listen for an active USB communication to delegate which part is master and which is slave. With this option enabled and theres's USB communication, then that half assumes it is the master, otherwise it assumes it is the slave. +Enabling this option changes the startup behavior to listen for an active USB communication to delegate which part is master and which is slave. With this option enabled and active USB communication, then that half assumes it is the master, otherwise it assumes it is the slave. Without this option, the master is the half that can detect voltage on the physical USB connection (VBUS detection). diff --git a/docs/license_violations.md b/docs/license_violations.md index 81a6ba517f..cf7850effc 100644 --- a/docs/license_violations.md +++ b/docs/license_violations.md @@ -19,9 +19,13 @@ If you own a board from one of the following vendors already, consider asking th | Vendor | Reason | |------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Ajazz | Selling tri-mode boards based on QMK without sources. | +| Alpaca / Apos | Selling wireless boards with "open" source code, but linking against closed-source wireless libraries. Crippled source code already unknowingly merged to QMK. | +| Attack Shark | Selling tri-mode boards based on QMK without sources. (Clones of Ajazz?) | | BBB Keyboard | Selling tri-mode boards based on QMK without sources, attempted upstreaming crippled firmware without wireless. | | Chosfox | Selling L75 wired/wireless boards based on QMK without sources, just `via.json` provided. Raised on discord over multiple weeks without response. | | CIDOO | Selling wired boards based on QMK without sources, just `via.json` provided. | +| ColorReco | Selling tri-mode boards based on QMK without sources. | | Darmoshark | Selling wired boards based on QMK without sources, just `via.json` provided. | | Epomaker | Lots of historical keyboards with `via.json` but no corresponding sources. Wireless code for a small handful provided, pending core cleanup for QMK upstreaming. Most other boards have source nowhere to be seen. | | Ergokbd (IFKB) | At least their crkbd clone ships with QMK+Vial, seemingly refuses to disclose sources despite multiple customers requesting them. | @@ -36,6 +40,7 @@ If you own a board from one of the following vendors already, consider asking th | pressplayid | Selling wired and tri-mode boards based on QMK without sources, just `via.json` provided | | qwertykeys | Selling wired and tri-mode boards based on QMK without sources, just `via.json` provided. | | Redragon | Selling tri-mode boards based on QMK without sources, attempted upstreaming crippled firmware without wireless. | +| Riccks | Selling tri-mode boards based on QMK without sources. | | Royal Kludge | PRs for fake boards in order to attain VIA compatibility identified. Lots of other keyboards with `via.json` but no corresponding sources, attempted upstreaming crippled firmware without wireless. Wireless code for some provided, pending core cleanup for QMK upstreaming. PRs including different manufacturer names as well. | | Shenzhen Hangsheng | PR submissions with crippled firmware, debating with maintainers about wireless despite marketing material clearly stating tri-mode. | | Tacworks | Selling tri-mode boards based on QMK, crippled firmware already merged into QMK without wireless without QMK team realising. | @@ -45,6 +50,7 @@ If you own a board from one of the following vendors already, consider asking th | Womier | Selling tri-mode boards based on QMK without sources, attempted upstreaming crippled firmware without wireless. | | Wuque Studio | Selling wired and tri-mode boards based on QMK without sources, just `via.json` provided. | | XVX | Ambiguity on PRs -- marketing says wireless, PR author said wired-only. Seemingly intentionally deceptive. | +| Yunzii | Selling tri-mode boards based on QMK without sources, just `via.json` provided. | | Zuoya | Selling tri-mode boards based on QMK without sources, just `via.json` provided. | ::: danger Violations diff --git a/docs/unit_testing.md b/docs/unit_testing.md index 3e4c914bf1..aec4ec8334 100644 --- a/docs/unit_testing.md +++ b/docs/unit_testing.md @@ -58,6 +58,34 @@ It's not yet possible to do a full integration test, where you would compile the In that model you would emulate the input, and expect a certain output from the emulated keyboard. +# Keycode String {#keycode-string} + +It's much nicer to read keycodes as names like "`LT(2,KC_D)`" than numerical codes like "`0x4207`." To convert keycodes to human-readable strings, add `KEYCODE_STRING_ENABLE = yes` to the `rules.mk` file, then use the `get_keycode_string(kc)` function to convert a given 16-bit keycode to a string. + +```c +const char *key_name = get_keycode_string(keycode); +dprintf("kc: %s\n", key_name); +``` + +The stringified keycode may then be logged to console output with `dprintf()` or elsewhere. + +::: warning +Use the result of `get_keycode_string()` immediately. Subsequent invocations reuse the same static buffer and overwrite the previous contents. +::: + +Many common QMK keycodes are recognized by `get_keycode_string()`, but not all. These include some common basic keycodes, layer switch keycodes, mod-taps, one-shot keycodes, tap dance keycodes, and Unicode keycodes. As a fallback, an unrecognized keycode is written as a hex number. + +Optionally, `KEYCODE_STRING_NAMES_USER` may be defined to add names for additional keycodes. For example, supposing keymap.c defines `MYMACRO1` and `MYMACRO2` as custom keycodes, the following adds their names: + +```c +KEYCODE_STRING_NAMES_USER( + KEYCODE_STRING_NAME(MYMACRO1), + KEYCODE_STRING_NAME(MYMACRO2), +); +``` + +Similarly, `KEYCODE_STRING_NAMES_KB` may be defined to add names at the keyboard level. + # Tracing Variables {#tracing-variables} Sometimes you might wonder why a variable gets changed and where, and this can be quite tricky to track down without having a debugger. It's of course possible to manually add print statements to track it, but you can also enable the variable trace feature. This works for both variables that are changed by the code, and when the variable is changed by some memory corruption. diff --git a/keyboards/5keys/keyboard.json b/keyboards/5keys/keyboard.json new file mode 100644 index 0000000000..7a40d1014d --- /dev/null +++ b/keyboards/5keys/keyboard.json @@ -0,0 +1,34 @@ +{ + "manufacturer": "mikiya418", + "keyboard_name": "5keys", + "maintainer": "mikiya418", + "development_board": "promicro", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": false + }, + "matrix_pins": { + "direct": [ + ["F4","F5","F6","F7","B1"] + ] + }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0001", + "vid": "0x4D4B" + }, + "layouts": { + "LAYOUT": { + "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":[0,4], "x":4, "y":0} + ] + } + } +} diff --git a/keyboards/5keys/keymaps/default/keymap.c b/keyboards/5keys/keymaps/default/keymap.c new file mode 100644 index 0000000000..878ae4286b --- /dev/null +++ b/keyboards/5keys/keymaps/default/keymap.c @@ -0,0 +1,21 @@ +/* Copylight 2024 mikiya418. + * + * 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 3 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 <https://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_WBAK, KC_WFWD, LSG_T(KC_S), G(KC_L), MO(1) + ) +}; diff --git a/keyboards/5keys/readme.md b/keyboards/5keys/readme.md new file mode 100644 index 0000000000..e14792d82b --- /dev/null +++ b/keyboards/5keys/readme.md @@ -0,0 +1,27 @@ +# 5keys + + + +This keyboard is a macro keyboard with five keys. + +* Keyboard Maintainer: [mikiya418](https://github.com/mikiya418) +* Hardware Supported: 5keys PCBs, Pro Micro +* Hardware Availability: [Thingiverse](https://www.thingiverse.com/thing:6834908) + +Make example for this keyboard (after setting up your build environment): + + make 5keys:default + +Flashing example for this keyboard: + + make 5keys:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/adafruit/pico_pad/keyboard.json b/keyboards/adafruit/pico_pad/keyboard.json new file mode 100644 index 0000000000..aacb7a9c00 --- /dev/null +++ b/keyboards/adafruit/pico_pad/keyboard.json @@ -0,0 +1,53 @@ +{ + "manufacturer": "Raspberry Pi", + "keyboard_name": "DirectPins Pico Pad 21 keys RP2040", + "maintainer": "icyavocado", + "bootloader": "rp2040", + "usb": { + "vid": "0x2326", + "pid": "0xFEED", + "device_version": "0.0.1" + }, + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true + }, + "processor": "RP2040", + "matrix_pins": { + "direct": [ + [ "GP0", "GP1", "GP2", "GP3", "GP4", "GP5", "GP6" ], + [ "GP7", "GP8", "GP9", "GP10", "GP11", "GP12", "GP13"], + [ "GP14", "GP16", "GP17", "GP18", "GP19", "GP20", "GP21"] + ] + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "GP0", "x": 0, "y": 0, "matrix": [0, 0]}, + {"label": "GP1", "x": 0, "y": 1, "matrix": [0, 1]}, + {"label": "GP2", "x": 0, "y": 2, "matrix": [0, 2]}, + {"label": "GP3", "x": 0, "y": 3, "matrix": [0, 3]}, + {"label": "GP4", "x": 0, "y": 4, "matrix": [0, 4]}, + {"label": "GP5", "x": 0, "y": 5, "matrix": [0, 5]}, + {"label": "GP6", "x": 0, "y": 6, "matrix": [0, 6]}, + + {"label": "GP7", "x": 1, "y": 0, "matrix": [1, 0]}, + {"label": "GP8", "x": 1, "y": 1, "matrix": [1, 1]}, + {"label": "GP9", "x": 1, "y": 2, "matrix": [1, 2]}, + {"label": "GP10", "x": 1, "y": 3, "matrix": [1, 3]}, + {"label": "GP11", "x": 1, "y": 4, "matrix": [1, 4]}, + {"label": "GP12", "x": 1, "y": 5, "matrix": [1, 5]}, + {"label": "GP13", "x": 1, "y": 6, "matrix": [1, 6]}, + + {"label": "GP14", "x": 2, "y": 0, "matrix": [2, 0]}, + {"label": "GP16", "x": 2, "y": 1, "matrix": [2, 1]}, + {"label": "GP17", "x": 2, "y": 2, "matrix": [2, 2]}, + {"label": "GP18", "x": 2, "y": 3, "matrix": [2, 3]}, + {"label": "GP19", "x": 2, "y": 4, "matrix": [2, 4]}, + {"label": "GP20", "x": 2, "y": 5, "matrix": [2, 5]}, + {"label": "GP21", "x": 2, "y": 6, "matrix": [2, 6]} + ] + } + } +} diff --git a/keyboards/adafruit/pico_pad/keymaps/default/keymap.json b/keyboards/adafruit/pico_pad/keymaps/default/keymap.json new file mode 100644 index 0000000000..33e2979a09 --- /dev/null +++ b/keyboards/adafruit/pico_pad/keymaps/default/keymap.json @@ -0,0 +1,12 @@ +{ + "keyboard": "adafruit/pico_pad", + "keymap": "default", + "layout": "LAYOUT", + "layers": [ + [ + "KC_A", "KC_B", "KC_C", "KC_D", "KC_E", "KC_F", "KC_G", + "KC_H", "KC_I", "KC_J", "KC_K", "KC_L", "KC_M", "KC_N", + "KC_O", "KC_P", "KC_Q", "KC_R", "KC_S", "KC_T", "KC_U" + ] + ] +} diff --git a/keyboards/adafruit/pico_pad/readme.md b/keyboards/adafruit/pico_pad/readme.md new file mode 100644 index 0000000000..4a834fbf4d --- /dev/null +++ b/keyboards/adafruit/pico_pad/readme.md @@ -0,0 +1,25 @@ +# PICO PAD + + + +A RP2040 powered direct pins QMK keyboard in 3x7 layout. + +A guide can be found here: [Pico Mechanical Keyboard](https://learn.adafruit.com/diy-pico-mechanical-keyboard-with-fritzing-circuitpython/overview) + +* Keyboard Maintainer: [IcyAvocado](https://github.com/icyavocado) +* Hardware Supported: [Pico 1 Microcontrollers - RP2040](https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html#pico-1-family) +* Hardware Availability: [The PiHut](https://thepihut.com/products/raspberry-pi-pico) | [Adafruit Parts](https://learn.adafruit.com/diy-pico-mechanical-keyboard-with-fritzing-circuitpython/overview) + +Make example for this board (after setting up your build environment): + +```sh +qmk compile -kb adafruit/pico_pad -km default +``` + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader: +* **Physical reset button**: Briefly press the reset button on the left of the PCB - some may have pads you must short instead +* **Boot button**: Press and hold the BOOTSEL button on the pico when powered on diff --git a/keyboards/cannonkeys/cerberus/hotswap/keymaps/default/keymap.c b/keyboards/cannonkeys/cerberus/hotswap/keymaps/default/keymap.c index 865dbff400..779070197a 100644 --- a/keyboards/cannonkeys/cerberus/hotswap/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/cerberus/hotswap/keymaps/default/keymap.c @@ -12,8 +12,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, 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_GRV, 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_LSFT, MO(1), KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LGUI, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [_FN1] = LAYOUT_all( diff --git a/keyboards/cannonkeys/cerberus/solderable/keymaps/default/keymap.c b/keyboards/cannonkeys/cerberus/solderable/keymaps/default/keymap.c index 2b87af0e99..782e9a138f 100644 --- a/keyboards/cannonkeys/cerberus/solderable/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/cerberus/solderable/keymaps/default/keymap.c @@ -11,8 +11,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, 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_GRV, 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_NUHS, KC_ENT, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LGUI, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [_FN1] = LAYOUT_all( diff --git a/keyboards/ducky/one2mini/1861st/keyboard.json b/keyboards/ducky/one2mini/1861st/keyboard.json index a39945d68c..e1ab218846 100644 --- a/keyboards/ducky/one2mini/1861st/keyboard.json +++ b/keyboards/ducky/one2mini/1861st/keyboard.json @@ -235,6 +235,75 @@ {"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25}, {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} ] + }, + "LAYOUT_60_ansi_tsangan": { + "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": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + {"matrix": [1, 6], "x": 6.5, "y": 1}, + {"matrix": [1, 7], "x": 7.5, "y": 1}, + {"matrix": [1, 8], "x": 8.5, "y": 1}, + {"matrix": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + {"matrix": [2, 6], "x": 6.75, "y": 2}, + {"matrix": [2, 7], "x": 7.75, "y": 2}, + {"matrix": [2, 8], "x": 8.75, "y": 2}, + {"matrix": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 2], "x": 2.25, "y": 3}, + {"matrix": [3, 3], "x": 3.25, "y": 3}, + {"matrix": [3, 4], "x": 4.25, "y": 3}, + {"matrix": [3, 5], "x": 5.25, "y": 3}, + {"matrix": [3, 6], "x": 6.25, "y": 3}, + {"matrix": [3, 7], "x": 7.25, "y": 3}, + {"matrix": [3, 8], "x": 8.25, "y": 3}, + {"matrix": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 12], "x": 14, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 5], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 12], "x": 12.5, "y": 4}, + {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] } } } diff --git a/keyboards/ducky/one2mini/keymaps/ansi_tsangan/keymap.c b/keyboards/ducky/one2mini/keymaps/ansi_tsangan/keymap.c new file mode 100644 index 0000000000..259df16ab1 --- /dev/null +++ b/keyboards/ducky/one2mini/keymaps/ansi_tsangan/keymap.c @@ -0,0 +1,70 @@ +/* Copyright 2019 /u/KeepItUnder + * + * 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 + +// LAYERS +enum Layer { + _QWERTY = 0, // Standard QWERTY layer + _FUNCTION, // Function key layer + _COLOUR // RGB key layer +}; +#define _QW _QWERTY +#define _FN _FUNCTION +#define _CLR _COLOUR + + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────────┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴──────┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬────┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ Fn │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴───┴───┼───┴┬────┬┴────┤ + * │Ctrl│GUI │Alt │ │Alt │GUI │Ctrl │ + * └────┴────┴────┴─────────────────────────────┴────┴────┴─────┘ + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_60_ansi_tsangan( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 + QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + [_FUNCTION] = LAYOUT_60_ansi_tsangan( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, KC_INS, _______, KC_UP, KC_PAUS, KC_PGUP, KC_HOME, KC_PSCR, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, KC_SCRL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_END, KC_ENT, + _______, _______, KC_APP, _______, _______, _______, KC_CALC, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, KC_APP, MO(_CLR), _______, KC_APP, _______, _______ + ), + + [_COLOUR] = LAYOUT_60_ansi_tsangan( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, RM_NEXT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RM_HUEU, RM_SATU, RM_VALU, RM_SPDU, _______, _______, _______, _______, _______, _______, _______, + _______, RM_HUED, RM_SATD, RM_VALD, RM_SPDD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RM_TOGG, _______, _______, _______ + ), +}; diff --git a/keyboards/handwired/daskeyboard/daskeyboard4/keyboard.json b/keyboards/handwired/daskeyboard/daskeyboard4/keyboard.json index 8308506512..d40ef0210b 100644 --- a/keyboards/handwired/daskeyboard/daskeyboard4/keyboard.json +++ b/keyboards/handwired/daskeyboard/daskeyboard4/keyboard.json @@ -43,114 +43,233 @@ "tapping": { "toggle": 2 }, + "community_layouts": ["fullsize_ansi", "fullsize_iso"], "layouts": { + "LAYOUT_fullsize_ansi": { + "layout": [ + {"matrix": [5, 16], "x": 0, "y": 0}, + {"matrix": [2, 4], "x": 2, "y": 0}, + {"matrix": [2, 5], "x": 3, "y": 0}, + {"matrix": [3, 5], "x": 4, "y": 0}, + {"matrix": [5, 5], "x": 5, "y": 0}, + {"matrix": [0, 1], "x": 6.5, "y": 0}, + {"matrix": [5, 8], "x": 7.5, "y": 0}, + {"matrix": [3, 3], "x": 8.5, "y": 0}, + {"matrix": [2, 3], "x": 9.5, "y": 0}, + {"matrix": [2, 2], "x": 11, "y": 0}, + {"matrix": [0, 2], "x": 12, "y": 0}, + {"matrix": [5, 2], "x": 13, "y": 0}, + {"matrix": [6, 2], "x": 14, "y": 0}, + {"matrix": [0, 0], "x": 15.25, "y": 0}, + {"matrix": [1, 0], "x": 16.25, "y": 0}, + {"matrix": [1, 1], "x": 17.25, "y": 0}, + + {"matrix": [2, 16], "x": 0, "y": 1.25}, + {"matrix": [0, 16], "x": 1, "y": 1.25}, + {"matrix": [0, 4], "x": 2, "y": 1.25}, + {"matrix": [0, 5], "x": 3, "y": 1.25}, + {"matrix": [0, 6], "x": 4, "y": 1.25}, + {"matrix": [2, 6], "x": 5, "y": 1.25}, + {"matrix": [2, 7], "x": 6, "y": 1.25}, + {"matrix": [0, 7], "x": 7, "y": 1.25}, + {"matrix": [0, 8], "x": 8, "y": 1.25}, + {"matrix": [0, 3], "x": 9, "y": 1.25}, + {"matrix": [0, 9], "x": 10, "y": 1.25}, + {"matrix": [2, 9], "x": 11, "y": 1.25}, + {"matrix": [2, 8], "x": 12, "y": 1.25}, + {"matrix": [3, 2], "w": 2, "x": 13, "y": 1.25}, + {"matrix": [2, 11], "x": 15.25, "y": 1.25}, + {"matrix": [2, 15], "x": 16.25, "y": 1.25}, + {"matrix": [2, 14], "x": 17.25, "y": 1.25}, + {"matrix": [4, 10], "x": 18.5, "y": 1.25}, + {"matrix": [4, 11], "x": 19.5, "y": 1.25}, + {"matrix": [4, 14], "x": 20.5, "y": 1.25}, + {"matrix": [6, 14], "x": 21.5, "y": 1.25}, + + {"matrix": [3, 16], "w": 1.5, "x": 0, "y": 2.25}, + {"matrix": [1, 16], "x": 1.5, "y": 2.25}, + {"matrix": [1, 4], "x": 2.5, "y": 2.25}, + {"matrix": [1, 5], "x": 3.5, "y": 2.25}, + {"matrix": [1, 6], "x": 4.5, "y": 2.25}, + {"matrix": [3, 6], "x": 5.5, "y": 2.25}, + {"matrix": [3, 7], "x": 6.5, "y": 2.25}, + {"matrix": [1, 7], "x": 7.5, "y": 2.25}, + {"matrix": [1, 8], "x": 8.5, "y": 2.25}, + {"matrix": [1, 3], "x": 9.5, "y": 2.25}, + {"matrix": [1, 9], "x": 10.5, "y": 2.25}, + {"matrix": [3, 9], "x": 11.5, "y": 2.25}, + {"matrix": [3, 8], "x": 12.5, "y": 2.25}, + {"matrix": [7, 2], "x": 13.5, "y": 2.25, "w": 1.5}, + {"matrix": [2, 10], "x": 15.25, "y": 2.25}, + {"matrix": [0, 15], "x": 16.25, "y": 2.25}, + {"matrix": [0, 14], "x": 17.25, "y": 2.25}, + {"matrix": [1, 10], "x": 18.5, "y": 2.25}, + {"matrix": [1, 11], "x": 19.5, "y": 2.25}, + {"matrix": [1, 14], "x": 20.5, "y": 2.25}, + {"matrix": [1, 15], "x": 21.5, "y": 2.25, "h": 2}, + + {"matrix": [3, 4], "w": 1.75, "x": 0, "y": 3.25}, + {"matrix": [7, 16], "x": 1.75, "y": 3.25}, + {"matrix": [7, 4], "x": 2.75, "y": 3.25}, + {"matrix": [7, 5], "x": 3.75, "y": 3.25}, + {"matrix": [7, 6], "x": 4.75, "y": 3.25}, + {"matrix": [5, 6], "x": 5.75, "y": 3.25}, + {"matrix": [5, 7], "x": 6.75, "y": 3.25}, + {"matrix": [7, 7], "x": 7.75, "y": 3.25}, + {"matrix": [7, 8], "x": 8.75, "y": 3.25}, + {"matrix": [7, 3], "x": 9.75, "y": 3.25}, + {"matrix": [7, 9], "x": 10.75, "y": 3.25}, + {"matrix": [5, 9], "x": 11.75, "y": 3.25}, + {"matrix": [4, 2], "w": 2.25, "x": 12.75, "y": 3.25}, + {"matrix": [3, 10], "x": 18.5, "y": 3.25}, + {"matrix": [3, 11], "x": 19.5, "y": 3.25}, + {"matrix": [3, 14], "x": 20.5, "y": 3.25}, + + {"matrix": [3, 13], "w": 2.25, "x": 0, "y": 4.25}, + {"matrix": [4, 16], "x": 2.25, "y": 4.25}, + {"matrix": [4, 4], "x": 3.25, "y": 4.25}, + {"matrix": [4, 5], "x": 4.25, "y": 4.25}, + {"matrix": [4, 6], "x": 5.25, "y": 4.25}, + {"matrix": [6, 6], "x": 6.25, "y": 4.25}, + {"matrix": [6, 7], "x": 7.25, "y": 4.25}, + {"matrix": [4, 7], "x": 8.25, "y": 4.25}, + {"matrix": [4, 8], "x": 9.25, "y": 4.25}, + {"matrix": [4, 3], "x": 10.25, "y": 4.25}, + {"matrix": [6, 9], "x": 11.25, "y": 4.25}, + {"matrix": [7, 13], "w": 2.75, "x": 12.25, "y": 4.25}, + {"matrix": [5, 15], "x": 16.25, "y": 4.25}, + {"matrix": [7, 10], "x": 18.5, "y": 4.25}, + {"matrix": [7, 11], "x": 19.5, "y": 4.25}, + {"matrix": [7, 14], "x": 20.5, "y": 4.25}, + {"matrix": [7, 15], "x": 21.5, "y": 4.25, "h": 2}, + + {"matrix": [2, 1], "w": 1.25, "x": 0, "y": 5.25}, + {"matrix": [3, 12], "w": 1.25, "x": 1.25, "y": 5.25}, + {"matrix": [5, 0], "w": 1.25, "x": 2.5, "y": 5.25}, + {"matrix": [5, 10], "w": 6.25, "x": 3.75, "y": 5.25}, + {"matrix": [6, 0], "w": 1.25, "x": 10, "y": 5.25}, + {"matrix": [7, 12], "w": 1.25, "x": 11.25, "y": 5.25}, + {"matrix": [6, 3], "w": 1.25, "x": 12.5, "y": 5.25}, + {"matrix": [4, 1], "w": 1.25, "x": 13.75, "y": 5.25}, + {"matrix": [6, 15], "x": 15.25, "y": 5.25}, + {"matrix": [6, 10], "x": 16.25, "y": 5.25}, + {"matrix": [6, 11], "x": 17.25, "y": 5.25}, + {"matrix": [5, 11], "w": 2, "x": 18.5, "y": 5.25}, + {"matrix": [5, 14], "x": 20.5, "y": 5.25} + ] + }, "LAYOUT_fullsize_iso": { "layout": [ - {"label": "Esc", "matrix": [5, 16], "x": 0, "y": 0}, - {"label": "F1", "matrix": [2, 4], "x": 2, "y": 0}, - {"label": "F2", "matrix": [2, 5], "x": 3, "y": 0}, - {"label": "F3", "matrix": [3, 5], "x": 4, "y": 0}, - {"label": "F4", "matrix": [5, 5], "x": 5, "y": 0}, - {"label": "F5", "matrix": [0, 1], "x": 6.5, "y": 0}, - {"label": "F6", "matrix": [5, 8], "x": 7.5, "y": 0}, - {"label": "F7", "matrix": [3, 3], "x": 8.5, "y": 0}, - {"label": "F8", "matrix": [2, 3], "x": 9.5, "y": 0}, - {"label": "F9", "matrix": [2, 2], "x": 11, "y": 0}, - {"label": "F10", "matrix": [0, 2], "x": 12, "y": 0}, - {"label": "F11", "matrix": [5, 2], "x": 13, "y": 0}, - {"label": "F12", "matrix": [6, 2], "x": 14, "y": 0}, - {"label": "Prt Sc", "matrix": [0, 0], "x": 15.25, "y": 0}, - {"label": "Scr Lk", "matrix": [1, 0], "x": 16.25, "y": 0}, - {"label": "Pause", "matrix": [1, 1], "x": 17.25, "y": 0}, - {"label": "`", "matrix": [2, 16], "x": 0, "y": 1.25}, - {"label": "1", "matrix": [0, 16], "x": 1, "y": 1.25}, - {"label": "2", "matrix": [0, 4], "x": 2, "y": 1.25}, - {"label": "3", "matrix": [0, 5], "x": 3, "y": 1.25}, - {"label": "4", "matrix": [0, 6], "x": 4, "y": 1.25}, - {"label": "5", "matrix": [2, 6], "x": 5, "y": 1.25}, - {"label": "6", "matrix": [2, 7], "x": 6, "y": 1.25}, - {"label": "7", "matrix": [0, 7], "x": 7, "y": 1.25}, - {"label": "8", "matrix": [0, 8], "x": 8, "y": 1.25}, - {"label": "9", "matrix": [0, 3], "x": 9, "y": 1.25}, - {"label": "0", "matrix": [0, 9], "x": 10, "y": 1.25}, - {"label": "-", "matrix": [2, 9], "x": 11, "y": 1.25}, - {"label": "=", "matrix": [2, 8], "x": 12, "y": 1.25}, - {"label": "Backspace", "matrix": [3, 2], "w": 2, "x": 13, "y": 1.25}, - {"label": "Ins", "matrix": [2, 11], "x": 15.25, "y": 1.25}, - {"label": "Home", "matrix": [2, 15], "x": 16.25, "y": 1.25}, - {"label": "Page Up", "matrix": [2, 14], "x": 17.25, "y": 1.25}, - {"label": "Num Lk", "matrix": [4, 10], "x": 18.5, "y": 1.25}, - {"label": "/", "matrix": [4, 11], "x": 19.5, "y": 1.25}, - {"label": "*", "matrix": [4, 14], "x": 20.5, "y": 1.25}, - {"label": "-", "matrix": [6, 14], "x": 21.5, "y": 1.25}, - {"label": "Tab", "matrix": [3, 16], "w": 1.5, "x": 0, "y": 2.25}, - {"label": "Q", "matrix": [1, 16], "x": 1.5, "y": 2.25}, - {"label": "W", "matrix": [1, 4], "x": 2.5, "y": 2.25}, - {"label": "E", "matrix": [1, 5], "x": 3.5, "y": 2.25}, - {"label": "R", "matrix": [1, 6], "x": 4.5, "y": 2.25}, - {"label": "T", "matrix": [3, 6], "x": 5.5, "y": 2.25}, - {"label": "Y", "matrix": [3, 7], "x": 6.5, "y": 2.25}, - {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 2.25}, - {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 2.25}, - {"label": "O", "matrix": [1, 3], "x": 9.5, "y": 2.25}, - {"label": "P", "matrix": [1, 9], "x": 10.5, "y": 2.25}, - {"label": "[", "matrix": [3, 9], "x": 11.5, "y": 2.25}, - {"label": "]", "matrix": [3, 8], "x": 12.5, "y": 2.25}, - {"label": "Del", "matrix": [2, 10], "x": 15.25, "y": 2.25}, - {"label": "End", "matrix": [0, 15], "x": 16.25, "y": 2.25}, - {"label": "Page Down", "matrix": [0, 14], "x": 17.25, "y": 2.25}, - {"label": "7", "matrix": [1, 10], "x": 18.5, "y": 2.25}, - {"label": "8", "matrix": [1, 11], "x": 19.5, "y": 2.25}, - {"label": "9", "matrix": [1, 14], "x": 20.5, "y": 2.25}, - {"label": "+", "h": 2, "matrix": [1, 15], "x": 21.5, "y": 2.25}, - {"label": "Caps Lock", "matrix": [3, 4], "w": 1.75, "x": 0, "y": 3.25}, - {"label": "A", "matrix": [7, 16], "x": 1.75, "y": 3.25}, - {"label": "S", "matrix": [7, 4], "x": 2.75, "y": 3.25}, - {"label": "D", "matrix": [7, 5], "x": 3.75, "y": 3.25}, - {"label": "F", "matrix": [7, 6], "x": 4.75, "y": 3.25}, - {"label": "G", "matrix": [5, 6], "x": 5.75, "y": 3.25}, - {"label": "H", "matrix": [5, 7], "x": 6.75, "y": 3.25}, - {"label": "J", "matrix": [7, 7], "x": 7.75, "y": 3.25}, - {"label": "K", "matrix": [7, 8], "x": 8.75, "y": 3.25}, - {"label": "L", "matrix": [7, 3], "x": 9.75, "y": 3.25}, - {"label": ";", "matrix": [7, 9], "x": 10.75, "y": 3.25}, - {"label": "'", "matrix": [5, 9], "x": 11.75, "y": 3.25}, - {"label": "#", "matrix": [1, 2], "x": 12.75, "y": 3.25}, - {"label": "Return", "h": 2, "matrix": [4, 2], "w": 1.25, "x": 13.75, "y": 2.25}, - {"label": "4", "matrix": [3, 10], "x": 18.5, "y": 3.25}, - {"label": "5", "matrix": [3, 11], "x": 19.5, "y": 3.25}, - {"label": "6", "matrix": [3, 14], "x": 20.5, "y": 3.25}, - {"label": "Shift L", "matrix": [3, 13], "w": 1.25, "x": 0, "y": 4.25}, - {"label": "\\", "matrix": [5, 4], "x": 1.25, "y": 4.25}, - {"label": "Z", "matrix": [4, 16], "x": 2.25, "y": 4.25}, - {"label": "X", "matrix": [4, 4], "x": 3.25, "y": 4.25}, - {"label": "C", "matrix": [4, 5], "x": 4.25, "y": 4.25}, - {"label": "V", "matrix": [4, 6], "x": 5.25, "y": 4.25}, - {"label": "B", "matrix": [6, 6], "x": 6.25, "y": 4.25}, - {"label": "N", "matrix": [6, 7], "x": 7.25, "y": 4.25}, - {"label": "M", "matrix": [4, 7], "x": 8.25, "y": 4.25}, - {"label": ",", "matrix": [4, 8], "x": 9.25, "y": 4.25}, - {"label": ".", "matrix": [4, 3], "x": 10.25, "y": 4.25}, - {"label": "/", "matrix": [6, 9], "x": 11.25, "y": 4.25}, - {"label": "Shift R", "matrix": [7, 13], "w": 2.75, "x": 12.25, "y": 4.25}, - {"label": "Up", "matrix": [5, 15], "x": 16.25, "y": 4.25}, - {"label": "1", "matrix": [7, 10], "x": 18.5, "y": 4.25}, - {"label": "2", "matrix": [7, 11], "x": 19.5, "y": 4.25}, - {"label": "3", "matrix": [7, 14], "x": 20.5, "y": 4.25}, - {"label": "Enter", "h": 2, "matrix": [7, 15], "x": 21.5, "y": 4.25}, - {"label": "Control L", "matrix": [2, 1], "w": 1.25, "x": 0, "y": 5.25}, - {"label": "Super L", "matrix": [3, 12], "w": 1.25, "x": 1.25, "y": 5.25}, - {"label": "Alt L", "matrix": [5, 0], "w": 1.25, "x": 2.5, "y": 5.25}, - {"label": " ", "matrix": [5, 10], "w": 6.25, "x": 3.75, "y": 5.25}, - {"label": "Alt R", "matrix": [6, 0], "w": 1.25, "x": 10, "y": 5.25}, - {"label": "Super R", "matrix": [7, 12], "w": 1.25, "x": 11.25, "y": 5.25}, - {"label": "Menu", "matrix": [6, 3], "w": 1.25, "x": 12.5, "y": 5.25}, - {"label": "Control R", "matrix": [4, 1], "w": 1.25, "x": 13.75, "y": 5.25}, - {"label": "Left", "matrix": [6, 15], "x": 15.25, "y": 5.25}, - {"label": "Down", "matrix": [6, 10], "x": 16.25, "y": 5.25}, - {"label": "Right", "matrix": [6, 11], "x": 17.25, "y": 5.25}, - {"label": "0", "matrix": [5, 11], "w": 2, "x": 18.5, "y": 5.25}, - {"label": "Del", "matrix": [5, 14], "x": 20.5, "y": 5.25} + {"matrix": [5, 16], "x": 0, "y": 0}, + {"matrix": [2, 4], "x": 2, "y": 0}, + {"matrix": [2, 5], "x": 3, "y": 0}, + {"matrix": [3, 5], "x": 4, "y": 0}, + {"matrix": [5, 5], "x": 5, "y": 0}, + {"matrix": [0, 1], "x": 6.5, "y": 0}, + {"matrix": [5, 8], "x": 7.5, "y": 0}, + {"matrix": [3, 3], "x": 8.5, "y": 0}, + {"matrix": [2, 3], "x": 9.5, "y": 0}, + {"matrix": [2, 2], "x": 11, "y": 0}, + {"matrix": [0, 2], "x": 12, "y": 0}, + {"matrix": [5, 2], "x": 13, "y": 0}, + {"matrix": [6, 2], "x": 14, "y": 0}, + {"matrix": [0, 0], "x": 15.25, "y": 0}, + {"matrix": [1, 0], "x": 16.25, "y": 0}, + {"matrix": [1, 1], "x": 17.25, "y": 0}, + + {"matrix": [2, 16], "x": 0, "y": 1.25}, + {"matrix": [0, 16], "x": 1, "y": 1.25}, + {"matrix": [0, 4], "x": 2, "y": 1.25}, + {"matrix": [0, 5], "x": 3, "y": 1.25}, + {"matrix": [0, 6], "x": 4, "y": 1.25}, + {"matrix": [2, 6], "x": 5, "y": 1.25}, + {"matrix": [2, 7], "x": 6, "y": 1.25}, + {"matrix": [0, 7], "x": 7, "y": 1.25}, + {"matrix": [0, 8], "x": 8, "y": 1.25}, + {"matrix": [0, 3], "x": 9, "y": 1.25}, + {"matrix": [0, 9], "x": 10, "y": 1.25}, + {"matrix": [2, 9], "x": 11, "y": 1.25}, + {"matrix": [2, 8], "x": 12, "y": 1.25}, + {"matrix": [3, 2], "w": 2, "x": 13, "y": 1.25}, + {"matrix": [2, 11], "x": 15.25, "y": 1.25}, + {"matrix": [2, 15], "x": 16.25, "y": 1.25}, + {"matrix": [2, 14], "x": 17.25, "y": 1.25}, + {"matrix": [4, 10], "x": 18.5, "y": 1.25}, + {"matrix": [4, 11], "x": 19.5, "y": 1.25}, + {"matrix": [4, 14], "x": 20.5, "y": 1.25}, + {"matrix": [6, 14], "x": 21.5, "y": 1.25}, + + {"matrix": [3, 16], "w": 1.5, "x": 0, "y": 2.25}, + {"matrix": [1, 16], "x": 1.5, "y": 2.25}, + {"matrix": [1, 4], "x": 2.5, "y": 2.25}, + {"matrix": [1, 5], "x": 3.5, "y": 2.25}, + {"matrix": [1, 6], "x": 4.5, "y": 2.25}, + {"matrix": [3, 6], "x": 5.5, "y": 2.25}, + {"matrix": [3, 7], "x": 6.5, "y": 2.25}, + {"matrix": [1, 7], "x": 7.5, "y": 2.25}, + {"matrix": [1, 8], "x": 8.5, "y": 2.25}, + {"matrix": [1, 3], "x": 9.5, "y": 2.25}, + {"matrix": [1, 9], "x": 10.5, "y": 2.25}, + {"matrix": [3, 9], "x": 11.5, "y": 2.25}, + {"matrix": [3, 8], "x": 12.5, "y": 2.25}, + {"matrix": [2, 10], "x": 15.25, "y": 2.25}, + {"matrix": [0, 15], "x": 16.25, "y": 2.25}, + {"matrix": [0, 14], "x": 17.25, "y": 2.25}, + {"matrix": [1, 10], "x": 18.5, "y": 2.25}, + {"matrix": [1, 11], "x": 19.5, "y": 2.25}, + {"matrix": [1, 14], "x": 20.5, "y": 2.25}, + {"matrix": [1, 15], "x": 21.5, "y": 2.25, "h": 2}, + + {"matrix": [3, 4], "w": 1.75, "x": 0, "y": 3.25}, + {"matrix": [7, 16], "x": 1.75, "y": 3.25}, + {"matrix": [7, 4], "x": 2.75, "y": 3.25}, + {"matrix": [7, 5], "x": 3.75, "y": 3.25}, + {"matrix": [7, 6], "x": 4.75, "y": 3.25}, + {"matrix": [5, 6], "x": 5.75, "y": 3.25}, + {"matrix": [5, 7], "x": 6.75, "y": 3.25}, + {"matrix": [7, 7], "x": 7.75, "y": 3.25}, + {"matrix": [7, 8], "x": 8.75, "y": 3.25}, + {"matrix": [7, 3], "x": 9.75, "y": 3.25}, + {"matrix": [7, 9], "x": 10.75, "y": 3.25}, + {"matrix": [5, 9], "x": 11.75, "y": 3.25}, + {"matrix": [1, 2], "x": 12.75, "y": 3.25}, + {"matrix": [4, 2], "w": 1.25, "x": 13.75, "y": 2.25, "h": 2}, + {"matrix": [3, 10], "x": 18.5, "y": 3.25}, + {"matrix": [3, 11], "x": 19.5, "y": 3.25}, + {"matrix": [3, 14], "x": 20.5, "y": 3.25}, + + {"matrix": [3, 13], "w": 1.25, "x": 0, "y": 4.25}, + {"matrix": [5, 4], "x": 1.25, "y": 4.25}, + {"matrix": [4, 16], "x": 2.25, "y": 4.25}, + {"matrix": [4, 4], "x": 3.25, "y": 4.25}, + {"matrix": [4, 5], "x": 4.25, "y": 4.25}, + {"matrix": [4, 6], "x": 5.25, "y": 4.25}, + {"matrix": [6, 6], "x": 6.25, "y": 4.25}, + {"matrix": [6, 7], "x": 7.25, "y": 4.25}, + {"matrix": [4, 7], "x": 8.25, "y": 4.25}, + {"matrix": [4, 8], "x": 9.25, "y": 4.25}, + {"matrix": [4, 3], "x": 10.25, "y": 4.25}, + {"matrix": [6, 9], "x": 11.25, "y": 4.25}, + {"matrix": [7, 13], "w": 2.75, "x": 12.25, "y": 4.25}, + {"matrix": [5, 15], "x": 16.25, "y": 4.25}, + {"matrix": [7, 10], "x": 18.5, "y": 4.25}, + {"matrix": [7, 11], "x": 19.5, "y": 4.25}, + {"matrix": [7, 14], "x": 20.5, "y": 4.25}, + {"matrix": [7, 15], "x": 21.5, "y": 4.25, "h": 2}, + + {"matrix": [2, 1], "w": 1.25, "x": 0, "y": 5.25}, + {"matrix": [3, 12], "w": 1.25, "x": 1.25, "y": 5.25}, + {"matrix": [5, 0], "w": 1.25, "x": 2.5, "y": 5.25}, + {"matrix": [5, 10], "w": 6.25, "x": 3.75, "y": 5.25}, + {"matrix": [6, 0], "w": 1.25, "x": 10, "y": 5.25}, + {"matrix": [7, 12], "w": 1.25, "x": 11.25, "y": 5.25}, + {"matrix": [6, 3], "w": 1.25, "x": 12.5, "y": 5.25}, + {"matrix": [4, 1], "w": 1.25, "x": 13.75, "y": 5.25}, + {"matrix": [6, 15], "x": 15.25, "y": 5.25}, + {"matrix": [6, 10], "x": 16.25, "y": 5.25}, + {"matrix": [6, 11], "x": 17.25, "y": 5.25}, + {"matrix": [5, 11], "w": 2, "x": 18.5, "y": 5.25}, + {"matrix": [5, 14], "x": 20.5, "y": 5.25} ] } } diff --git a/keyboards/maxr1998/phoebe/keyboard.json b/keyboards/maxr1998/phoebe/keyboard.json index 86407414fa..d678e3b74e 100644 --- a/keyboards/maxr1998/phoebe/keyboard.json +++ b/keyboards/maxr1998/phoebe/keyboard.json @@ -9,10 +9,10 @@ "diode_direction": "COL2ROW", "features": { "bootmagic": true, - "nkro": true, - "rgblight": true, "key_lock": true, - "leader": true + "mousekey": true, + "nkro": true, + "rgblight": true }, "qmk": { "locking": { diff --git a/keyboards/maxr1998/phoebe/keymaps/default/config.h b/keyboards/maxr1998/phoebe/keymaps/default/config.h index 593ac440c1..b8f6676468 100644 --- a/keyboards/maxr1998/phoebe/keymaps/default/config.h +++ b/keyboards/maxr1998/phoebe/keymaps/default/config.h @@ -1,3 +1,18 @@ +/* Copyright 2019 Max Rumpf (@Maxr1998) + * + * 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 #define RSPC_KEYS KC_RSFT, KC_RALT, KC_7 diff --git a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c index 8b4f31644c..de5fe3a67c 100644 --- a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c +++ b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2019 Max Rumpf (@Maxr1998) + * + * 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 "keymap_german.h" @@ -35,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SC_RSPC, - KC_LCTL, KC_LGUI, KC_LALT, QK_LEAD, KC_SC, KC_SPC, KC_ALGR, KC_FN, KC_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_BTN1, KC_SC, KC_SPC, KC_ALGR, KC_FN, KC_LEFT, KC_DOWN, KC_RGHT ), /* Special characters @@ -77,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, DE_UDIA, KC_F9, DE_ODIA, KC_PSCR, KC_DEL, QK_LOCK, DE_ADIA, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_SW,RGB_M_SN,_______, _______, _______, _______, _______, _______, _______, _______, _______, UG_HUED, UG_TOGG, UG_HUEU, KC_PGUP, _______, - XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END + XXXXXXX, _______, XXXXXXX, KC_BTN2, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END ), /* Gaming @@ -128,13 +143,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -}; - -void leader_end_user(void) { - if (leader_sequence_two_keys(KC_G, KC_P)) { - SEND_STRING("git push"); - } - if (leader_sequence_three_keys(KC_G, KC_F, KC_P)) { - SEND_STRING("git push --force-with-lease"); - } } diff --git a/keyboards/maxr1998/phoebe/phoebe.c b/keyboards/maxr1998/phoebe/phoebe.c index b05f9b3235..0451f9177e 100644 --- a/keyboards/maxr1998/phoebe/phoebe.c +++ b/keyboards/maxr1998/phoebe/phoebe.c @@ -1,3 +1,18 @@ +/* Copyright 2019 Max Rumpf (@Maxr1998) + * + * 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 "quantum.h" const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {50, 50, 50}; diff --git a/keyboards/monsgeek/m5/keyboard.json b/keyboards/monsgeek/m5/keyboard.json index b9ef0099bc..3927181e2d 100644 --- a/keyboards/monsgeek/m5/keyboard.json +++ b/keyboards/monsgeek/m5/keyboard.json @@ -49,7 +49,16 @@ "driver": "snled27351", "max_brightness": 180, "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, @@ -60,12 +69,29 @@ "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_rain": true, + "pixel_flow": true, + "pixel_fractal": true, "typing_heatmap": true, + "digital_rain": true, "solid_reactive_simple": true, "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, "solid_reactive_cross": true, - "multisplash": true + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true }, "layout":[ { "flags": 4, "matrix": [0, 0], "x": 0, "y": 0 }, diff --git a/keyboards/ploopyco/trackball_thumb/rev1_001/config.h b/keyboards/ploopyco/trackball_thumb/rev1_001/config.h index 108a104cdc..fb2f9431cc 100644 --- a/keyboards/ploopyco/trackball_thumb/rev1_001/config.h +++ b/keyboards/ploopyco/trackball_thumb/rev1_001/config.h @@ -26,5 +26,5 @@ /* PMW33XX Settings */ #define PMW33XX_CS_PIN B0 -#define ENCODER_A_PINS { F0 } -#define ENCODER_B_PINS { F4 } +#define ENCODER_A_PINS { F4 } +#define ENCODER_B_PINS { F0 } diff --git a/keyboards/plywrks/ply8x/config.h b/keyboards/plywrks/ply8x/hotswap/config.h index 3fc4de978d..3fc4de978d 100644 --- a/keyboards/plywrks/ply8x/config.h +++ b/keyboards/plywrks/ply8x/hotswap/config.h diff --git a/keyboards/plywrks/ply8x/halconf.h b/keyboards/plywrks/ply8x/hotswap/halconf.h index e215e323c5..e215e323c5 100644 --- a/keyboards/plywrks/ply8x/halconf.h +++ b/keyboards/plywrks/ply8x/hotswap/halconf.h diff --git a/keyboards/plywrks/ply8x/hotswap/keyboard.json b/keyboards/plywrks/ply8x/hotswap/keyboard.json new file mode 100644 index 0000000000..2dc2ac5c35 --- /dev/null +++ b/keyboards/plywrks/ply8x/hotswap/keyboard.json @@ -0,0 +1,560 @@ +{ + "manufacturer": "plywrks", + "keyboard_name": "ply8x", + "maintainer": "ramonimbao", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "rows": ["B2", "B1", "B0", "A7", "A10", "A2"], + "cols": ["A9", "A8", "B12", "B11", "B10", "A6", "A5", "A4", "A15", "C14", "C13", "B9", "B6", "B7", "B5", "B4", "B3"] + }, + "processor": "STM32F072", + "url": "", + "usb": { + "device_version": "1.0.0", + "vid": "0x706C", + "pid": "0x7915" + }, + "ws2812": { + "pin": "B15", + "driver": "spi" + }, + "rgb_matrix": { + "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, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": 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_rain": true, + "pixel_flow": true, + "pixel_fractal": true, + "typing_heatmap": true, + "digital_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 + }, + "driver": "ws2812", + "layout": [ + {"flags": 2, "x":224, "y":37}, + {"flags": 2, "x":224, "y":43}, + {"flags": 2, "x":218, "y":43}, + {"flags": 2, "x":218, "y":37}, + + {"flags": 2, "matrix": [0, 0], "x":0, "y": 0}, + {"flags": 2, "matrix": [0, 2], "x":26, "y": 0}, + {"flags": 2, "matrix": [0, 3], "x":38, "y": 0}, + {"flags": 2, "matrix": [0, 4], "x":51, "y": 0}, + {"flags": 2, "matrix": [0, 5], "x":64, "y": 0}, + {"flags": 2, "matrix": [0, 6], "x":83, "y": 0}, + {"flags": 2, "matrix": [0, 7], "x":96, "y": 0}, + {"flags": 2, "matrix": [0, 8], "x":109, "y": 0}, + {"flags": 2, "matrix": [0, 9], "x":122, "y": 0}, + {"flags": 2, "matrix": [0,10], "x":141, "y": 0}, + {"flags": 2, "matrix": [0,11], "x":154, "y": 0}, + {"flags": 2, "matrix": [0,12], "x":166, "y": 0}, + {"flags": 2, "matrix": [0,13], "x":179, "y": 0}, + {"flags": 2, "matrix": [0,14], "x":195, "y": 0}, + {"flags": 2, "matrix": [0,15], "x":208, "y": 0}, + {"flags": 2, "matrix": [0,16], "x":221, "y": 0}, + + {"flags": 2, "matrix": [1, 0], "x":0, "y": 15}, + {"flags": 2, "matrix": [1, 1], "x":13, "y": 15}, + {"flags": 2, "matrix": [1, 2], "x":26, "y": 15}, + {"flags": 2, "matrix": [1, 3], "x":38, "y": 15}, + {"flags": 2, "matrix": [1, 4], "x":51, "y": 15}, + {"flags": 2, "matrix": [1, 5], "x":64, "y": 15}, + {"flags": 2, "matrix": [1, 6], "x":77, "y": 15}, + {"flags": 2, "matrix": [1, 7], "x":90, "y": 15}, + {"flags": 2, "matrix": [1, 8], "x":102, "y": 15}, + {"flags": 2, "matrix": [1, 9], "x":115, "y": 15}, + {"flags": 2, "matrix": [1,10], "x":128, "y": 15}, + {"flags": 2, "matrix": [1,11], "x":141, "y": 15}, + {"flags": 2, "matrix": [1,12], "x":154, "y": 15}, + {"flags": 2, "matrix": [1,13], "x":166, "y": 15}, + {"flags": 2, "matrix": [3,13], "x":179, "y": 15}, + {"flags": 2, "matrix": [1,14], "x":195, "y": 15}, + {"flags": 2, "matrix": [1,15], "x":208, "y": 15}, + {"flags": 2, "matrix": [1,16], "x":221, "y": 15}, + + {"flags": 2, "matrix": [2, 0], "x":3, "y": 27}, + {"flags": 2, "matrix": [2, 1], "x":19, "y": 27}, + {"flags": 2, "matrix": [2, 2], "x":32, "y": 27}, + {"flags": 2, "matrix": [2, 3], "x":45, "y": 27}, + {"flags": 2, "matrix": [2, 4], "x":58, "y": 27}, + {"flags": 2, "matrix": [2, 5], "x":70, "y": 27}, + {"flags": 2, "matrix": [2, 6], "x":83, "y": 27}, + {"flags": 2, "matrix": [2, 7], "x":96, "y": 27}, + {"flags": 2, "matrix": [2, 8], "x":109, "y": 27}, + {"flags": 2, "matrix": [2, 9], "x":122, "y": 27}, + {"flags": 2, "matrix": [2,10], "x":134, "y": 27}, + {"flags": 2, "matrix": [2,11], "x":147, "y": 27}, + {"flags": 2, "matrix": [2,12], "x":160, "y": 27}, + {"flags": 2, "matrix": [2,13], "x":176, "y": 27}, + {"flags": 2, "matrix": [2,14], "x":195, "y": 27}, + {"flags": 2, "matrix": [2,15], "x":208, "y": 27}, + {"flags": 2, "matrix": [2,16], "x":221, "y": 27}, + + {"flags": 2, "matrix": [3, 0], "x":5, "y":40}, + {"flags": 2, "matrix": [3, 1], "x":23, "y": 40}, + {"flags": 2, "matrix": [3, 2], "x":36, "y": 40}, + {"flags": 2, "matrix": [3, 3], "x":49, "y": 40}, + {"flags": 2, "matrix": [3, 4], "x":62, "y": 40}, + {"flags": 2, "matrix": [3, 5], "x":75, "y": 40}, + {"flags": 2, "matrix": [3, 6], "x":88, "y": 40}, + {"flags": 2, "matrix": [3, 7], "x":101, "y": 40}, + {"flags": 2, "matrix": [3, 8], "x":114, "y": 40}, + {"flags": 2, "matrix": [3, 9], "x":127, "y": 40}, + {"flags": 2, "matrix": [3,10], "x":140, "y": 40}, + {"flags": 2, "matrix": [3,11], "x":153, "y": 40}, + {"flags": 2, "matrix": [3,12], "x":166, "y": 40}, + + {"flags": 2, "matrix": [4, 0], "x":8, "y": 52}, + {"flags": 2, "matrix": [4, 2], "x":29, "y": 52}, + {"flags": 2, "matrix": [4, 3], "x":42, "y": 52}, + {"flags": 2, "matrix": [4, 4], "x":54, "y": 52}, + {"flags": 2, "matrix": [4, 5], "x":67, "y": 52}, + {"flags": 2, "matrix": [4, 6], "x":80, "y": 52}, + {"flags": 2, "matrix": [4, 7], "x":93, "y": 52}, + {"flags": 2, "matrix": [4, 8], "x":106, "y": 52}, + {"flags": 2, "matrix": [4, 9], "x":118, "y": 52}, + {"flags": 2, "matrix": [4,10], "x":131, "y": 52}, + {"flags": 2, "matrix": [4,11], "x":144, "y": 52}, + {"flags": 2, "matrix": [4,12], "x":162, "y": 52}, + {"flags": 2, "matrix": [4,13], "x":179, "y": 52}, + {"flags": 2, "matrix": [4,15], "x":208, "y": 52}, + + {"flags": 2, "matrix": [5, 0], "x":2, "y": 64}, + {"flags": 2, "matrix": [5, 1], "x":18, "y": 64}, + {"flags": 2, "matrix": [5, 2], "x":34, "y": 64}, + {"flags": 2, "matrix": [5, 7], "x":82, "y": 64}, + {"flags": 2, "matrix": [5,11], "x":146, "y": 64}, + {"flags": 2, "matrix": [5,12], "x":162, "y": 64}, + {"flags": 2, "matrix": [5,13], "x":178, "y": 64}, + {"flags": 2, "matrix": [5,14], "x":195, "y": 64}, + {"flags": 2, "matrix": [5,15], "x":208, "y": 64}, + {"flags": 2, "matrix": [5,16], "x":221, "y": 64} + ] + }, + "community_layouts": ["tkl_ansi_tsangan", "tkl_ansi_tsangan_split_bs_rshift", "tkl_ansi_wkl", "tkl_ansi_wkl_split_bs_rshift"], + "layouts": { + "LAYOUT_tkl_ansi_tsangan": { + "layout": [ + {"matrix": [0, 0], "x":0, "y":0}, + {"matrix": [0, 2], "x":2, "y":0}, + {"matrix": [0, 3], "x":3, "y":0}, + {"matrix": [0, 4], "x":4, "y":0}, + {"matrix": [0, 5], "x":5, "y":0}, + {"matrix": [0, 6], "x":6.5, "y":0}, + {"matrix": [0, 7], "x":7.5, "y":0}, + {"matrix": [0, 8], "x":8.5, "y":0}, + {"matrix": [0, 9], "x":9.5, "y":0}, + {"matrix": [0,10], "x":11, "y":0}, + {"matrix": [0,11], "x":12, "y":0}, + {"matrix": [0,12], "x":13, "y":0}, + {"matrix": [0,13], "x":14, "y":0}, + {"matrix": [0,14], "x":15.25, "y":0}, + {"matrix": [0,15], "x":16.25, "y":0}, + {"matrix": [0,16], "x":17.25, "y":0}, + + {"matrix": [1, 0], "x":0, "y":1.25}, + {"matrix": [1, 1], "x":1, "y":1.25}, + {"matrix": [1, 2], "x":2, "y":1.25}, + {"matrix": [1, 3], "x":3, "y":1.25}, + {"matrix": [1, 4], "x":4, "y":1.25}, + {"matrix": [1, 5], "x":5, "y":1.25}, + {"matrix": [1, 6], "x":6, "y":1.25}, + {"matrix": [1, 7], "x":7, "y":1.25}, + {"matrix": [1, 8], "x":8, "y":1.25}, + {"matrix": [1, 9], "x":9, "y":1.25}, + {"matrix": [1,10], "x":10, "y":1.25}, + {"matrix": [1,11], "x":11, "y":1.25}, + {"matrix": [1,12], "x":12, "y":1.25}, + {"matrix": [1,13], "x":13, "y":1.25, "w":2}, + {"matrix": [1,14], "x":15.25, "y":1.25}, + {"matrix": [1,15], "x":16.25, "y":1.25}, + {"matrix": [1,16], "x":17.25, "y":1.25}, + + {"matrix": [2, 0], "x":0, "y":2.25, "w":1.5}, + {"matrix": [2, 1], "x":1.5, "y":2.25}, + {"matrix": [2, 2], "x":2.5, "y":2.25}, + {"matrix": [2, 3], "x":3.5, "y":2.25}, + {"matrix": [2, 4], "x":4.5, "y":2.25}, + {"matrix": [2, 5], "x":5.5, "y":2.25}, + {"matrix": [2, 6], "x":6.5, "y":2.25}, + {"matrix": [2, 7], "x":7.5, "y":2.25}, + {"matrix": [2, 8], "x":8.5, "y":2.25}, + {"matrix": [2, 9], "x":9.5, "y":2.25}, + {"matrix": [2,10], "x":10.5, "y":2.25}, + {"matrix": [2,11], "x":11.5, "y":2.25}, + {"matrix": [2,12], "x":12.5, "y":2.25}, + {"matrix": [2,13], "x":13.5, "y":2.25, "w":1.5}, + {"matrix": [2,14], "x":15.25, "y":2.25}, + {"matrix": [2,15], "x":16.25, "y":2.25}, + {"matrix": [2,16], "x":17.25, "y":2.25}, + + {"matrix": [3, 0], "x":0, "y":3.25, "w":1.75}, + {"matrix": [3, 1], "x":1.75, "y":3.25}, + {"matrix": [3, 2], "x":2.75, "y":3.25}, + {"matrix": [3, 3], "x":3.75, "y":3.25}, + {"matrix": [3, 4], "x":4.75, "y":3.25}, + {"matrix": [3, 5], "x":5.75, "y":3.25}, + {"matrix": [3, 6], "x":6.75, "y":3.25}, + {"matrix": [3, 7], "x":7.75, "y":3.25}, + {"matrix": [3, 8], "x":8.75, "y":3.25}, + {"matrix": [3, 9], "x":9.75, "y":3.25}, + {"matrix": [3,10], "x":10.75, "y":3.25}, + {"matrix": [3,11], "x":11.75, "y":3.25}, + {"matrix": [3,12], "x":12.75, "y":3.25, "w":2.25}, + + {"matrix": [4, 0], "x":0, "y":4.25, "w":2.25}, + {"matrix": [4, 2], "x":2.25, "y":4.25}, + {"matrix": [4, 3], "x":3.25, "y":4.25}, + {"matrix": [4, 4], "x":4.25, "y":4.25}, + {"matrix": [4, 5], "x":5.25, "y":4.25}, + {"matrix": [4, 6], "x":6.25, "y":4.25}, + {"matrix": [4, 7], "x":7.25, "y":4.25}, + {"matrix": [4, 8], "x":8.25, "y":4.25}, + {"matrix": [4, 9], "x":9.25, "y":4.25}, + {"matrix": [4,10], "x":10.25, "y":4.25}, + {"matrix": [4,11], "x":11.25, "y":4.25}, + {"matrix": [4,12], "x":12.25, "y":4.25, "w":2.75}, + {"matrix": [4,15], "x":16.25, "y":4.25}, + + {"matrix": [5, 0], "x":0, "y":5.25, "w":1.5}, + {"matrix": [5, 1], "x":1.5, "y":5.25}, + {"matrix": [5, 2], "x":2.5, "y":5.25, "w":1.5}, + {"matrix": [5, 7], "x":4, "y":5.25, "w":7}, + {"matrix": [5,11], "x":11, "y":5.25, "w":1.5}, + {"matrix": [5,12], "x":12.5, "y":5.25}, + {"matrix": [5,13], "x":13.5, "y":5.25, "w":1.5}, + {"matrix": [5,14], "x":15.25, "y":5.25}, + {"matrix": [5,15], "x":16.25, "y":5.25}, + {"matrix": [5,16], "x":17.25, "y":5.25} + ] + }, + "LAYOUT_tkl_ansi_tsangan_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x":0, "y":0}, + {"matrix": [0, 2], "x":2, "y":0}, + {"matrix": [0, 3], "x":3, "y":0}, + {"matrix": [0, 4], "x":4, "y":0}, + {"matrix": [0, 5], "x":5, "y":0}, + {"matrix": [0, 6], "x":6.5, "y":0}, + {"matrix": [0, 7], "x":7.5, "y":0}, + {"matrix": [0, 8], "x":8.5, "y":0}, + {"matrix": [0, 9], "x":9.5, "y":0}, + {"matrix": [0,10], "x":11, "y":0}, + {"matrix": [0,11], "x":12, "y":0}, + {"matrix": [0,12], "x":13, "y":0}, + {"matrix": [0,13], "x":14, "y":0}, + {"matrix": [0,14], "x":15.25, "y":0}, + {"matrix": [0,15], "x":16.25, "y":0}, + {"matrix": [0,16], "x":17.25, "y":0}, + + {"matrix": [1, 0], "x":0, "y":1.25}, + {"matrix": [1, 1], "x":1, "y":1.25}, + {"matrix": [1, 2], "x":2, "y":1.25}, + {"matrix": [1, 3], "x":3, "y":1.25}, + {"matrix": [1, 4], "x":4, "y":1.25}, + {"matrix": [1, 5], "x":5, "y":1.25}, + {"matrix": [1, 6], "x":6, "y":1.25}, + {"matrix": [1, 7], "x":7, "y":1.25}, + {"matrix": [1, 8], "x":8, "y":1.25}, + {"matrix": [1, 9], "x":9, "y":1.25}, + {"matrix": [1,10], "x":10, "y":1.25}, + {"matrix": [1,11], "x":11, "y":1.25}, + {"matrix": [1,12], "x":12, "y":1.25}, + {"matrix": [1,13], "x":13, "y":1.25}, + {"matrix": [3,13], "x":14, "y":1.25}, + {"matrix": [1,14], "x":15.25, "y":1.25}, + {"matrix": [1,15], "x":16.25, "y":1.25}, + {"matrix": [1,16], "x":17.25, "y":1.25}, + + {"matrix": [2, 0], "x":0, "y":2.25, "w":1.5}, + {"matrix": [2, 1], "x":1.5, "y":2.25}, + {"matrix": [2, 2], "x":2.5, "y":2.25}, + {"matrix": [2, 3], "x":3.5, "y":2.25}, + {"matrix": [2, 4], "x":4.5, "y":2.25}, + {"matrix": [2, 5], "x":5.5, "y":2.25}, + {"matrix": [2, 6], "x":6.5, "y":2.25}, + {"matrix": [2, 7], "x":7.5, "y":2.25}, + {"matrix": [2, 8], "x":8.5, "y":2.25}, + {"matrix": [2, 9], "x":9.5, "y":2.25}, + {"matrix": [2,10], "x":10.5, "y":2.25}, + {"matrix": [2,11], "x":11.5, "y":2.25}, + {"matrix": [2,12], "x":12.5, "y":2.25}, + {"matrix": [2,13], "x":13.5, "y":2.25, "w":1.5}, + {"matrix": [2,14], "x":15.25, "y":2.25}, + {"matrix": [2,15], "x":16.25, "y":2.25}, + {"matrix": [2,16], "x":17.25, "y":2.25}, + + {"matrix": [3, 0], "x":0, "y":3.25, "w":1.75}, + {"matrix": [3, 1], "x":1.75, "y":3.25}, + {"matrix": [3, 2], "x":2.75, "y":3.25}, + {"matrix": [3, 3], "x":3.75, "y":3.25}, + {"matrix": [3, 4], "x":4.75, "y":3.25}, + {"matrix": [3, 5], "x":5.75, "y":3.25}, + {"matrix": [3, 6], "x":6.75, "y":3.25}, + {"matrix": [3, 7], "x":7.75, "y":3.25}, + {"matrix": [3, 8], "x":8.75, "y":3.25}, + {"matrix": [3, 9], "x":9.75, "y":3.25}, + {"matrix": [3,10], "x":10.75, "y":3.25}, + {"matrix": [3,11], "x":11.75, "y":3.25}, + {"matrix": [3,12], "x":12.75, "y":3.25, "w":2.25}, + + {"matrix": [4, 0], "x":0, "y":4.25, "w":2.25}, + {"matrix": [4, 2], "x":2.25, "y":4.25}, + {"matrix": [4, 3], "x":3.25, "y":4.25}, + {"matrix": [4, 4], "x":4.25, "y":4.25}, + {"matrix": [4, 5], "x":5.25, "y":4.25}, + {"matrix": [4, 6], "x":6.25, "y":4.25}, + {"matrix": [4, 7], "x":7.25, "y":4.25}, + {"matrix": [4, 8], "x":8.25, "y":4.25}, + {"matrix": [4, 9], "x":9.25, "y":4.25}, + {"matrix": [4,10], "x":10.25, "y":4.25}, + {"matrix": [4,11], "x":11.25, "y":4.25}, + {"matrix": [4,12], "x":12.25, "y":4.25, "w":1.75}, + {"matrix": [4,13], "x":14, "y":4.25}, + {"matrix": [4,15], "x":16.25, "y":4.25}, + + {"matrix": [5, 0], "x":0, "y":5.25, "w":1.5}, + {"matrix": [5, 1], "x":1.5, "y":5.25}, + {"matrix": [5, 2], "x":2.5, "y":5.25, "w":1.5}, + {"matrix": [5, 7], "x":4, "y":5.25, "w":7}, + {"matrix": [5,11], "x":11, "y":5.25, "w":1.5}, + {"matrix": [5,12], "x":12.5, "y":5.25}, + {"matrix": [5,13], "x":13.5, "y":5.25, "w":1.5}, + {"matrix": [5,14], "x":15.25, "y":5.25}, + {"matrix": [5,15], "x":16.25, "y":5.25}, + {"matrix": [5,16], "x":17.25, "y":5.25} + ] + }, + "LAYOUT_tkl_ansi_wkl": { + "layout": [ + {"matrix": [0, 0], "x":0, "y":0}, + {"matrix": [0, 2], "x":2, "y":0}, + {"matrix": [0, 3], "x":3, "y":0}, + {"matrix": [0, 4], "x":4, "y":0}, + {"matrix": [0, 5], "x":5, "y":0}, + {"matrix": [0, 6], "x":6.5, "y":0}, + {"matrix": [0, 7], "x":7.5, "y":0}, + {"matrix": [0, 8], "x":8.5, "y":0}, + {"matrix": [0, 9], "x":9.5, "y":0}, + {"matrix": [0,10], "x":11, "y":0}, + {"matrix": [0,11], "x":12, "y":0}, + {"matrix": [0,12], "x":13, "y":0}, + {"matrix": [0,13], "x":14, "y":0}, + {"matrix": [0,14], "x":15.25, "y":0}, + {"matrix": [0,15], "x":16.25, "y":0}, + {"matrix": [0,16], "x":17.25, "y":0}, + + {"matrix": [1, 0], "x":0, "y":1.25}, + {"matrix": [1, 1], "x":1, "y":1.25}, + {"matrix": [1, 2], "x":2, "y":1.25}, + {"matrix": [1, 3], "x":3, "y":1.25}, + {"matrix": [1, 4], "x":4, "y":1.25}, + {"matrix": [1, 5], "x":5, "y":1.25}, + {"matrix": [1, 6], "x":6, "y":1.25}, + {"matrix": [1, 7], "x":7, "y":1.25}, + {"matrix": [1, 8], "x":8, "y":1.25}, + {"matrix": [1, 9], "x":9, "y":1.25}, + {"matrix": [1,10], "x":10, "y":1.25}, + {"matrix": [1,11], "x":11, "y":1.25}, + {"matrix": [1,12], "x":12, "y":1.25}, + {"matrix": [1,13], "x":13, "y":1.25, "w":2}, + {"matrix": [1,14], "x":15.25, "y":1.25}, + {"matrix": [1,15], "x":16.25, "y":1.25}, + {"matrix": [1,16], "x":17.25, "y":1.25}, + + {"matrix": [2, 0], "x":0, "y":2.25, "w":1.5}, + {"matrix": [2, 1], "x":1.5, "y":2.25}, + {"matrix": [2, 2], "x":2.5, "y":2.25}, + {"matrix": [2, 3], "x":3.5, "y":2.25}, + {"matrix": [2, 4], "x":4.5, "y":2.25}, + {"matrix": [2, 5], "x":5.5, "y":2.25}, + {"matrix": [2, 6], "x":6.5, "y":2.25}, + {"matrix": [2, 7], "x":7.5, "y":2.25}, + {"matrix": [2, 8], "x":8.5, "y":2.25}, + {"matrix": [2, 9], "x":9.5, "y":2.25}, + {"matrix": [2,10], "x":10.5, "y":2.25}, + {"matrix": [2,11], "x":11.5, "y":2.25}, + {"matrix": [2,12], "x":12.5, "y":2.25}, + {"matrix": [2,13], "x":13.5, "y":2.25, "w":1.5}, + {"matrix": [2,14], "x":15.25, "y":2.25}, + {"matrix": [2,15], "x":16.25, "y":2.25}, + {"matrix": [2,16], "x":17.25, "y":2.25}, + + {"matrix": [3, 0], "x":0, "y":3.25, "w":1.75}, + {"matrix": [3, 1], "x":1.75, "y":3.25}, + {"matrix": [3, 2], "x":2.75, "y":3.25}, + {"matrix": [3, 3], "x":3.75, "y":3.25}, + {"matrix": [3, 4], "x":4.75, "y":3.25}, + {"matrix": [3, 5], "x":5.75, "y":3.25}, + {"matrix": [3, 6], "x":6.75, "y":3.25}, + {"matrix": [3, 7], "x":7.75, "y":3.25}, + {"matrix": [3, 8], "x":8.75, "y":3.25}, + {"matrix": [3, 9], "x":9.75, "y":3.25}, + {"matrix": [3,10], "x":10.75, "y":3.25}, + {"matrix": [3,11], "x":11.75, "y":3.25}, + {"matrix": [3,12], "x":12.75, "y":3.25, "w":2.25}, + + {"matrix": [4, 0], "x":0, "y":4.25, "w":2.25}, + {"matrix": [4, 2], "x":2.25, "y":4.25}, + {"matrix": [4, 3], "x":3.25, "y":4.25}, + {"matrix": [4, 4], "x":4.25, "y":4.25}, + {"matrix": [4, 5], "x":5.25, "y":4.25}, + {"matrix": [4, 6], "x":6.25, "y":4.25}, + {"matrix": [4, 7], "x":7.25, "y":4.25}, + {"matrix": [4, 8], "x":8.25, "y":4.25}, + {"matrix": [4, 9], "x":9.25, "y":4.25}, + {"matrix": [4,10], "x":10.25, "y":4.25}, + {"matrix": [4,11], "x":11.25, "y":4.25}, + {"matrix": [4,12], "x":12.25, "y":4.25, "w":2.75}, + {"matrix": [4,15], "x":16.25, "y":4.25}, + + {"matrix": [5, 0], "x":0, "y":5.25, "w":1.5}, + {"matrix": [5, 2], "x":2.5, "y":5.25, "w":1.5}, + {"matrix": [5, 7], "x":4, "y":5.25, "w":7}, + {"matrix": [5,11], "x":11, "y":5.25, "w":1.5}, + {"matrix": [5,13], "x":13.5, "y":5.25, "w":1.5}, + {"matrix": [5,14], "x":15.25, "y":5.25}, + {"matrix": [5,15], "x":16.25, "y":5.25}, + {"matrix": [5,16], "x":17.25, "y":5.25} + ] + }, + "LAYOUT_tkl_ansi_wkl_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x":0, "y":0}, + {"matrix": [0, 2], "x":2, "y":0}, + {"matrix": [0, 3], "x":3, "y":0}, + {"matrix": [0, 4], "x":4, "y":0}, + {"matrix": [0, 5], "x":5, "y":0}, + {"matrix": [0, 6], "x":6.5, "y":0}, + {"matrix": [0, 7], "x":7.5, "y":0}, + {"matrix": [0, 8], "x":8.5, "y":0}, + {"matrix": [0, 9], "x":9.5, "y":0}, + {"matrix": [0,10], "x":11, "y":0}, + {"matrix": [0,11], "x":12, "y":0}, + {"matrix": [0,12], "x":13, "y":0}, + {"matrix": [0,13], "x":14, "y":0}, + {"matrix": [0,14], "x":15.25, "y":0}, + {"matrix": [0,15], "x":16.25, "y":0}, + {"matrix": [0,16], "x":17.25, "y":0}, + + {"matrix": [1, 0], "x":0, "y":1.25}, + {"matrix": [1, 1], "x":1, "y":1.25}, + {"matrix": [1, 2], "x":2, "y":1.25}, + {"matrix": [1, 3], "x":3, "y":1.25}, + {"matrix": [1, 4], "x":4, "y":1.25}, + {"matrix": [1, 5], "x":5, "y":1.25}, + {"matrix": [1, 6], "x":6, "y":1.25}, + {"matrix": [1, 7], "x":7, "y":1.25}, + {"matrix": [1, 8], "x":8, "y":1.25}, + {"matrix": [1, 9], "x":9, "y":1.25}, + {"matrix": [1,10], "x":10, "y":1.25}, + {"matrix": [1,11], "x":11, "y":1.25}, + {"matrix": [1,12], "x":12, "y":1.25}, + {"matrix": [1,13], "x":13, "y":1.25}, + {"matrix": [3,13], "x":14, "y":1.25}, + {"matrix": [1,14], "x":15.25, "y":1.25}, + {"matrix": [1,15], "x":16.25, "y":1.25}, + {"matrix": [1,16], "x":17.25, "y":1.25}, + + {"matrix": [2, 0], "x":0, "y":2.25, "w":1.5}, + {"matrix": [2, 1], "x":1.5, "y":2.25}, + {"matrix": [2, 2], "x":2.5, "y":2.25}, + {"matrix": [2, 3], "x":3.5, "y":2.25}, + {"matrix": [2, 4], "x":4.5, "y":2.25}, + {"matrix": [2, 5], "x":5.5, "y":2.25}, + {"matrix": [2, 6], "x":6.5, "y":2.25}, + {"matrix": [2, 7], "x":7.5, "y":2.25}, + {"matrix": [2, 8], "x":8.5, "y":2.25}, + {"matrix": [2, 9], "x":9.5, "y":2.25}, + {"matrix": [2,10], "x":10.5, "y":2.25}, + {"matrix": [2,11], "x":11.5, "y":2.25}, + {"matrix": [2,12], "x":12.5, "y":2.25}, + {"matrix": [2,13], "x":13.5, "y":2.25, "w":1.5}, + {"matrix": [2,14], "x":15.25, "y":2.25}, + {"matrix": [2,15], "x":16.25, "y":2.25}, + {"matrix": [2,16], "x":17.25, "y":2.25}, + + {"matrix": [3, 0], "x":0, "y":3.25, "w":1.75}, + {"matrix": [3, 1], "x":1.75, "y":3.25}, + {"matrix": [3, 2], "x":2.75, "y":3.25}, + {"matrix": [3, 3], "x":3.75, "y":3.25}, + {"matrix": [3, 4], "x":4.75, "y":3.25}, + {"matrix": [3, 5], "x":5.75, "y":3.25}, + {"matrix": [3, 6], "x":6.75, "y":3.25}, + {"matrix": [3, 7], "x":7.75, "y":3.25}, + {"matrix": [3, 8], "x":8.75, "y":3.25}, + {"matrix": [3, 9], "x":9.75, "y":3.25}, + {"matrix": [3,10], "x":10.75, "y":3.25}, + {"matrix": [3,11], "x":11.75, "y":3.25}, + {"matrix": [3,12], "x":12.75, "y":3.25, "w":2.25}, + + {"matrix": [4, 0], "x":0, "y":4.25, "w":2.25}, + {"matrix": [4, 2], "x":2.25, "y":4.25}, + {"matrix": [4, 3], "x":3.25, "y":4.25}, + {"matrix": [4, 4], "x":4.25, "y":4.25}, + {"matrix": [4, 5], "x":5.25, "y":4.25}, + {"matrix": [4, 6], "x":6.25, "y":4.25}, + {"matrix": [4, 7], "x":7.25, "y":4.25}, + {"matrix": [4, 8], "x":8.25, "y":4.25}, + {"matrix": [4, 9], "x":9.25, "y":4.25}, + {"matrix": [4,10], "x":10.25, "y":4.25}, + {"matrix": [4,11], "x":11.25, "y":4.25}, + {"matrix": [4,12], "x":12.25, "y":4.25, "w":1.75}, + {"matrix": [4,13], "x":14, "y":4.25}, + {"matrix": [4,15], "x":16.25, "y":4.25}, + + {"matrix": [5, 0], "x":0, "y":5.25, "w":1.5}, + {"matrix": [5, 2], "x":2.5, "y":5.25, "w":1.5}, + {"matrix": [5, 7], "x":4, "y":5.25, "w":7}, + {"matrix": [5,11], "x":11, "y":5.25, "w":1.5}, + {"matrix": [5,13], "x":13.5, "y":5.25, "w":1.5}, + {"matrix": [5,14], "x":15.25, "y":5.25}, + {"matrix": [5,15], "x":16.25, "y":5.25}, + {"matrix": [5,16], "x":17.25, "y":5.25} + ] + } + } +} diff --git a/keyboards/plywrks/ply8x/hotswap/keymaps/default/keymap.c b/keyboards/plywrks/ply8x/hotswap/keymaps/default/keymap.c new file mode 100644 index 0000000000..0da2588ea7 --- /dev/null +++ b/keyboards/plywrks/ply8x/hotswap/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴───┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ + * │Ctrl│GUI │Alt │ │ Alt│ GUI│Ctrl│ │ ← │ ↓ │ → │ + * └────┴────┴────┴─────────────────────────────┴────┴────┴────┘ └───┴───┴───┘ + */ + [0] = LAYOUT_tkl_ansi_tsangan( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; diff --git a/keyboards/plywrks/ply8x/mcuconf.h b/keyboards/plywrks/ply8x/hotswap/mcuconf.h index aceb2e3dfc..aceb2e3dfc 100644 --- a/keyboards/plywrks/ply8x/mcuconf.h +++ b/keyboards/plywrks/ply8x/hotswap/mcuconf.h diff --git a/keyboards/plywrks/ply8x/solder/config.h b/keyboards/plywrks/ply8x/solder/config.h new file mode 100644 index 0000000000..3fc4de978d --- /dev/null +++ b/keyboards/plywrks/ply8x/solder/config.h @@ -0,0 +1,10 @@ +// Copyright 2023 Ramon Imbao (@ramonimbao) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define WS2812_SPI_DRIVER SPID2 +#define WS2812_SPI_MOSI_PAL_MODE 0 +#define WS2812_SPI_SCK_PIN B13 +#define WS2812_SPI_SCK_PAL_MODE 0 +#define WS2812_EXTERNAL_PULLUP diff --git a/keyboards/plywrks/ply8x/solder/halconf.h b/keyboards/plywrks/ply8x/solder/halconf.h new file mode 100644 index 0000000000..e215e323c5 --- /dev/null +++ b/keyboards/plywrks/ply8x/solder/halconf.h @@ -0,0 +1,8 @@ +// Copyright 2023 Ramon Imbao (@ramonimbao) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_SPI TRUE + +#include_next <halconf.h> diff --git a/keyboards/plywrks/ply8x/keyboard.json b/keyboards/plywrks/ply8x/solder/keyboard.json index 7c0717ade0..8bae31a1f1 100644 --- a/keyboards/plywrks/ply8x/keyboard.json +++ b/keyboards/plywrks/ply8x/solder/keyboard.json @@ -21,8 +21,8 @@ "url": "", "usb": { "device_version": "1.0.0", - "pid": "0x7905", - "vid": "0x706C" + "vid": "0x706C", + "pid": "0x7905" }, "ws2812": { "pin": "B15", @@ -76,12 +76,106 @@ }, "driver": "ws2812", "layout": [ - {"flags": 8, "matrix": [3, 0], "x":2, "y":27}, - {"flags": 8, "matrix": [0,15], "x":211, "y":0}, - {"flags": 2, "x":0, "y":0}, - {"flags": 2, "x":10, "y":0}, - {"flags": 2, "x":20, "y":0}, - {"flags": 2, "x":30, "y":0} + {"flags": 8, "matrix": [3, 0], "x":5, "y":40}, + {"flags": 8, "matrix": [0,15], "x":208, "y":0}, + {"flags": 2, "x":224, "y":37}, + {"flags": 2, "x":224, "y":43}, + {"flags": 2, "x":218, "y":43}, + {"flags": 2, "x":218, "y":37}, + + {"flags": 2, "matrix": [0, 0], "x":0, "y": 0}, + {"flags": 2, "matrix": [0, 2], "x":26, "y": 0}, + {"flags": 2, "matrix": [0, 3], "x":38, "y": 0}, + {"flags": 2, "matrix": [0, 4], "x":51, "y": 0}, + {"flags": 2, "matrix": [0, 5], "x":64, "y": 0}, + {"flags": 2, "matrix": [0, 6], "x":83, "y": 0}, + {"flags": 2, "matrix": [0, 7], "x":96, "y": 0}, + {"flags": 2, "matrix": [0, 8], "x":109, "y": 0}, + {"flags": 2, "matrix": [0, 9], "x":122, "y": 0}, + {"flags": 2, "matrix": [0,10], "x":141, "y": 0}, + {"flags": 2, "matrix": [0,11], "x":154, "y": 0}, + {"flags": 2, "matrix": [0,12], "x":166, "y": 0}, + {"flags": 2, "matrix": [0,13], "x":179, "y": 0}, + {"flags": 2, "matrix": [0,14], "x":195, "y": 0}, + {"flags": 2, "matrix": [0,16], "x":221, "y": 0}, + + {"flags": 2, "matrix": [1, 0], "x":0, "y": 15}, + {"flags": 2, "matrix": [1, 1], "x":13, "y": 15}, + {"flags": 2, "matrix": [1, 2], "x":26, "y": 15}, + {"flags": 2, "matrix": [1, 3], "x":38, "y": 15}, + {"flags": 2, "matrix": [1, 4], "x":51, "y": 15}, + {"flags": 2, "matrix": [1, 5], "x":64, "y": 15}, + {"flags": 2, "matrix": [1, 6], "x":77, "y": 15}, + {"flags": 2, "matrix": [1, 7], "x":90, "y": 15}, + {"flags": 2, "matrix": [1, 8], "x":102, "y": 15}, + {"flags": 2, "matrix": [1, 9], "x":115, "y": 15}, + {"flags": 2, "matrix": [1,10], "x":128, "y": 15}, + {"flags": 2, "matrix": [1,11], "x":141, "y": 15}, + {"flags": 2, "matrix": [1,12], "x":154, "y": 15}, + {"flags": 2, "matrix": [1,13], "x":166, "y": 15}, + {"flags": 2, "matrix": [3,13], "x":179, "y": 15}, + {"flags": 2, "matrix": [1,14], "x":195, "y": 15}, + {"flags": 2, "matrix": [1,15], "x":208, "y": 15}, + {"flags": 2, "matrix": [1,16], "x":221, "y": 15}, + + {"flags": 2, "matrix": [2, 0], "x":3, "y": 27}, + {"flags": 2, "matrix": [2, 1], "x":19, "y": 27}, + {"flags": 2, "matrix": [2, 2], "x":32, "y": 27}, + {"flags": 2, "matrix": [2, 3], "x":45, "y": 27}, + {"flags": 2, "matrix": [2, 4], "x":58, "y": 27}, + {"flags": 2, "matrix": [2, 5], "x":70, "y": 27}, + {"flags": 2, "matrix": [2, 6], "x":83, "y": 27}, + {"flags": 2, "matrix": [2, 7], "x":96, "y": 27}, + {"flags": 2, "matrix": [2, 8], "x":109, "y": 27}, + {"flags": 2, "matrix": [2, 9], "x":122, "y": 27}, + {"flags": 2, "matrix": [2,10], "x":134, "y": 27}, + {"flags": 2, "matrix": [2,11], "x":147, "y": 27}, + {"flags": 2, "matrix": [2,12], "x":160, "y": 27}, + {"flags": 2, "matrix": [2,13], "x":176, "y": 27}, + {"flags": 2, "matrix": [2,14], "x":195, "y": 27}, + {"flags": 2, "matrix": [2,15], "x":208, "y": 27}, + {"flags": 2, "matrix": [2,16], "x":221, "y": 27}, + + {"flags": 2, "matrix": [3, 1], "x":23, "y": 40}, + {"flags": 2, "matrix": [3, 2], "x":36, "y": 40}, + {"flags": 2, "matrix": [3, 3], "x":49, "y": 40}, + {"flags": 2, "matrix": [3, 4], "x":62, "y": 40}, + {"flags": 2, "matrix": [3, 5], "x":75, "y": 40}, + {"flags": 2, "matrix": [3, 6], "x":88, "y": 40}, + {"flags": 2, "matrix": [3, 7], "x":101, "y": 40}, + {"flags": 2, "matrix": [3, 8], "x":114, "y": 40}, + {"flags": 2, "matrix": [3, 9], "x":127, "y": 40}, + {"flags": 2, "matrix": [3,10], "x":140, "y": 40}, + {"flags": 2, "matrix": [3,11], "x":153, "y": 40}, + {"flags": 2, "matrix": [3,12], "x":166, "y": 40}, + + {"flags": 2, "matrix": [4, 0], "x":2, "y": 52}, + {"flags": 2, "matrix": [4, 1], "x":16, "y": 52}, + {"flags": 2, "matrix": [4, 2], "x":29, "y": 52}, + {"flags": 2, "matrix": [4, 3], "x":42, "y": 52}, + {"flags": 2, "matrix": [4, 4], "x":54, "y": 52}, + {"flags": 2, "matrix": [4, 5], "x":67, "y": 52}, + {"flags": 2, "matrix": [4, 6], "x":80, "y": 52}, + {"flags": 2, "matrix": [4, 7], "x":93, "y": 52}, + {"flags": 2, "matrix": [4, 8], "x":106, "y": 52}, + {"flags": 2, "matrix": [4, 9], "x":118, "y": 52}, + {"flags": 2, "matrix": [4,10], "x":131, "y": 52}, + {"flags": 2, "matrix": [4,11], "x":144, "y": 52}, + {"flags": 2, "matrix": [4,12], "x":162, "y": 52}, + {"flags": 2, "matrix": [4,13], "x":179, "y": 52}, + {"flags": 2, "matrix": [4,15], "x":208, "y": 52}, + + {"flags": 2, "matrix": [5, 0], "x":2, "y": 64}, + {"flags": 2, "matrix": [5, 1], "x":18, "y": 64}, + {"flags": 2, "matrix": [5, 2], "x":34, "y": 64}, + {"flags": 2, "matrix": [5, 6], "x":82, "y": 64}, + {"flags": 2, "matrix": [5,10], "x":130, "y": 64}, + {"flags": 2, "matrix": [5,11], "x":146, "y": 64}, + {"flags": 2, "matrix": [5,12], "x":162, "y": 64}, + {"flags": 2, "matrix": [5,13], "x":178, "y": 64}, + {"flags": 2, "matrix": [5,14], "x":195, "y": 64}, + {"flags": 2, "matrix": [5,15], "x":208, "y": 64}, + {"flags": 2, "matrix": [5,16], "x":221, "y": 64} ] }, "layout_aliases": { @@ -92,11 +186,15 @@ "tkl_ansi", "tkl_ansi_split_bs_rshift", "tkl_ansi_tsangan", + "tkl_ansi_wkl", "tkl_ansi_tsangan_split_bs_rshift", + "tkl_ansi_wkl_split_bs_rshift", "tkl_iso", "tkl_iso_split_bs_rshift", "tkl_iso_tsangan", - "tkl_iso_tsangan_split_bs_rshift" + "tkl_iso_wkl", + "tkl_iso_tsangan_split_bs_rshift", + "tkl_iso_wkl_split_bs_rshift" ], "layouts": { "LAYOUT_tkl_ansi": { @@ -388,6 +486,99 @@ {"matrix": [5,16], "x":17.25, "y":5.25} ] }, + "LAYOUT_tkl_ansi_wkl": { + "layout": [ + {"matrix": [0, 0], "x":0, "y":0}, + {"matrix": [0, 2], "x":2, "y":0}, + {"matrix": [0, 3], "x":3, "y":0}, + {"matrix": [0, 4], "x":4, "y":0}, + {"matrix": [0, 5], "x":5, "y":0}, + {"matrix": [0, 6], "x":6.5, "y":0}, + {"matrix": [0, 7], "x":7.5, "y":0}, + {"matrix": [0, 8], "x":8.5, "y":0}, + {"matrix": [0, 9], "x":9.5, "y":0}, + {"matrix": [0,10], "x":11, "y":0}, + {"matrix": [0,11], "x":12, "y":0}, + {"matrix": [0,12], "x":13, "y":0}, + {"matrix": [0,13], "x":14, "y":0}, + {"matrix": [0,14], "x":15.25, "y":0}, + {"matrix": [0,15], "x":16.25, "y":0}, + {"matrix": [0,16], "x":17.25, "y":0}, + + {"matrix": [1, 0], "x":0, "y":1.25}, + {"matrix": [1, 1], "x":1, "y":1.25}, + {"matrix": [1, 2], "x":2, "y":1.25}, + {"matrix": [1, 3], "x":3, "y":1.25}, + {"matrix": [1, 4], "x":4, "y":1.25}, + {"matrix": [1, 5], "x":5, "y":1.25}, + {"matrix": [1, 6], "x":6, "y":1.25}, + {"matrix": [1, 7], "x":7, "y":1.25}, + {"matrix": [1, 8], "x":8, "y":1.25}, + {"matrix": [1, 9], "x":9, "y":1.25}, + {"matrix": [1,10], "x":10, "y":1.25}, + {"matrix": [1,11], "x":11, "y":1.25}, + {"matrix": [1,12], "x":12, "y":1.25}, + {"matrix": [1,13], "x":13, "y":1.25, "w":2}, + {"matrix": [1,14], "x":15.25, "y":1.25}, + {"matrix": [1,15], "x":16.25, "y":1.25}, + {"matrix": [1,16], "x":17.25, "y":1.25}, + + {"matrix": [2, 0], "x":0, "y":2.25, "w":1.5}, + {"matrix": [2, 1], "x":1.5, "y":2.25}, + {"matrix": [2, 2], "x":2.5, "y":2.25}, + {"matrix": [2, 3], "x":3.5, "y":2.25}, + {"matrix": [2, 4], "x":4.5, "y":2.25}, + {"matrix": [2, 5], "x":5.5, "y":2.25}, + {"matrix": [2, 6], "x":6.5, "y":2.25}, + {"matrix": [2, 7], "x":7.5, "y":2.25}, + {"matrix": [2, 8], "x":8.5, "y":2.25}, + {"matrix": [2, 9], "x":9.5, "y":2.25}, + {"matrix": [2,10], "x":10.5, "y":2.25}, + {"matrix": [2,11], "x":11.5, "y":2.25}, + {"matrix": [2,12], "x":12.5, "y":2.25}, + {"matrix": [2,13], "x":13.5, "y":2.25, "w":1.5}, + {"matrix": [2,14], "x":15.25, "y":2.25}, + {"matrix": [2,15], "x":16.25, "y":2.25}, + {"matrix": [2,16], "x":17.25, "y":2.25}, + + {"matrix": [3, 0], "x":0, "y":3.25, "w":1.75}, + {"matrix": [3, 1], "x":1.75, "y":3.25}, + {"matrix": [3, 2], "x":2.75, "y":3.25}, + {"matrix": [3, 3], "x":3.75, "y":3.25}, + {"matrix": [3, 4], "x":4.75, "y":3.25}, + {"matrix": [3, 5], "x":5.75, "y":3.25}, + {"matrix": [3, 6], "x":6.75, "y":3.25}, + {"matrix": [3, 7], "x":7.75, "y":3.25}, + {"matrix": [3, 8], "x":8.75, "y":3.25}, + {"matrix": [3, 9], "x":9.75, "y":3.25}, + {"matrix": [3,10], "x":10.75, "y":3.25}, + {"matrix": [3,11], "x":11.75, "y":3.25}, + {"matrix": [3,12], "x":12.75, "y":3.25, "w":2.25}, + + {"matrix": [4, 0], "x":0, "y":4.25, "w":2.25}, + {"matrix": [4, 2], "x":2.25, "y":4.25}, + {"matrix": [4, 3], "x":3.25, "y":4.25}, + {"matrix": [4, 4], "x":4.25, "y":4.25}, + {"matrix": [4, 5], "x":5.25, "y":4.25}, + {"matrix": [4, 6], "x":6.25, "y":4.25}, + {"matrix": [4, 7], "x":7.25, "y":4.25}, + {"matrix": [4, 8], "x":8.25, "y":4.25}, + {"matrix": [4, 9], "x":9.25, "y":4.25}, + {"matrix": [4,10], "x":10.25, "y":4.25}, + {"matrix": [4,11], "x":11.25, "y":4.25}, + {"matrix": [4,12], "x":12.25, "y":4.25, "w":2.75}, + {"matrix": [4,15], "x":16.25, "y":4.25}, + + {"matrix": [5, 0], "x":0, "y":5.25, "w":1.5}, + {"matrix": [5, 2], "x":2.5, "y":5.25, "w":1.5}, + {"matrix": [5, 6], "x":4, "y":5.25, "w":7}, + {"matrix": [5,11], "x":11, "y":5.25, "w":1.5}, + {"matrix": [5,13], "x":13.5, "y":5.25, "w":1.5}, + {"matrix": [5,14], "x":15.25, "y":5.25}, + {"matrix": [5,15], "x":16.25, "y":5.25}, + {"matrix": [5,16], "x":17.25, "y":5.25} + ] + }, "LAYOUT_tkl_ansi_tsangan_split_bs_rshift": { "layout": [ {"matrix": [0, 0], "x":0, "y":0}, @@ -485,6 +676,101 @@ {"matrix": [5,16], "x":17.25, "y":5.25} ] }, + "LAYOUT_tkl_ansi_wkl_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x":0, "y":0}, + {"matrix": [0, 2], "x":2, "y":0}, + {"matrix": [0, 3], "x":3, "y":0}, + {"matrix": [0, 4], "x":4, "y":0}, + {"matrix": [0, 5], "x":5, "y":0}, + {"matrix": [0, 6], "x":6.5, "y":0}, + {"matrix": [0, 7], "x":7.5, "y":0}, + {"matrix": [0, 8], "x":8.5, "y":0}, + {"matrix": [0, 9], "x":9.5, "y":0}, + {"matrix": [0,10], "x":11, "y":0}, + {"matrix": [0,11], "x":12, "y":0}, + {"matrix": [0,12], "x":13, "y":0}, + {"matrix": [0,13], "x":14, "y":0}, + {"matrix": [0,14], "x":15.25, "y":0}, + {"matrix": [0,15], "x":16.25, "y":0}, + {"matrix": [0,16], "x":17.25, "y":0}, + + {"matrix": [1, 0], "x":0, "y":1.25}, + {"matrix": [1, 1], "x":1, "y":1.25}, + {"matrix": [1, 2], "x":2, "y":1.25}, + {"matrix": [1, 3], "x":3, "y":1.25}, + {"matrix": [1, 4], "x":4, "y":1.25}, + {"matrix": [1, 5], "x":5, "y":1.25}, + {"matrix": [1, 6], "x":6, "y":1.25}, + {"matrix": [1, 7], "x":7, "y":1.25}, + {"matrix": [1, 8], "x":8, "y":1.25}, + {"matrix": [1, 9], "x":9, "y":1.25}, + {"matrix": [1,10], "x":10, "y":1.25}, + {"matrix": [1,11], "x":11, "y":1.25}, + {"matrix": [1,12], "x":12, "y":1.25}, + {"matrix": [1,13], "x":13, "y":1.25}, + {"matrix": [3,13], "x":14, "y":1.25}, + {"matrix": [1,14], "x":15.25, "y":1.25}, + {"matrix": [1,15], "x":16.25, "y":1.25}, + {"matrix": [1,16], "x":17.25, "y":1.25}, + + {"matrix": [2, 0], "x":0, "y":2.25, "w":1.5}, + {"matrix": [2, 1], "x":1.5, "y":2.25}, + {"matrix": [2, 2], "x":2.5, "y":2.25}, + {"matrix": [2, 3], "x":3.5, "y":2.25}, + {"matrix": [2, 4], "x":4.5, "y":2.25}, + {"matrix": [2, 5], "x":5.5, "y":2.25}, + {"matrix": [2, 6], "x":6.5, "y":2.25}, + {"matrix": [2, 7], "x":7.5, "y":2.25}, + {"matrix": [2, 8], "x":8.5, "y":2.25}, + {"matrix": [2, 9], "x":9.5, "y":2.25}, + {"matrix": [2,10], "x":10.5, "y":2.25}, + {"matrix": [2,11], "x":11.5, "y":2.25}, + {"matrix": [2,12], "x":12.5, "y":2.25}, + {"matrix": [2,13], "x":13.5, "y":2.25, "w":1.5}, + {"matrix": [2,14], "x":15.25, "y":2.25}, + {"matrix": [2,15], "x":16.25, "y":2.25}, + {"matrix": [2,16], "x":17.25, "y":2.25}, + + {"matrix": [3, 0], "x":0, "y":3.25, "w":1.75}, + {"matrix": [3, 1], "x":1.75, "y":3.25}, + {"matrix": [3, 2], "x":2.75, "y":3.25}, + {"matrix": [3, 3], "x":3.75, "y":3.25}, + {"matrix": [3, 4], "x":4.75, "y":3.25}, + {"matrix": [3, 5], "x":5.75, "y":3.25}, + {"matrix": [3, 6], "x":6.75, "y":3.25}, + {"matrix": [3, 7], "x":7.75, "y":3.25}, + {"matrix": [3, 8], "x":8.75, "y":3.25}, + {"matrix": [3, 9], "x":9.75, "y":3.25}, + {"matrix": [3,10], "x":10.75, "y":3.25}, + {"matrix": [3,11], "x":11.75, "y":3.25}, + {"matrix": [3,12], "x":12.75, "y":3.25, "w":2.25}, + + {"matrix": [4, 0], "x":0, "y":4.25, "w":2.25}, + {"matrix": [4, 2], "x":2.25, "y":4.25}, + {"matrix": [4, 3], "x":3.25, "y":4.25}, + {"matrix": [4, 4], "x":4.25, "y":4.25}, + {"matrix": [4, 5], "x":5.25, "y":4.25}, + {"matrix": [4, 6], "x":6.25, "y":4.25}, + {"matrix": [4, 7], "x":7.25, "y":4.25}, + {"matrix": [4, 8], "x":8.25, "y":4.25}, + {"matrix": [4, 9], "x":9.25, "y":4.25}, + {"matrix": [4,10], "x":10.25, "y":4.25}, + {"matrix": [4,11], "x":11.25, "y":4.25}, + {"matrix": [4,12], "x":12.25, "y":4.25, "w":1.75}, + {"matrix": [4,13], "x":14, "y":4.25}, + {"matrix": [4,15], "x":16.25, "y":4.25}, + + {"matrix": [5, 0], "x":0, "y":5.25, "w":1.5}, + {"matrix": [5, 2], "x":2.5, "y":5.25, "w":1.5}, + {"matrix": [5, 6], "x":4, "y":5.25, "w":7}, + {"matrix": [5,11], "x":11, "y":5.25, "w":1.5}, + {"matrix": [5,13], "x":13.5, "y":5.25, "w":1.5}, + {"matrix": [5,14], "x":15.25, "y":5.25}, + {"matrix": [5,15], "x":16.25, "y":5.25}, + {"matrix": [5,16], "x":17.25, "y":5.25} + ] + }, "LAYOUT_tkl_iso": { "layout": [ {"matrix": [0, 0], "x":0, "y":0}, @@ -777,6 +1063,100 @@ {"matrix": [5,16], "x":17.25, "y":5.25} ] }, + "LAYOUT_tkl_iso_wkl": { + "layout": [ + {"matrix": [0, 0], "x":0, "y":0}, + {"matrix": [0, 2], "x":2, "y":0}, + {"matrix": [0, 3], "x":3, "y":0}, + {"matrix": [0, 4], "x":4, "y":0}, + {"matrix": [0, 5], "x":5, "y":0}, + {"matrix": [0, 6], "x":6.5, "y":0}, + {"matrix": [0, 7], "x":7.5, "y":0}, + {"matrix": [0, 8], "x":8.5, "y":0}, + {"matrix": [0, 9], "x":9.5, "y":0}, + {"matrix": [0,10], "x":11, "y":0}, + {"matrix": [0,11], "x":12, "y":0}, + {"matrix": [0,12], "x":13, "y":0}, + {"matrix": [0,13], "x":14, "y":0}, + {"matrix": [0,14], "x":15.25, "y":0}, + {"matrix": [0,15], "x":16.25, "y":0}, + {"matrix": [0,16], "x":17.25, "y":0}, + + {"matrix": [1, 0], "x":0, "y":1.25}, + {"matrix": [1, 1], "x":1, "y":1.25}, + {"matrix": [1, 2], "x":2, "y":1.25}, + {"matrix": [1, 3], "x":3, "y":1.25}, + {"matrix": [1, 4], "x":4, "y":1.25}, + {"matrix": [1, 5], "x":5, "y":1.25}, + {"matrix": [1, 6], "x":6, "y":1.25}, + {"matrix": [1, 7], "x":7, "y":1.25}, + {"matrix": [1, 8], "x":8, "y":1.25}, + {"matrix": [1, 9], "x":9, "y":1.25}, + {"matrix": [1,10], "x":10, "y":1.25}, + {"matrix": [1,11], "x":11, "y":1.25}, + {"matrix": [1,12], "x":12, "y":1.25}, + {"matrix": [1,13], "x":13, "y":1.25, "w":2}, + {"matrix": [1,14], "x":15.25, "y":1.25}, + {"matrix": [1,15], "x":16.25, "y":1.25}, + {"matrix": [1,16], "x":17.25, "y":1.25}, + + {"matrix": [2, 0], "x":0, "y":2.25, "w":1.5}, + {"matrix": [2, 1], "x":1.5, "y":2.25}, + {"matrix": [2, 2], "x":2.5, "y":2.25}, + {"matrix": [2, 3], "x":3.5, "y":2.25}, + {"matrix": [2, 4], "x":4.5, "y":2.25}, + {"matrix": [2, 5], "x":5.5, "y":2.25}, + {"matrix": [2, 6], "x":6.5, "y":2.25}, + {"matrix": [2, 7], "x":7.5, "y":2.25}, + {"matrix": [2, 8], "x":8.5, "y":2.25}, + {"matrix": [2, 9], "x":9.5, "y":2.25}, + {"matrix": [2,10], "x":10.5, "y":2.25}, + {"matrix": [2,11], "x":11.5, "y":2.25}, + {"matrix": [2,12], "x":12.5, "y":2.25}, + {"matrix": [2,14], "x":15.25, "y":2.25}, + {"matrix": [2,15], "x":16.25, "y":2.25}, + {"matrix": [2,16], "x":17.25, "y":2.25}, + + {"matrix": [3, 0], "x":0, "y":3.25, "w":1.75}, + {"matrix": [3, 1], "x":1.75, "y":3.25}, + {"matrix": [3, 2], "x":2.75, "y":3.25}, + {"matrix": [3, 3], "x":3.75, "y":3.25}, + {"matrix": [3, 4], "x":4.75, "y":3.25}, + {"matrix": [3, 5], "x":5.75, "y":3.25}, + {"matrix": [3, 6], "x":6.75, "y":3.25}, + {"matrix": [3, 7], "x":7.75, "y":3.25}, + {"matrix": [3, 8], "x":8.75, "y":3.25}, + {"matrix": [3, 9], "x":9.75, "y":3.25}, + {"matrix": [3,10], "x":10.75, "y":3.25}, + {"matrix": [3,11], "x":11.75, "y":3.25}, + {"matrix": [3,12], "x":12.75, "y":3.25}, + {"matrix": [2,13], "x":13.75, "y":2.25, "w":1.25, "h":2}, + + {"matrix": [4, 0], "x":0, "y":4.25, "w":1.25}, + {"matrix": [4, 1], "x":1.25, "y":4.25}, + {"matrix": [4, 2], "x":2.25, "y":4.25}, + {"matrix": [4, 3], "x":3.25, "y":4.25}, + {"matrix": [4, 4], "x":4.25, "y":4.25}, + {"matrix": [4, 5], "x":5.25, "y":4.25}, + {"matrix": [4, 6], "x":6.25, "y":4.25}, + {"matrix": [4, 7], "x":7.25, "y":4.25}, + {"matrix": [4, 8], "x":8.25, "y":4.25}, + {"matrix": [4, 9], "x":9.25, "y":4.25}, + {"matrix": [4,10], "x":10.25, "y":4.25}, + {"matrix": [4,11], "x":11.25, "y":4.25}, + {"matrix": [4,12], "x":12.25, "y":4.25, "w":2.75}, + {"matrix": [4,15], "x":16.25, "y":4.25}, + + {"matrix": [5, 0], "x":0, "y":5.25, "w":1.5}, + {"matrix": [5, 2], "x":2.5, "y":5.25, "w":1.5}, + {"matrix": [5, 6], "x":4, "y":5.25, "w":7}, + {"matrix": [5,11], "x":11, "y":5.25, "w":1.5}, + {"matrix": [5,13], "x":13.5, "y":5.25, "w":1.5}, + {"matrix": [5,14], "x":15.25, "y":5.25}, + {"matrix": [5,15], "x":16.25, "y":5.25}, + {"matrix": [5,16], "x":17.25, "y":5.25} + ] + }, "LAYOUT_tkl_iso_tsangan_split_bs_rshift": { "layout": [ {"matrix": [0, 0], "x":0, "y":0}, @@ -875,6 +1255,102 @@ {"matrix": [5,16], "x":17.25, "y":5.25} ] }, + "LAYOUT_tkl_iso_wkl_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x":0, "y":0}, + {"matrix": [0, 2], "x":2, "y":0}, + {"matrix": [0, 3], "x":3, "y":0}, + {"matrix": [0, 4], "x":4, "y":0}, + {"matrix": [0, 5], "x":5, "y":0}, + {"matrix": [0, 6], "x":6.5, "y":0}, + {"matrix": [0, 7], "x":7.5, "y":0}, + {"matrix": [0, 8], "x":8.5, "y":0}, + {"matrix": [0, 9], "x":9.5, "y":0}, + {"matrix": [0,10], "x":11, "y":0}, + {"matrix": [0,11], "x":12, "y":0}, + {"matrix": [0,12], "x":13, "y":0}, + {"matrix": [0,13], "x":14, "y":0}, + {"matrix": [0,14], "x":15.25, "y":0}, + {"matrix": [0,15], "x":16.25, "y":0}, + {"matrix": [0,16], "x":17.25, "y":0}, + + {"matrix": [1, 0], "x":0, "y":1.25}, + {"matrix": [1, 1], "x":1, "y":1.25}, + {"matrix": [1, 2], "x":2, "y":1.25}, + {"matrix": [1, 3], "x":3, "y":1.25}, + {"matrix": [1, 4], "x":4, "y":1.25}, + {"matrix": [1, 5], "x":5, "y":1.25}, + {"matrix": [1, 6], "x":6, "y":1.25}, + {"matrix": [1, 7], "x":7, "y":1.25}, + {"matrix": [1, 8], "x":8, "y":1.25}, + {"matrix": [1, 9], "x":9, "y":1.25}, + {"matrix": [1,10], "x":10, "y":1.25}, + {"matrix": [1,11], "x":11, "y":1.25}, + {"matrix": [1,12], "x":12, "y":1.25}, + {"matrix": [1,13], "x":13, "y":1.25}, + {"matrix": [3,13], "x":14, "y":1.25}, + {"matrix": [1,14], "x":15.25, "y":1.25}, + {"matrix": [1,15], "x":16.25, "y":1.25}, + {"matrix": [1,16], "x":17.25, "y":1.25}, + + {"matrix": [2, 0], "x":0, "y":2.25, "w":1.5}, + {"matrix": [2, 1], "x":1.5, "y":2.25}, + {"matrix": [2, 2], "x":2.5, "y":2.25}, + {"matrix": [2, 3], "x":3.5, "y":2.25}, + {"matrix": [2, 4], "x":4.5, "y":2.25}, + {"matrix": [2, 5], "x":5.5, "y":2.25}, + {"matrix": [2, 6], "x":6.5, "y":2.25}, + {"matrix": [2, 7], "x":7.5, "y":2.25}, + {"matrix": [2, 8], "x":8.5, "y":2.25}, + {"matrix": [2, 9], "x":9.5, "y":2.25}, + {"matrix": [2,10], "x":10.5, "y":2.25}, + {"matrix": [2,11], "x":11.5, "y":2.25}, + {"matrix": [2,12], "x":12.5, "y":2.25}, + {"matrix": [2,14], "x":15.25, "y":2.25}, + {"matrix": [2,15], "x":16.25, "y":2.25}, + {"matrix": [2,16], "x":17.25, "y":2.25}, + + {"matrix": [3, 0], "x":0, "y":3.25, "w":1.75}, + {"matrix": [3, 1], "x":1.75, "y":3.25}, + {"matrix": [3, 2], "x":2.75, "y":3.25}, + {"matrix": [3, 3], "x":3.75, "y":3.25}, + {"matrix": [3, 4], "x":4.75, "y":3.25}, + {"matrix": [3, 5], "x":5.75, "y":3.25}, + {"matrix": [3, 6], "x":6.75, "y":3.25}, + {"matrix": [3, 7], "x":7.75, "y":3.25}, + {"matrix": [3, 8], "x":8.75, "y":3.25}, + {"matrix": [3, 9], "x":9.75, "y":3.25}, + {"matrix": [3,10], "x":10.75, "y":3.25}, + {"matrix": [3,11], "x":11.75, "y":3.25}, + {"matrix": [3,12], "x":12.75, "y":3.25}, + {"matrix": [2,13], "x":13.75, "y":2.25, "w":1.25, "h":2}, + + {"matrix": [4, 0], "x":0, "y":4.25, "w":1.25}, + {"matrix": [4, 1], "x":1.25, "y":4.25}, + {"matrix": [4, 2], "x":2.25, "y":4.25}, + {"matrix": [4, 3], "x":3.25, "y":4.25}, + {"matrix": [4, 4], "x":4.25, "y":4.25}, + {"matrix": [4, 5], "x":5.25, "y":4.25}, + {"matrix": [4, 6], "x":6.25, "y":4.25}, + {"matrix": [4, 7], "x":7.25, "y":4.25}, + {"matrix": [4, 8], "x":8.25, "y":4.25}, + {"matrix": [4, 9], "x":9.25, "y":4.25}, + {"matrix": [4,10], "x":10.25, "y":4.25}, + {"matrix": [4,11], "x":11.25, "y":4.25}, + {"matrix": [4,12], "x":12.25, "y":4.25, "w":1.75}, + {"matrix": [4,13], "x":14, "y":4.25}, + {"matrix": [4,15], "x":16.25, "y":4.25}, + + {"matrix": [5, 0], "x":0, "y":5.25, "w":1.5}, + {"matrix": [5, 2], "x":2.5, "y":5.25, "w":1.5}, + {"matrix": [5, 6], "x":4, "y":5.25, "w":7}, + {"matrix": [5,11], "x":11, "y":5.25, "w":1.5}, + {"matrix": [5,13], "x":13.5, "y":5.25, "w":1.5}, + {"matrix": [5,14], "x":15.25, "y":5.25}, + {"matrix": [5,15], "x":16.25, "y":5.25}, + {"matrix": [5,16], "x":17.25, "y":5.25} + ] + }, "LAYOUT_all": { "layout": [ {"matrix": [0, 0], "x":0, "y":0}, diff --git a/keyboards/plywrks/ply8x/keymaps/default/keymap.c b/keyboards/plywrks/ply8x/solder/keymaps/default/keymap.c index 4ca5b29581..4ca5b29581 100644 --- a/keyboards/plywrks/ply8x/keymaps/default/keymap.c +++ b/keyboards/plywrks/ply8x/solder/keymaps/default/keymap.c diff --git a/keyboards/plywrks/ply8x/solder/mcuconf.h b/keyboards/plywrks/ply8x/solder/mcuconf.h new file mode 100644 index 0000000000..aceb2e3dfc --- /dev/null +++ b/keyboards/plywrks/ply8x/solder/mcuconf.h @@ -0,0 +1,9 @@ +// Copyright 2023 Ramon Imbao (@ramonimbao) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next <mcuconf.h> + +#undef STM32_SPI_USE_SPI2 +#define STM32_SPI_USE_SPI2 TRUE diff --git a/keyboards/uzu42/rev1/keyboard.json b/keyboards/uzu42/rev1/keyboard.json index f96327daea..6f4f080e67 100644 --- a/keyboards/uzu42/rev1/keyboard.json +++ b/keyboards/uzu42/rev1/keyboard.json @@ -4,7 +4,7 @@ "url": "https://github.com/nrtkbb/Keyboards/tree/master/uzu42", "maintainer": "nrtkbb", "usb": { - "vid": "0xFEED", + "vid": "0x6E74", "pid": "0x3060", "device_version": "0.0.1" }, diff --git a/layouts/default/fullsize_extended_jis/info.json b/layouts/default/fullsize_extended_jis/info.json index 8267b4c54f..b410273cd9 100644 --- a/layouts/default/fullsize_extended_jis/info.json +++ b/layouts/default/fullsize_extended_jis/info.json @@ -48,8 +48,8 @@ {"x": 19.5, "y": 1.25}, {"x": 20.5, "y": 1.25}, {"x": 21.5, "y": 1.25}, - {"x": 0, "y": 2.25, "w": 1.5}, + {"x": 0, "y": 2.25, "w": 1.5}, {"x": 1.5, "y": 2.25}, {"x": 2.5, "y": 2.25}, {"x": 3.5, "y": 2.25}, @@ -62,7 +62,7 @@ {"x": 10.5, "y": 2.25}, {"x": 11.5, "y": 2.25}, {"x": 12.5, "y": 2.25}, - {"x": 13.75, "y": 2.25, "w": 1.25, "h": 2}, + {"x": 15.25, "y": 2.25}, {"x": 16.25, "y": 2.25}, {"x": 17.25, "y": 2.25}, @@ -84,6 +84,7 @@ {"x": 10.75, "y": 3.25}, {"x": 11.75, "y": 3.25}, {"x": 12.75, "y": 3.25}, + {"x": 13.75, "y": 2.25, "w": 1.25, "h": 2}, {"x": 18.5, "y": 3.25}, {"x": 19.5, "y": 3.25}, {"x": 20.5, "y": 3.25}, @@ -106,7 +107,7 @@ {"x": 19.5, "y": 4.25}, {"x": 20.5, "y": 4.25}, {"x": 21.5, "y": 4.25, "h": 2}, - + {"x": 0, "y": 5.25, "w": 1.25}, {"x": 1.25, "y": 5.25, "w": 1.25}, {"x": 2.5, "y": 5.25, "w": 1.25}, diff --git a/layouts/default/fullsize_jis/info.json b/layouts/default/fullsize_jis/info.json index 8acd5f2fe3..f573125a08 100644 --- a/layouts/default/fullsize_jis/info.json +++ b/layouts/default/fullsize_jis/info.json @@ -44,8 +44,8 @@ {"x": 19.5, "y": 1.25}, {"x": 20.5, "y": 1.25}, {"x": 21.5, "y": 1.25}, - {"x": 0, "y": 2.25, "w": 1.5}, + {"x": 0, "y": 2.25, "w": 1.5}, {"x": 1.5, "y": 2.25}, {"x": 2.5, "y": 2.25}, {"x": 3.5, "y": 2.25}, @@ -58,7 +58,6 @@ {"x": 10.5, "y": 2.25}, {"x": 11.5, "y": 2.25}, {"x": 12.5, "y": 2.25}, - {"x": 13.75, "y": 2.25, "w": 1.25, "h": 2}, {"x": 15.25, "y": 2.25}, {"x": 16.25, "y": 2.25}, {"x": 17.25, "y": 2.25}, @@ -80,6 +79,7 @@ {"x": 10.75, "y": 3.25}, {"x": 11.75, "y": 3.25}, {"x": 12.75, "y": 3.25}, + {"x": 13.75, "y": 2.25, "w": 1.25, "h": 2}, {"x": 18.5, "y": 3.25}, {"x": 19.5, "y": 3.25}, {"x": 20.5, "y": 3.25}, @@ -102,7 +102,7 @@ {"x": 19.5, "y": 4.25}, {"x": 20.5, "y": 4.25}, {"x": 21.5, "y": 4.25, "h": 2}, - + {"x": 0, "y": 5.25, "w": 1.25}, {"x": 1.25, "y": 5.25, "w": 1.25}, {"x": 2.5, "y": 5.25, "w": 1.25}, diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index 3f2ba9ce3c..cb949d9a71 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -215,7 +215,7 @@ if sys.version_info[0] != 3 or sys.version_info[1] < 9: milc_version = __VERSION__.split('.') -if int(milc_version[0]) < 2 and int(milc_version[1]) < 4: +if int(milc_version[0]) < 2 and int(milc_version[1]) < 9: requirements = Path('requirements.txt').resolve() _eprint(f'Your MILC library is too old! Please upgrade: python3 -m pip install -U -r {str(requirements)}') diff --git a/lib/python/qmk/cli/generate/rules_mk.py b/lib/python/qmk/cli/generate/rules_mk.py index cae9b07c3e..ef4101d77f 100755 --- a/lib/python/qmk/cli/generate/rules_mk.py +++ b/lib/python/qmk/cli/generate/rules_mk.py @@ -10,7 +10,7 @@ from qmk.info import info_json, get_modules from qmk.json_schema import json_load from qmk.keyboard import keyboard_completer, keyboard_folder from qmk.commands import dump_lines, parse_configurator_json -from qmk.path import normpath, FileType +from qmk.path import normpath, unix_style_path, FileType from qmk.constants import GPL2_HEADER_SH_LIKE, GENERATED_HEADER_SH_LIKE from qmk.community_modules import find_module_path, load_module_jsons @@ -63,7 +63,7 @@ def generate_modules_rules(keyboard, filename): lines.append('') lines.append('OPT_DEFS += -DCOMMUNITY_MODULES_ENABLE=TRUE') for module in modules: - module_path = find_module_path(module) + module_path = unix_style_path(find_module_path(module)) if not module_path: raise FileNotFoundError(f"Module '{module}' not found.") lines.append('') diff --git a/lib/python/qmk/path.py b/lib/python/qmk/path.py index 61daad585f..c47ed18362 100644 --- a/lib/python/qmk/path.py +++ b/lib/python/qmk/path.py @@ -3,7 +3,7 @@ import logging import os import argparse -from pathlib import Path +from pathlib import Path, PureWindowsPath, PurePosixPath from qmk.constants import MAX_KEYBOARD_SUBFOLDERS, QMK_FIRMWARE, QMK_USERSPACE, HAS_QMK_USERSPACE from qmk.errors import NoSuchKeyboardError @@ -146,6 +146,28 @@ def normpath(path): return Path(os.environ['ORIG_CWD']) / path +def unix_style_path(path): + """Converts a Windows-style path with drive letter to a Unix path. + + Path().as_posix() normally returns the path with drive letter and forward slashes, so is inappropriate for `Makefile` paths. + + Passes through unadulterated if the path is not a Windows-style path. + + Args: + + path + The path to convert. + + Returns: + The input path converted to Unix format. + """ + if isinstance(path, PureWindowsPath): + p = list(path.parts) + p[0] = f'/{p[0][0].lower()}' # convert from `X:/` to `/x` + path = PurePosixPath(*p) + return path + + class FileType(argparse.FileType): def __init__(self, *args, **kwargs): # Use UTF8 by default for stdin diff --git a/modules/qmk/super_alt_tab/qmk_module.json b/modules/qmk/super_alt_tab/qmk_module.json new file mode 100644 index 0000000000..002f7fb69e --- /dev/null +++ b/modules/qmk/super_alt_tab/qmk_module.json @@ -0,0 +1,10 @@ +{ + "module_name": "Super Alt Tab", + "maintainer": "QMK Maintainers", + "keycodes": [ + { + "key": "COMMUNITY_MODULE_SUPER_ALT_TAB", + "aliases": ["CM_S_AT"] + } + ] +} diff --git a/modules/qmk/super_alt_tab/super_alt_tab.c b/modules/qmk/super_alt_tab/super_alt_tab.c new file mode 100644 index 0000000000..dfeb4b5773 --- /dev/null +++ b/modules/qmk/super_alt_tab/super_alt_tab.c @@ -0,0 +1,50 @@ +// Copyright 2025 Christopher Courtney, aka Drashna Jael're (@drashna) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +ASSERT_COMMUNITY_MODULES_MIN_API_VERSION(1, 0, 0); + +static bool is_alt_tab_active = false; +static uint16_t alt_tab_timer = 0; + +#ifndef COMMUNITY_MODULE_SUPER_ALT_TAB_TIMEOUT +# define COMMUNITY_MODULE_SUPER_ALT_TAB_TIMEOUT 1000 +#endif // COMMUNITY_MODULE_SUPER_ALT_TAB_TIMEOUT +#ifndef COMMUNITY_MODULE_SUPER_ALT_TAB_MODIFIER +# define COMMUNITY_MODULE_SUPER_ALT_TAB_MODIFIER MOD_LALT +#endif // COMMUNITY_MODULE_SUPER_ALT_TAB_MODIFIER +#ifndef COMMUNITY_MODULE_SUPER_ALT_TAB_KEY +# define COMMUNITY_MODULE_SUPER_ALT_TAB_KEY KC_TAB +#endif // COMMUNITY_MODULE_SUPER_ALT_TAB_KEY + +bool process_record_super_alt_tab(uint16_t keycode, keyrecord_t *record) { + if (!process_record_super_alt_tab_kb(keycode, record)) { + return false; + } + + switch (keycode) { // This will do most of the grunt work with the keycodes. + case COMMUNITY_MODULE_SUPER_ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_mods(COMMUNITY_MODULE_SUPER_ALT_TAB_MODIFIER); + } + alt_tab_timer = timer_read(); + register_code(COMMUNITY_MODULE_SUPER_ALT_TAB_KEY); + } else { + unregister_code(COMMUNITY_MODULE_SUPER_ALT_TAB_KEY); + } + break; + } + return true; +} + +void housekeeping_task_super_alt_tab(void) { + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > COMMUNITY_MODULE_SUPER_ALT_TAB_TIMEOUT) { + unregister_mods(COMMUNITY_MODULE_SUPER_ALT_TAB_MODIFIER); + is_alt_tab_active = false; + } + } +} diff --git a/quantum/keycode_string.c b/quantum/keycode_string.c new file mode 100644 index 0000000000..18044f2ef6 --- /dev/null +++ b/quantum/keycode_string.c @@ -0,0 +1,564 @@ +// Copyright 2024-2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "keycode_string.h" + +#include <string.h> +#include "bitwise.h" +#include "keycode.h" +#include "progmem.h" +#include "quantum_keycodes.h" +#include "util.h" + +typedef int_fast8_t index_t; + +// clang-format off +/** Packs a 7-char keycode name, ignoring the third char, as 3 words. */ +#define KEYCODE_NAME7(c0, c1, unused_c2, c3, c4, c5, c6) \ + ((uint16_t)c0) | (((uint16_t)c1) << 8), \ + ((uint16_t)c3) | (((uint16_t)c4) << 8), \ + ((uint16_t)c5) | (((uint16_t)c6) << 8) + +/** + * @brief Names of some common keycodes. + * + * Each (keycode, name) entry is stored flat in 8 bytes in PROGMEM. Names in + * this table must be at most 7 chars long and have an underscore '_' for the + * third char. This underscore is assumed and not actually stored. + * + * To save memory, feature-specific key entries are ifdef'd to include them only + * when their feature is enabled. + */ +static const uint16_t common_names[] PROGMEM = { + KC_TRNS, KEYCODE_NAME7('K', 'C', '_', 'T', 'R', 'N', 'S'), + KC_ENT , KEYCODE_NAME7('K', 'C', '_', 'E', 'N', 'T', 0 ), + KC_ESC , KEYCODE_NAME7('K', 'C', '_', 'E', 'S', 'C', 0 ), + KC_BSPC, KEYCODE_NAME7('K', 'C', '_', 'B', 'S', 'P', 'C'), + KC_TAB , KEYCODE_NAME7('K', 'C', '_', 'T', 'A', 'B', 0 ), + KC_SPC , KEYCODE_NAME7('K', 'C', '_', 'S', 'P', 'C', 0 ), + KC_MINS, KEYCODE_NAME7('K', 'C', '_', 'M', 'I', 'N', 'S'), + KC_EQL , KEYCODE_NAME7('K', 'C', '_', 'E', 'Q', 'L', 0 ), + KC_LBRC, KEYCODE_NAME7('K', 'C', '_', 'L', 'B', 'R', 'C'), + KC_RBRC, KEYCODE_NAME7('K', 'C', '_', 'R', 'B', 'R', 'C'), + KC_BSLS, KEYCODE_NAME7('K', 'C', '_', 'B', 'S', 'L', 'S'), + KC_NUHS, KEYCODE_NAME7('K', 'C', '_', 'N', 'U', 'H', 'S'), + KC_SCLN, KEYCODE_NAME7('K', 'C', '_', 'S', 'C', 'L', 'N'), + KC_QUOT, KEYCODE_NAME7('K', 'C', '_', 'Q', 'U', 'O', 'T'), + KC_GRV , KEYCODE_NAME7('K', 'C', '_', 'G', 'R', 'V', 0 ), + KC_COMM, KEYCODE_NAME7('K', 'C', '_', 'C', 'O', 'M', 'M'), + KC_DOT , KEYCODE_NAME7('K', 'C', '_', 'D', 'O', 'T', 0 ), + KC_SLSH, KEYCODE_NAME7('K', 'C', '_', 'S', 'L', 'S', 'H'), + KC_CAPS, KEYCODE_NAME7('K', 'C', '_', 'C', 'A', 'P', 'S'), + KC_PSCR, KEYCODE_NAME7('K', 'C', '_', 'P', 'S', 'C', 'R'), + KC_PAUS, KEYCODE_NAME7('K', 'C', '_', 'P', 'A', 'U', 'S'), + KC_INS , KEYCODE_NAME7('K', 'C', '_', 'I', 'N', 'S', 0 ), + KC_HOME, KEYCODE_NAME7('K', 'C', '_', 'H', 'O', 'M', 'E'), + KC_PGUP, KEYCODE_NAME7('K', 'C', '_', 'P', 'G', 'U', 'P'), + KC_DEL , KEYCODE_NAME7('K', 'C', '_', 'D', 'E', 'L', 0 ), + KC_END , KEYCODE_NAME7('K', 'C', '_', 'E', 'N', 'D', 0 ), + KC_PGDN, KEYCODE_NAME7('K', 'C', '_', 'P', 'G', 'D', 'N'), + KC_RGHT, KEYCODE_NAME7('K', 'C', '_', 'R', 'G', 'H', 'T'), + KC_LEFT, KEYCODE_NAME7('K', 'C', '_', 'L', 'E', 'F', 'T'), + KC_DOWN, KEYCODE_NAME7('K', 'C', '_', 'D', 'O', 'W', 'N'), + KC_UP , KEYCODE_NAME7('K', 'C', '_', 'U', 'P', 0 , 0 ), + KC_NUBS, KEYCODE_NAME7('K', 'C', '_', 'N', 'U', 'B', 'S'), + KC_HYPR, KEYCODE_NAME7('K', 'C', '_', 'H', 'Y', 'P', 'R'), + KC_MEH , KEYCODE_NAME7('K', 'C', '_', 'M', 'E', 'H', 0 ), +#ifdef EXTRAKEY_ENABLE + KC_WHOM, KEYCODE_NAME7('K', 'C', '_', 'W', 'H', 'O', 'M'), + KC_WBAK, KEYCODE_NAME7('K', 'C', '_', 'W', 'B', 'A', 'K'), + KC_WFWD, KEYCODE_NAME7('K', 'C', '_', 'W', 'F', 'W', 'D'), + KC_WSTP, KEYCODE_NAME7('K', 'C', '_', 'W', 'S', 'T', 'P'), + KC_WREF, KEYCODE_NAME7('K', 'C', '_', 'W', 'R', 'E', 'F'), + KC_MNXT, KEYCODE_NAME7('K', 'C', '_', 'M', 'N', 'X', 'T'), + KC_MPRV, KEYCODE_NAME7('K', 'C', '_', 'M', 'P', 'R', 'V'), + KC_MPLY, KEYCODE_NAME7('K', 'C', '_', 'M', 'P', 'L', 'Y'), + KC_MUTE, KEYCODE_NAME7('K', 'C', '_', 'M', 'U', 'T', 'E'), + KC_VOLU, KEYCODE_NAME7('K', 'C', '_', 'V', 'O', 'L', 'U'), + KC_VOLD, KEYCODE_NAME7('K', 'C', '_', 'V', 'O', 'L', 'D'), +#endif // EXTRAKEY_ENABLE +#ifdef MOUSEKEY_ENABLE + MS_LEFT, KEYCODE_NAME7('M', 'S', '_', 'L', 'E', 'F', 'T'), + MS_RGHT, KEYCODE_NAME7('M', 'S', '_', 'R', 'G', 'H', 'T'), + MS_UP , KEYCODE_NAME7('M', 'S', '_', 'U', 'P', 0 , 0 ), + MS_DOWN, KEYCODE_NAME7('M', 'S', '_', 'D', 'O', 'W', 'N'), + MS_WHLL, KEYCODE_NAME7('M', 'S', '_', 'W', 'H', 'L', 'L'), + MS_WHLR, KEYCODE_NAME7('M', 'S', '_', 'W', 'H', 'L', 'R'), + MS_WHLU, KEYCODE_NAME7('M', 'S', '_', 'W', 'H', 'L', 'U'), + MS_WHLD, KEYCODE_NAME7('M', 'S', '_', 'W', 'H', 'L', 'D'), +#endif // MOUSEKEY_ENABLE +#ifdef SWAP_HANDS_ENABLE + SH_ON , KEYCODE_NAME7('S', 'H', '_', 'O', 'N', 0 , 0 ), + SH_OFF , KEYCODE_NAME7('S', 'H', '_', 'O', 'F', 'F', 0 ), + SH_MON , KEYCODE_NAME7('S', 'H', '_', 'M', 'O', 'N', 0 ), + SH_MOFF, KEYCODE_NAME7('S', 'H', '_', 'M', 'O', 'F', 'F'), + SH_TOGG, KEYCODE_NAME7('S', 'H', '_', 'T', 'O', 'G', 'G'), + SH_TT , KEYCODE_NAME7('S', 'H', '_', 'T', 'T', 0 , 0 ), +# if !defined(NO_ACTION_ONESHOT) + SH_OS , KEYCODE_NAME7('S', 'H', '_', 'O', 'S', 0 , 0 ), +# endif // !defined(NO_ACTION_ONESHOT) +#endif // SWAP_HANDS_ENABLE +#ifdef LEADER_ENABLE + QK_LEAD, KEYCODE_NAME7('Q', 'K', '_', 'L', 'E', 'A', 'D'), +#endif // LEADER_ENABLE +#ifdef KEY_LOCK_ENABLE + QK_LOCK, KEYCODE_NAME7('Q', 'K', '_', 'L', 'O', 'C', 'K'), +#endif // KEY_LOCK_ENABLE +#ifdef TRI_LAYER_ENABLE + TL_LOWR, KEYCODE_NAME7('T', 'L', '_', 'L', 'O', 'W', 'R'), + TL_UPPR, KEYCODE_NAME7('T', 'L', '_', 'U', 'P', 'P', 'R'), +#endif // TRI_LAYER_ENABLE +#ifdef GRAVE_ESC_ENABLE + QK_GESC, KEYCODE_NAME7('Q', 'K', '_', 'G', 'E', 'S', 'C'), +#endif // GRAVE_ESC_ENABLE +#ifdef CAPS_WORD_ENABLE + CW_TOGG, KEYCODE_NAME7('C', 'W', '_', 'T', 'O', 'G', 'G'), +#endif // CAPS_WORD_ENABLE +#ifdef SECURE_ENABLE + SE_LOCK, KEYCODE_NAME7('S', 'E', '_', 'L', 'O', 'C', 'K'), + SE_UNLK, KEYCODE_NAME7('S', 'E', '_', 'U', 'N', 'L', 'K'), + SE_TOGG, KEYCODE_NAME7('S', 'E', '_', 'T', 'O', 'G', 'G'), + SE_REQ , KEYCODE_NAME7('S', 'E', '_', 'R', 'E', 'Q', 0 ), +#endif // SECURE_ENABLE +#ifdef LAYER_LOCK_ENABLE + QK_LLCK, KEYCODE_NAME7('Q', 'K', '_', 'L', 'L', 'C', 'K'), +#endif // LAYER_LOCK_ENABLE + EE_CLR , KEYCODE_NAME7('E', 'E', '_', 'C', 'L', 'R', 0 ), + QK_BOOT, KEYCODE_NAME7('Q', 'K', '_', 'B', 'O', 'O', 'T'), + DB_TOGG, KEYCODE_NAME7('D', 'B', '_', 'T', 'O', 'G', 'G'), +}; +// clang-format on + +/** Users can override this to define names of additional keycodes. */ +__attribute__((weak)) const keycode_string_name_t* keycode_string_names_data_user = NULL; +__attribute__((weak)) uint16_t keycode_string_names_size_user = 0; +/** Keyboard vendors can override this to define names of additional keycodes. */ +__attribute__((weak)) const keycode_string_name_t* keycode_string_names_data_kb = NULL; +__attribute__((weak)) uint16_t keycode_string_names_size_kb = 0; +/** Names of the 4 mods on each hand. */ +static const char mod_names[] PROGMEM = "CTL\0SFT\0ALT\0GUI"; +/** Internal buffer for holding a stringified keycode. */ +static char buffer[32]; +#define BUFFER_MAX_LEN (sizeof(buffer) - 1) +static index_t buffer_len; + +/** Finds the name of a keycode in `common_names` or returns NULL. */ +static const char* search_common_names(uint16_t keycode) { + static uint8_t buffer[8]; + + for (int_fast16_t offset = 0; offset < ARRAY_SIZE(common_names); offset += 4) { + if (keycode == pgm_read_word(common_names + offset)) { + const uint16_t w0 = pgm_read_word(common_names + offset + 1); + const uint16_t w1 = pgm_read_word(common_names + offset + 2); + const uint16_t w2 = pgm_read_word(common_names + offset + 3); + buffer[0] = (uint8_t)w0; + buffer[1] = (uint8_t)(w0 >> 8); + buffer[2] = '_'; + buffer[3] = (uint8_t)w1; + buffer[4] = (uint8_t)(w1 >> 8); + buffer[5] = (uint8_t)w2; + buffer[6] = (uint8_t)(w2 >> 8); + buffer[7] = 0; + return (const char*)buffer; + } + } + + return NULL; +} + +/** + * @brief Finds the name of a keycode in table or returns NULL. + * + * @param data Pointer to table to be searched. + * @param size Numer of entries in the table. + * @return Name string for the keycode, or NULL if not found. + */ +static const char* search_table(const keycode_string_name_t* data, uint16_t size, uint16_t keycode) { + if (data != NULL) { + for (uint16_t i = 0; i < size; ++i) { + if (data[i].keycode == keycode) { + return data[i].name; + } + } + } + return NULL; +} + +/** Formats `number` in `base`, either 10 or 16. */ +static char* number_string(uint16_t number, int8_t base) { + static char result[7]; + result[sizeof(result) - 1] = '\0'; + index_t i = sizeof(result) - 1; + do { + const uint8_t digit = number % base; + number /= base; + result[--i] = (digit < 10) ? (char)(digit + UINT8_C('0')) : (char)(digit + (UINT8_C('A') - 10)); + } while (number > 0 && i > 0); + + if (base == 16 && i >= 2) { + result[--i] = 'x'; + result[--i] = '0'; + } + return result + i; +} + +/** Appends `str` to `buffer`, truncating if the result would overflow. */ +static void append(const char* str) { + char* dest = buffer + buffer_len; + index_t i; + for (i = 0; buffer_len + i < BUFFER_MAX_LEN && str[i]; ++i) { + dest[i] = str[i]; + } + buffer_len += i; + buffer[buffer_len] = '\0'; +} + +/** Same as append(), but where `str` is a PROGMEM string. */ +static void append_P(const char* str) { + char* dest = buffer + buffer_len; + index_t i; + for (i = 0; buffer_len + i < BUFFER_MAX_LEN; ++i) { + const char c = pgm_read_byte(&str[i]); + if (c == '\0') { + break; + } + dest[i] = c; + } + buffer_len += i; + buffer[buffer_len] = '\0'; +} + +/** Appends a single char to `buffer` if there is space. */ +static void append_char(char c) { + if (buffer_len < BUFFER_MAX_LEN) { + buffer[buffer_len] = c; + buffer[++buffer_len] = '\0'; + } +} + +/** Formats `number` in `base`, either 10 or 16, and appends it to `buffer`. */ +static void append_number(uint16_t number, int8_t base) { + append(number_string(number, base)); +} + +/** Stringifies 5-bit mods and appends it to `buffer`. */ +static void append_5_bit_mods(uint8_t mods) { + const bool is_rhs = mods > 15; + const uint8_t csag = mods & 15; + if (csag != 0 && (csag & (csag - 1)) == 0) { // One mod is set. + append_P(PSTR("MOD_")); + append_char(is_rhs ? 'R' : 'L'); + append_P(&mod_names[4 * biton(csag)]); + } else { // Fallback: write the mod as a hex value. + append_number(mods, 16); + } +} + +/** + * @brief Writes a keycode of the format `name` + "(" + `param` + ")". + * @note `name` is a PROGMEM string, `param` is not. + */ +static void append_unary_keycode(const char* name, const char* param) { + append_P(name); + append_char('('); + append(param); + append_char(')'); +} + +/** + * @brief Writes a keycode of the format `name` + `number`. + * @note `name` is a PROGMEM string. + */ +static void append_numbered_keycode(const char* name, uint16_t number) { + append_P(name); + append_number(number, 10); +} + +/** Stringifies `keycode` and appends it to `buffer`. */ +static void append_keycode(uint16_t keycode) { + // In case there is overlap among tables, search `keycode_string_names_user` + // first so that it takes precedence. + const char* keycode_name = search_table(keycode_string_names_data_user, keycode_string_names_size_user, keycode); + if (keycode_name) { + append(keycode_name); + return; + } + keycode_name = search_table(keycode_string_names_data_kb, keycode_string_names_size_kb, keycode); + if (keycode_name) { + append(keycode_name); + return; + } + keycode_name = search_common_names(keycode); + if (keycode_name) { + append(keycode_name); + return; + } + + if (keycode <= 255) { // Basic keycodes. + switch (keycode) { + // Modifiers KC_LSFT, KC_RCTL, etc. + case MODIFIER_KEYCODE_RANGE: { + const uint8_t i = keycode - KC_LCTL; + const bool is_rhs = i > 3; + append_P(PSTR("KC_")); + append_char(is_rhs ? 'R' : 'L'); + append_P(&mod_names[4 * (i & 3)]); + } + return; + + // Letters A-Z. + case KC_A ... KC_Z: + append_P(PSTR("KC_")); + append_char((char)(keycode + (UINT8_C('A') - KC_A))); + return; + + // Digits 0-9 (NOTE: Unlike the ASCII order, KC_0 comes *after* KC_9.) + case KC_1 ... KC_0: + append_numbered_keycode(PSTR("KC_"), (keycode - (KC_1 - 1)) % 10); + return; + + // Keypad digits. + case KC_KP_1 ... KC_KP_0: + append_numbered_keycode(PSTR("KC_KP_"), (keycode - (KC_KP_1 - 1)) % 10); + return; + + // Function keys. F1-F12 and F13-F24 are coded in separate ranges. + case KC_F1 ... KC_F12: + append_numbered_keycode(PSTR("KC_F"), keycode - (KC_F1 - 1)); + return; + + case KC_F13 ... KC_F24: + append_numbered_keycode(PSTR("KC_F"), keycode - (KC_F13 - 13)); + return; + } + } + + // clang-format off + switch (keycode) { + // A modified keycode, like S(KC_1) for Shift + 1 = !. This implementation + // only covers modified keycodes where one modifier is applied, e.g. a + // Ctrl + Shift + kc or Hyper + kc keycode is not formatted. + case QK_MODS ... QK_MODS_MAX: { + uint8_t mods = QK_MODS_GET_MODS(keycode); + const bool is_rhs = mods > 15; + mods &= 15; + if (mods != 0 && (mods & (mods - 1)) == 0) { // One mod is set. + const char* name = &mod_names[4 * biton(mods)]; + if (is_rhs) { + append_char('R'); + append_P(name); + } else { + append_char(pgm_read_byte(&name[0])); + } + append_char('('); + append_keycode(QK_MODS_GET_BASIC_KEYCODE(keycode)); + append_char(')'); + return; + } + } break; + +#if !defined(NO_ACTION_ONESHOT) + case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX: // One-shot mod OSM(mod) key. + append_P(PSTR("OSM(")); + append_5_bit_mods(QK_ONE_SHOT_MOD_GET_MODS(keycode)); + append_char(')'); + return; +#endif // !defined(NO_ACTION_ONESHOT) + + // Various layer switch keys. + case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: // Layer-tap LT(layer,kc) key. + append_P(PSTR("LT(")); + append_number(QK_LAYER_TAP_GET_LAYER(keycode), 10); + append_char(','); + append_keycode(QK_LAYER_TAP_GET_TAP_KEYCODE(keycode)); + append_char(')'); + return; + + case QK_LAYER_MOD ... QK_LAYER_MOD_MAX: // LM(layer,mod) key. + append_P(PSTR("LM(")); + append_number(QK_LAYER_MOD_GET_LAYER(keycode), 10); + append_char(','); + append_5_bit_mods(QK_LAYER_MOD_GET_MODS(keycode)); + append_char(')'); + return; + + case QK_TO ... QK_TO_MAX: // TO(layer) key. + append_unary_keycode(PSTR("TO"), number_string(QK_TO_GET_LAYER(keycode), 10)); + return; + + case QK_MOMENTARY ... QK_MOMENTARY_MAX: // MO(layer) key. + append_unary_keycode(PSTR("MO"), number_string(QK_MOMENTARY_GET_LAYER(keycode), 10)); + return; + + case QK_DEF_LAYER ... QK_DEF_LAYER_MAX: // DF(layer) key. + append_unary_keycode(PSTR("DF"), number_string(QK_DEF_LAYER_GET_LAYER(keycode), 10)); + return; + + case QK_TOGGLE_LAYER ... QK_TOGGLE_LAYER_MAX: // TG(layer) key. + append_unary_keycode(PSTR("TG"), number_string(QK_TOGGLE_LAYER_GET_LAYER(keycode), 10)); + return; + +#if !defined(NO_ACTION_ONESHOT) + case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX: // OSL(layer) key. + append_unary_keycode(PSTR("OSL"), number_string(QK_ONE_SHOT_LAYER_GET_LAYER(keycode), 10)); + return; +#endif // !defined(NO_ACTION_ONESHOT) + + case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: // TT(layer) key. + append_unary_keycode(PSTR("TT"), number_string(QK_LAYER_TAP_TOGGLE_GET_LAYER(keycode), 10)); + return; + + case QK_PERSISTENT_DEF_LAYER ... QK_PERSISTENT_DEF_LAYER_MAX: // PDF(layer) key. + append_unary_keycode(PSTR("PDF"), number_string(QK_PERSISTENT_DEF_LAYER_GET_LAYER(keycode), 10)); + return; + + // Mod-tap MT(mod,kc) key. This implementation formats the MT keys where + // one modifier is applied. For MT keys with multiple modifiers, the mod + // arg is written numerically as a hex code. + case QK_MOD_TAP ... QK_MOD_TAP_MAX: { + uint8_t mods = QK_MOD_TAP_GET_MODS(keycode); + const bool is_rhs = mods > 15; + const uint8_t csag = mods & 15; + if (csag != 0 && (csag & (csag - 1)) == 0) { // One mod is set. + append_char(is_rhs ? 'R' : 'L'); + append_P(&mod_names[4 * biton(csag)]); + append_P(PSTR("_T(")); + } else if (mods == MOD_HYPR) { + append_P(PSTR("HYPR_T(")); + } else if (mods == MOD_MEH) { + append_P(PSTR("MEH_T(")); + } else { + append_P(PSTR("MT(")); + append_number(mods, 16); + append_char(','); + } + append_keycode(QK_MOD_TAP_GET_TAP_KEYCODE(keycode)); + append_char(')'); + } return; + + case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: // Tap dance TD(i) key. + append_unary_keycode(PSTR("TD"), number_string(QK_TAP_DANCE_GET_INDEX(keycode), 10)); + return; + +#ifdef UNICODE_ENABLE + case QK_UNICODE ... QK_UNICODE_MAX: // Unicode UC(codepoint) key. + append_unary_keycode(PSTR("UC"), number_string(QK_UNICODE_GET_CODE_POINT(keycode), 16)); + return; +#elif defined(UNICODEMAP_ENABLE) + case QK_UNICODEMAP ... QK_UNICODEMAP_MAX: // Unicode Map UM(i) key. + append_unary_keycode(PSTR("UM"), number_string(QK_UNICODEMAP_GET_INDEX(keycode), 10)); + return; + + case QK_UNICODEMAP_PAIR ... QK_UNICODEMAP_PAIR_MAX: { // UP(i,j) key. + const uint8_t i = QK_UNICODEMAP_PAIR_GET_UNSHIFTED_INDEX(keycode); + const uint8_t j = QK_UNICODEMAP_PAIR_GET_SHIFTED_INDEX(keycode); + append_P(PSTR("UP(")); + append_number(i, 10); + append_char(','); + append_number(j, 10); + append_char(')'); + } return; +#endif +#ifdef MOUSEKEY_ENABLE + case MS_BTN1 ... MS_BTN8: // Mouse button keycode. + append_numbered_keycode(PSTR("MS_BTN"), keycode - (MS_BTN1 - 1)); + return; +#endif // MOUSEKEY_ENABLE +#ifdef SWAP_HANDS_ENABLE + case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX: // Swap Hands SH_T(kc) key. + if (!IS_SWAP_HANDS_KEYCODE(keycode)) { + append_P(PSTR("SH_T(")); + append_keycode(QK_SWAP_HANDS_GET_TAP_KEYCODE(keycode)); + append_char(')'); + return; + } + break; +#endif // SWAP_HANDS_ENABLE +#ifdef JOYSTICK_ENABLE + case JOYSTICK_KEYCODE_RANGE: // Joystick JS_ key. + append_numbered_keycode(PSTR("JS_"), keycode - JS_0); + return; +#endif // JOYSTICK_ENABLE +#ifdef PROGRAMMABLE_BUTTON_ENABLE + case PROGRAMMABLE_BUTTON_KEYCODE_RANGE: // Programmable button PB_ key. + append_numbered_keycode(PSTR("PB_"), keycode - (PB_1 - 1)); + return; +#endif // PROGRAMMABLE_BUTTON_ENABLE + + case MACRO_KEYCODE_RANGE: // Macro range MC_ keycode. + append_numbered_keycode(PSTR("MC_"), keycode - MC_0); + return; + + case KB_KEYCODE_RANGE: // Keyboard range keycode. + append_numbered_keycode(PSTR("QK_KB_"), keycode - QK_KB_0); + return; + + case USER_KEYCODE_RANGE: // User range keycode. + append_numbered_keycode(PSTR("QK_USER_"), keycode - QK_USER_0); + return; + + // It would take a nontrivial amount of string data to cover some + // feature-specific keycodes, such as those for MIDI and lighting. As a + // fallback while still providing some information, we stringify + // remaining keys in known code ranges as "QK_<feature>+<number>". +#ifdef MAGIC_ENABLE + case MAGIC_KEYCODE_RANGE: + append_numbered_keycode(PSTR("QK_MAGIC+"), keycode - QK_MAGIC); + return; +#endif // MAGIC_ENABLE +#ifdef MIDI_ENABLE + case MIDI_KEYCODE_RANGE: + append_numbered_keycode(PSTR("QK_MIDI+"), keycode - QK_MIDI); + return; +#endif // MIDI_ENABLE +#ifdef SEQUENCER_ENABLE + case SEQUENCER_KEYCODE_RANGE: + append_numbered_keycode(PSTR("QK_SEQUENCER+"), keycode - QK_SEQUENCER); + return; +#endif // SEQUENCER_ENABLE +#ifdef AUDIO_ENABLE + case AUDIO_KEYCODE_RANGE: + append_numbered_keycode(PSTR("QK_AUDIO+"), keycode - QK_AUDIO); + return; +#endif // AUDIO_ENABLE +#if defined(BACKLIGHT_ENABLE) || defined(LED_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLED) || defined(RGB_MATRIX_ENABLE) // Lighting-related features. + case QK_LIGHTING ... QK_LIGHTING_MAX: + append_numbered_keycode(PSTR("QK_LIGHTING+"), keycode - QK_LIGHTING); + return; +#endif // defined(BACKLIGHT_ENABLE) || defined(LED_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLED) || defined(RGB_MATRIX_ENABLE) +#ifdef STENO_ENABLE + case STENO_KEYCODE_RANGE: + append_numbered_keycode(PSTR("QK_STENO+"), keycode - QK_STENO); + return; +#endif // AUDIO_ENABLE +#ifdef BLUETOOTH_ENABLE + case CONNECTION_KEYCODE_RANGE: + append_numbered_keycode(PSTR("QK_CONNECTION+"), keycode - QK_CONNECTION); + return; +#endif // BLUETOOTH_ENABLE + case QUANTUM_KEYCODE_RANGE: + append_numbered_keycode(PSTR("QK_QUANTUM+"), keycode - QK_QUANTUM); + return; + } + // clang-format on + + append_number(keycode, 16); // Fallback: write keycode as hex value. +} + +const char* get_keycode_string(uint16_t keycode) { + buffer_len = 0; + buffer[0] = '\0'; + append_keycode(keycode); + return buffer; +} diff --git a/quantum/keycode_string.h b/quantum/keycode_string.h new file mode 100644 index 0000000000..1315613a80 --- /dev/null +++ b/quantum/keycode_string.h @@ -0,0 +1,134 @@ +// Copyright 2024-2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include <stdint.h> + +#if KEYCODE_STRING_ENABLE + +/** + * @brief Formats a QMK keycode as a human-readable string. + * + * Given a keycode, like `KC_A`, this function returns a formatted string, like + * "KC_A". This is useful for debugging and diagnostics so that keys are more + * easily identified than they would be by raw numerical codes. + * + * @note The returned char* string should be used right away. The string memory + * is reused and will be overwritten by the next call to `keycode_string()`. + * + * Many common QMK keycodes are understood by this function, but not all. + * Recognized keycodes include: + * + * - Most basic keycodes, including letters `KC_A` - `KC_Z`, digits `KC_0` - + * `KC_9`, function keys `KC_F1` - `KC_F24`, and modifiers like `KC_LSFT`. + * + * - Modified basic keycodes, like `S(KC_1)` (Shift + 1 = !). + * + * - `MO`, `TO`, `TG`, `OSL`, `LM(layer,mod)`, `LT(layer,kc)` layer switches. + * + * - One-shot mod `OSM(mod)` keycodes. + * + * - Mod-tap `MT(mod, kc)` keycodes. + * + * - Tap dance keycodes `TD(i)`. + * + * - Swap hands keycodes `SH_T(kc)`, `SH_TOGG`, etc. + * + * - Joystick keycodes `JS_n`. + * + * - Programmable button keycodes `PB_n`. + * + * - Unicode `UC(codepoint)` and Unicode Map `UM(i)` and `UP(i,j)` keycodes. + * + * - Keyboard range keycodes `QK_KB_*`. + * + * - User range (SAFE_RANGE) keycodes `QK_USER_*`. + * + * Keycodes involving mods like `OSM`, `LM`, `MT` are fully supported only where + * a single mod is applied. + * + * Unrecognized keycodes are printed numerically as hex values like `0x1ABC`. + * + * Optionally, use `keycode_string_names_user` or `keycode_string_names_kb` to + * define names for additional keycodes or override how any of the above are + * formatted. + * + * @param keycode QMK keycode. + * @return Stringified keycode. + */ +const char* get_keycode_string(uint16_t keycode); + +/** Defines a human-readable name for a keycode. */ +typedef struct { + uint16_t keycode; + const char* name; +} keycode_string_name_t; + +// clang-format off +/** + * @brief Defines names for additional keycodes for `get_keycode_string()`. + * + * Define `KEYCODE_STRING_NAMES_USER` in your keymap.c to add names for + * additional keycodes to `keycode_string()`. This table may also be used to + * override how `keycode_string()` formats a keycode. For example, supposing + * keymap.c defines `MYMACRO1` and `MYMACRO2` as custom keycodes: + * + * KEYCODE_STRING_NAMES_USER( + * KEYCODE_STRING_NAME(MYMACRO1), + * KEYCODE_STRING_NAME(MYMACRO2), + * KEYCODE_STRING_NAME(KC_EXLM), + * ); + * + * The above defines names for `MYMACRO1` and `MYMACRO2`, and overrides + * `KC_EXLM` to format as "KC_EXLM" instead of the default "S(KC_1)". + */ +# define KEYCODE_STRING_NAMES_USER(...) \ + static const keycode_string_name_t keycode_string_names_user[] = {__VA_ARGS__}; \ + uint16_t keycode_string_names_size_user = \ + sizeof(keycode_string_names_user) / sizeof(keycode_string_name_t); \ + const keycode_string_name_t* keycode_string_names_data_user = \ + keycode_string_names_user + +/** Same as above, but defines keycode string names at the keyboard level. */ +# define KEYCODE_STRING_NAMES_KB(...) \ + static const keycode_string_name_t keycode_string_names_kb[] = {__VA_ARGS__}; \ + uint16_t keycode_string_names_size_kb = \ + sizeof(keycode_string_names_kb) / sizeof(keycode_string_name_t); \ + const keycode_string_name_t* keycode_string_names_data_kb = \ + keycode_string_names_kb + +/** Helper to define a keycode_string_name_t. */ +# define KEYCODE_STRING_NAME(kc) \ + { (kc), #kc } +// clang-format on + +extern const keycode_string_name_t* keycode_string_names_data_user; +extern uint16_t keycode_string_names_size_user; +extern const keycode_string_name_t* keycode_string_names_data_kb; +extern uint16_t keycode_string_names_size_kb; + +#else + +// When keycode_string is disabled, fall back to printing keycodes numerically +// as decimal values, using get_u16_str() from quantum.c. +# define get_keycode_string(kc) get_u16_str(kc, ' ') + +const char* get_u16_str(uint16_t curr_num, char curr_pad); + +# define KEYCODE_STRING_NAMES_USER(...) +# define KEYCODE_STRING_NAMES_KB(...) +# define KEYCODE_STRING_NAME(kc) + +#endif // KEYCODE_STRING_ENABLE diff --git a/quantum/quantum.h b/quantum/quantum.h index 59a415ead4..3a994e9a03 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -39,6 +39,7 @@ #include "keymap_common.h" #include "quantum_keycodes.h" #include "keycode_config.h" +#include "keycode_string.h" #include "action_layer.h" #include "eeconfig.h" #include "bootloader.h" diff --git a/requirements.txt b/requirements.txt index fbee51ee57..68b05d64e6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ dotty-dict hid hjson jsonschema>=4 -milc>=1.4.2 +milc>=1.9.0 pygments pyserial pyusb diff --git a/tests/keycode_string/config.h b/tests/keycode_string/config.h new file mode 100644 index 0000000000..7fc76d7c2e --- /dev/null +++ b/tests/keycode_string/config.h @@ -0,0 +1,19 @@ +/* Copyright 2017 Fred Sundvik + * + * 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 "test_common.h" diff --git a/tests/keycode_string/test.mk b/tests/keycode_string/test.mk new file mode 100644 index 0000000000..aa255a1b6b --- /dev/null +++ b/tests/keycode_string/test.mk @@ -0,0 +1,22 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +EXTRAKEY_ENABLE = yes +KEYCODE_STRING_ENABLE = yes +KEY_LOCK_ENABLE = yes +MAGIC_ENABLE = yes +MOUSEKEY_ENABLE = yes +PROGRAMMABLE_BUTTON_ENABLE = yes +SECURE_ENABLE = yes +SWAP_HANDS_ENABLE = yes diff --git a/tests/keycode_string/test_keycode_string.cpp b/tests/keycode_string/test_keycode_string.cpp new file mode 100644 index 0000000000..e1dec70e7a --- /dev/null +++ b/tests/keycode_string/test_keycode_string.cpp @@ -0,0 +1,153 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include <iostream> + +#include "test_common.hpp" + +enum { + MYMACRO1 = SAFE_RANGE, + MYMACRO2, +}; + +// clang-format off +extern "C" { + +KEYCODE_STRING_NAMES_KB( + KEYCODE_STRING_NAME(MYMACRO1), +); + +KEYCODE_STRING_NAMES_USER( + KEYCODE_STRING_NAME(MYMACRO2), + KEYCODE_STRING_NAME(KC_EXLM), +); + +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, + {{9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, + {{9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, + {{9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, +}; + +} // extern "C" +// clang-format on + +class KeycodeStringTest : public TestFixture {}; + +TEST_F(KeycodeStringTest, get_keycode_string) { + struct TestParams { + uint16_t keycode; + std::string expected; + }; + for (const auto [keycode, expected] : std::vector<TestParams>({ + {KC_TRNS, "KC_TRNS"}, + {KC_ESC, "KC_ESC"}, + {KC_A, "KC_A"}, + {KC_Z, "KC_Z"}, + {KC_0, "KC_0"}, + {KC_9, "KC_9"}, + {KC_KP_0, "KC_KP_0"}, + {KC_KP_9, "KC_KP_9"}, + {KC_LBRC, "KC_LBRC"}, + {KC_NUHS, "KC_NUHS"}, + {KC_NUBS, "KC_NUBS"}, + {KC_CAPS, "KC_CAPS"}, + {DB_TOGG, "DB_TOGG"}, + {KC_LCTL, "KC_LCTL"}, + {KC_LSFT, "KC_LSFT"}, + {KC_RALT, "KC_RALT"}, + {KC_RGUI, "KC_RGUI"}, + {KC_UP, "KC_UP"}, + {KC_HYPR, "KC_HYPR"}, + {KC_MEH, "KC_MEH"}, + // F1-F24 keycodes. + {KC_F1, "KC_F1"}, + {KC_F12, "KC_F12"}, + {KC_F13, "KC_F13"}, + {KC_F24, "KC_F24"}, + // Macro keycodes. + {MC_0, "MC_0"}, + {MC_31, "MC_31"}, + // Keyboard range keycodes. + {QK_KB_0, "QK_KB_0"}, + {QK_KB_31, "QK_KB_31"}, + // User range keycodes. + {QK_USER_2, "QK_USER_2"}, + {QK_USER_31, "QK_USER_31"}, + // Modified keycodes. + {KC_COLN, "S(KC_SCLN)"}, + {C(KC_PGUP), "C(KC_PGUP)"}, + {RALT(KC_BSPC), "RALT(KC_BSPC)"}, + // One-shot mods. + {OSM(MOD_LSFT), "OSM(MOD_LSFT)"}, + {OSM(MOD_RGUI), "OSM(MOD_RGUI)"}, + {OSM(MOD_RCTL | MOD_RGUI), "OSM(0x19)"}, + // Layer switch keycodes. + {DF(2), "DF(2)"}, + {PDF(12), "PDF(12)"}, + {MO(3), "MO(3)"}, + {TO(0), "TO(0)"}, + {TT(1), "TT(1)"}, + {TG(3), "TG(3)"}, + {OSL(3), "OSL(3)"}, + {LM(3, MOD_RALT), "LM(3,MOD_RALT)"}, + {LT(15, KC_QUOT), "LT(15,KC_QUOT)"}, + // Tap dance keycodes. + {TD(0), "TD(0)"}, + {TD(31), "TD(31)"}, + // Mod-tap keycodes. + {LSFT_T(KC_ENT), "LSFT_T(KC_ENT)"}, + {RCTL_T(KC_RGHT), "RCTL_T(KC_RGHT)"}, + {HYPR_T(KC_GRV), "HYPR_T(KC_GRV)"}, + {MEH_T(KC_EQL), "MEH_T(KC_EQL)"}, + {RSA_T(KC_LBRC), "MT(0x16,KC_LBRC)"}, + // Extrakey keycodes. + {KC_WBAK, "KC_WBAK"}, + {KC_WFWD, "KC_WFWD"}, + {KC_WREF, "KC_WREF"}, + {KC_VOLU, "KC_VOLU"}, + {KC_VOLD, "KC_VOLD"}, + // Mouse Key keycodes. + {MS_LEFT, "MS_LEFT"}, + {MS_RGHT, "MS_RGHT"}, + {MS_UP, "MS_UP"}, + {MS_WHLU, "MS_WHLU"}, + {MS_WHLD, "MS_WHLD"}, + {MS_BTN1, "MS_BTN1"}, + {MS_BTN8, "MS_BTN8"}, + // Swap Hands keycodes. + {SH_MON, "SH_MON"}, + {SH_TOGG, "SH_TOGG"}, + {SH_T(KC_PSCR), "SH_T(KC_PSCR)"}, + // Secure keycodes. + {SE_LOCK, "SE_LOCK"}, + {SE_UNLK, "SE_UNLK"}, + {SE_TOGG, "SE_TOGG"}, + {SE_REQ, "SE_REQ"}, + // Programmable button keycodes. + {PB_1, "PB_1"}, + {PB_32, "PB_32"}, + // Magic button keycodes. + {QK_MAGIC + 7, "QK_MAGIC+7"}, + // Quantum keycodes. + {QK_LOCK, "QK_LOCK"}, + {QK_QUANTUM + 7, "QK_QUANTUM+7"}, + // Custom keycode names. + {MYMACRO1, "MYMACRO1"}, + {MYMACRO2, "MYMACRO2"}, + {KC_EXLM, "KC_EXLM"}, + })) { + EXPECT_EQ(get_keycode_string(keycode), expected) << "where keycode = 0x" << std::hex << keycode; + } +} |