diff --git a/.github/workflows/ci_builds.yml b/.github/workflows/ci_builds.yml new file mode 100644 index 000000000000..64c7678d5313 --- /dev/null +++ b/.github/workflows/ci_builds.yml @@ -0,0 +1,40 @@ +name: CI Builds + +permissions: + contents: read + +on: + push: + branches: + - master + - develop + +jobs: + ci_builds: + name: "CI Build" + runs-on: self-hosted + timeout-minutes: 1380 + + if: github.repository == 'qmk/qmk_firmware' + + strategy: + matrix: + keymap: + - default + - via + + container: qmkfm/qmk_cli + + steps: + - name: Disable safe.directory check + run : git config --global --add safe.directory '*' + + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install dependencies + run: pip3 install -r requirements.txt + + - name: Run `qmk mass-compile` (keymap ${{ matrix.keymap }}) + run: qmk mass-compile -j $(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null) -km ${{ matrix.keymap }} diff --git a/docs/feature_combo.md b/docs/feature_combo.md index 75c78c4cd42f..30adab3645b3 100644 --- a/docs/feature_combo.md +++ b/docs/feature_combo.md @@ -20,24 +20,28 @@ combo_t key_combos[COMBO_COUNT] = { This will send "Escape" if you hit the A and B keys, and Ctrl+Z when you hit the C and D keys. -As of [PR#8591](https://github.com/qmk/qmk_firmware/pull/8591/), it is possible to fire combos from ModTap keys and LayerTap keys. So in the above example you could have keys `LSFT_T(KC_A)` and `LT(_LAYER, KC_B)` and it would work. So Home Row Mods and Home Row Combos at same time is now a thing! +## Mod-Tap Support +[Mod-Tap](mod_tap.md) feature is also supported together with combos. You will need to use the full Mod-Tap keycode in the combo definition, e.g.: -It is also now possible to overlap combos. Before, with the example below both combos would activate when all three keys were pressed. Now only the three key combo will activate. +```c +const uint16_t PROGMEM test_combo1[] = {LSFT_T(KC_A), LT(1, KC_B), COMBO_END}; +``` + +## Overlapping Combos +It is possible to overlap combos. Before, with the example below both combos would activate when all three keys were pressed. Now only the three key combo will activate. ```c -const uint16_t PROGMEM test_combo1[] = {LSFT_T(KC_A), LT(_LAYER, KC_B), COMBO_END}; -const uint16_t PROGMEM test_combo2[] = {LSFT_T(KC_A), LT(_LAYER, KC_B), KC_C, COMBO_END}; +const uint16_t PROGMEM test_combo1[] = {LSFT_T(KC_A), LT(1, KC_B), COMBO_END}; +const uint16_t PROGMEM test_combo2[] = {LSFT_T(KC_A), LT(1, KC_B), KC_C, COMBO_END}; combo_t key_combos[COMBO_COUNT] = { COMBO(test_combo1, KC_ESC) COMBO(test_combo2, KC_TAB) }; ``` -Executing more complex keycodes like ModTaps and LayerTaps is now also possible. - ## Examples -If you want to add a list, then you'd use something like this: +A long list of combos can be defined in an `enum` list that ends with `COMBO_LENGTH` and you can leave `COMBO_COUNT` undefined: ```c enum combos { @@ -45,7 +49,9 @@ enum combos { JK_TAB, QW_SFT, SD_LAYER, + COMBO_LENGTH }; +uint16_t COMBO_LEN = COMBO_LENGTH; // remove the COMBO_COUNT define and use this instead! const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END}; const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; @@ -61,7 +67,6 @@ combo_t key_combos[COMBO_COUNT] = { ``` For a more complicated implementation, you can use the `process_combo_event` function to add custom handling. -Additionally, this example shows how you can leave `COMBO_COUNT` undefined. ```c enum combo_events { @@ -111,13 +116,13 @@ You can enable, disable and toggle the Combo feature on the fly. This is useful |`QK_COMBO_OFF` |`CM_OFF` |Turns off Combo feature | |`QK_COMBO_TOGGLE`|`CM_TOGG`|Toggles Combo feature on and off| -# Advanced Configuration +## Advanced Configuration These configuration settings can be set in your `config.h` file. -## Combo Term +### Combo Term By default, the timeout for the Combos to be recognized is set to 50ms. This can be changed if accidental combo misfires are happening or if you're having difficulties pressing keys at the same time. For instance, `#define COMBO_TERM 40` would set the timeout period for combos to 40ms. -## Buffer and state sizes +### Buffer and state sizes If you're using long combos, or you have a lot of overlapping combos, you may run into issues with this, as the buffers may not be large enough to accommodate what you're doing. In this case, you can configure the sizes of the buffers used. Be aware, larger combo sizes and larger buffers will increase memory usage! To configure the amount of keys a combo can be composed of, change the following: @@ -138,13 +143,13 @@ Processing combos has two buffers, one for the key presses, another for the comb | `#define COMBO_KEY_BUFFER_LENGTH 8` | 8 (the key amount `(EXTRA_)EXTRA_LONG_COMBOS` gives) | | `#define COMBO_BUFFER_LENGTH 4` | 4 | -## Modifier Combos +### Modifier Combos If a combo resolves to a Modifier, the window for processing the combo can be extended independently from normal combos. By default, this is disabled but can be enabled with `#define COMBO_MUST_HOLD_MODS`, and the time window can be configured with `#define COMBO_HOLD_TERM 150` (default: `TAPPING_TERM`). With `COMBO_MUST_HOLD_MODS`, you cannot tap the combo any more which makes the combo less prone to misfires. -## Strict key press order +### Strict key press order By defining `COMBO_MUST_PRESS_IN_ORDER` combos only activate when the keys are pressed in the same order as they are defined in the key array. -## Per Combo Timing, Holding, Tapping and Key Press Order +### Per Combo Timing, Holding, Tapping and Key Press Order For each combo, it is possible to configure the time window it has to pressed in, if it needs to be held down, if it needs to be tapped, or if its keys need to be pressed in order. For example, tap-only combos are useful if any (or all) of the underlying keys are mod-tap or layer-tap keys. When you tap the combo, you get the combo result. When you press the combo and hold it down, the combo doesn't activate. Instead the keys are processed separately as if the combo wasn't even there. @@ -234,7 +239,7 @@ bool get_combo_must_press_in_order(uint16_t combo_index, combo_t *combo) { } ``` -## Generic hook to (dis)allow a combo activation +### Generic hook to (dis)allow a combo activation By defining `COMBO_SHOULD_TRIGGER` and its companying function `bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode, keyrecord_t *record)` you can block or allow combos to activate on the conditions of your choice. For example, you could disallow some combos on the base layer and allow them on another. Or disable combos on the home row when a timer is running. @@ -254,7 +259,7 @@ bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode } ``` -## Variable Length Combos +### Variable Length Combos If you leave `COMBO_COUNT` undefined in `config.h`, it allows you to programmatically declare the size of the Combo data structure and avoid updating `COMBO_COUNT`. Instead a variable called `COMBO_LEN` has to be set. It can be set with something similar to the following in `keymap.c`: `uint16_t COMBO_LEN = ARRAY_SIZE(key_combos);` or by adding `COMBO_LENGTH` as the *last* entry in the combo enum and then `uint16_t COMBO_LEN = COMBO_LENGTH;` as such: ```c enum myCombos { @@ -266,26 +271,26 @@ uint16_t COMBO_LEN = COMBO_LENGTH; Regardless of the method used to declare `COMBO_LEN`, this also requires to convert the `combo_t key_combos[COMBO_COUNT] = {...};` line to `combo_t key_combos[] = {...};`. -## Combo timer +### Combo timer Normally, the timer is started on the first key press and then reset on every subsequent key press within the `COMBO_TERM`. Inputting combos is relaxed like this, but also slightly more prone to accidental misfires. The next two options alter the behaviour of the timer. -### `#define COMBO_STRICT_TIMER` +#### `#define COMBO_STRICT_TIMER` With `COMBO_STRICT_TIMER`, the timer is started only on the first key press. Inputting combos is now less relaxed; you need to make sure the full chord is pressed within the `COMBO_TERM`. Misfires are less common but if you type multiple combos fast, there is a chance that the latter ones might not activate properly. -### `#define COMBO_NO_TIMER` +#### `#define COMBO_NO_TIMER` By defining `COMBO_NO_TIMER`, the timer is disabled completely and combos are activated on the first key release. This also disables the "must hold" functionalities as they just wouldn't work at all. -## Customizable key releases +### Customizable key releases By defining `COMBO_PROCESS_KEY_RELEASE` and implementing the function `bool process_combo_key_release(uint16_t combo_index, combo_t *combo, uint8_t key_index, uint16_t keycode)`, you can run your custom code on each key release after a combo was activated. For example you could change the RGB colors, activate haptics, or alter the modifiers. @@ -322,13 +327,13 @@ bool process_combo_key_release(uint16_t combo_index, combo_t *combo, uint8_t key return false; } ``` -## Layer independent combos +### Layer independent combos If you, for example, use multiple base layers for different key layouts, one for QWERTY, and another one for Colemak, you might want your combos to work from the same key positions on all layers. Defining the same combos again for another layout is redundant and takes more memory. The solution is to just check the keycodes from one layer. With `#define COMBO_ONLY_FROM_LAYER 0` in config.h, the combos' keys are always checked from layer `0`, even if other layers are active. -### Combo reference layers by layer. +#### Combo reference layers by layer. If not using `COMBO_ONLY_FROM_LAYER` it is possible to specify a combo reference layer for any layer using the `combo_ref_from_layer` hook. @@ -385,7 +390,7 @@ In addition to the keycodes, there are a few functions that you can use to set t | `is_combo_enabled()` | Returns the status of the combo feature state (true or false) | -# Dictionary Management +## Dictionary Management Having 3 places to update when adding new combos or altering old ones does become cumbersome when you have a lot of combos. We can alleviate this with some magic! ... If you consider C macros magic. First, you need to add `VPATH += keyboards/gboards` to your `rules.mk`. Next, include the file `g/keymap_combo.h` in your `keymap.c`. diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md index 25f7473bda89..c095c8712fb6 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/feature_split_keyboard.md @@ -79,6 +79,16 @@ If you're using a custom transport (communication method), then you will also ne SPLIT_TRANSPORT = custom ``` +### Layout Macro + +Configuring your layout in a split keyboard works slightly differently to a non-split keyboard. Take for example the following layout. The top left numbers refer to the matrix row and column, and the bottom right are the order of the keys in the layout: + +![Physical layout](https://i.imgur.com/QeY6kMQ.png) + +Since the matrix scanning procedure operates on entire rows, it first populates the left half's rows, then the right half's. Thus, the matrix as QMK views it has double the rows instead of double the columns: + +![Matrix](https://i.imgur.com/4wjJzBU.png) + ### Setting Handedness By default, the firmware does not know which side is which; it needs some help to determine that. There are several ways to do this, listed in order of precedence. diff --git a/docs/newbs_building_firmware_workflow.md b/docs/newbs_building_firmware_workflow.md index 99b32f0b7139..e6895252aa55 100644 --- a/docs/newbs_building_firmware_workflow.md +++ b/docs/newbs_building_firmware_workflow.md @@ -106,6 +106,9 @@ jobs: steps: + - name: Disable git safe directory checks + run : git config --global --add safe.directory '*' + - name: Checkout QMK uses: actions/checkout@v3 with: diff --git a/docs/porting_your_keyboard_to_qmk.md b/docs/porting_your_keyboard_to_qmk.md index e6a3a72cda24..b0213a6d7005 100644 --- a/docs/porting_your_keyboard_to_qmk.md +++ b/docs/porting_your_keyboard_to_qmk.md @@ -150,6 +150,8 @@ In the above example, * It must conform to the [layout guidelines](hardware_keyboard_guidelines.md#ltkeyboard_namehgt) * `"matrix": [0, 0]` defines the electrical position +?> See also: [Split Keyboard Layout Macro](https://docs.qmk.fm/#/feature_split_keyboard?id=layout-macro) and [Matrix to Physical Layout](https://docs.qmk.fm/#/understanding_qmk?id=matrix-to-physical-layout-map). + ## Additional Configuration There are a lot of features that can be turned on or off, configured or tuned. Some of these have yet to be migrated over to [Data Driven Configuration](data_driven_config.md). The following sections cover the process for when an `info.json` option is unavailable. diff --git a/docs/pr_checklist.md b/docs/pr_checklist.md index 6fe94c0db143..bacb9480dae3 100644 --- a/docs/pr_checklist.md +++ b/docs/pr_checklist.md @@ -69,15 +69,25 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - If the keyboard has multiple electrical/switch layouts: - include a `LAYOUT_all` which specifies all possible layout positions in the electrical matrix - use alternate layout names for all other possible layouts, preferring community layout names if an equivalent is available (e.g. `LAYOUT_tkl_ansi`, `LAYOUT_ortho_4x4` etc.) + - Microcontroller and bootloader + - Diode Direction (if not using direct pins) + - the following are required to be configured in `info.json` if necessary + - Direct pin configuration + - Backlight Configuration (where applicable) + - Split keyboard configuration (where applicable) + - Encoder Configuration + - Bootmagic Configuration + - LED Indicator Configuration - `readme.md` - - standard template should be present -- [link to template](https://github.com/qmk/qmk_firmware/blob/master/data/templates/keyboard/readme.md) + - must follow the [template](https://github.com/qmk/qmk_firmware/blob/master/data/templates/keyboard/readme.md) - flash command is present, and has `:flash` at end - valid hardware availability link (unless handwired) -- private groupbuys are okay, but one-off prototypes will be questioned. If open-source, a link to files should be provided. - clear instructions on how to reset the board into bootloader mode - a picture about the keyboard and preferably about the PCB, too - images are not to be placed in the `qmk_firmware` repository - images should be uploaded to an external image hosting service, such as [imgur](https://imgur.com/). - - if imgur is used, images should be resized appropriately: append "h" to the image url i.e. `https://i.imgur.com/vqgE7Ok.jpg` becomes `https://i.imgur.com/vqgE7Okh.jpg` + - if imgur is used, images should be resized appropriately: append "h" to the image url i.e. [https://i.imgur.com/vqgE7Ok.jpg](https://i.imgur.com/vqgE7Ok.jpg) becomes [https://i.imgur.com/vqgE7Ok**h**.jpg](https://i.imgur.com/vqgE7Okh.jpg) + - image links should link directly to the image, not a "preview" -- i.e. [https://imgur.com/vqgE7Ok](https://imgur.com/vqgE7Ok) should be [https://i.imgur.com/vqgE7Okh.jpg](https://i.imgur.com/vqgE7Okh.jpg) when using imgur - `rules.mk` - removed `MIDI_ENABLE`, `FAUXCLICKY_ENABLE` and `HD44780_ENABLE` - modified `# Enable Bluetooth with the Adafruit EZ-Key HID` -> `# Enable Bluetooth` @@ -88,11 +98,17 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - `COMBO_ENABLE` - `ENCODER_MAP_ENABLE` - keyboard `config.h` - - don't repeat `MANUFACTURER` in the `PRODUCT` value - no `#define DESCRIPTION` - no Magic Key Options, MIDI Options or HD44780 configuration - user preference configurable `#define`s need to be moved to keymap `config.h` - - "`DEBOUNCE`" instead of "`DEBOUNCING_DELAY`" + - default values should not be redefined, such as `DEBOUNCE`, RGB related settings, etc. + - feature specific documentation contains most default values + - `grep` or alternative tool can be used to search for default values in core directories (e.g. `grep -r "define DEBOUNCE" quantum`) + - no copy/pasted comment blocks explaining a feature and/or its caveats -- this is what the docs are for + - `Force NKRO to be enabled ... toggled again during a power-up` + - commented-out unused defines, such as RGB effects + - no `#include "config_common.h` + - no `#define MATRIX_ROWS/COLS`, unless necessary (e.g. a keyboard with a custom matrix) - bare minimum required code for a board to boot into QMK should be present - initialisation code for the matrix and critical devices - mirroring existing functionality of a commercial board (like custom keycodes and special animations etc.) should be handled through non-`default` keymaps @@ -104,31 +120,26 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - `matrix_init_board()` etc. migrated to `keyboard_pre_init_kb()`, see: [keyboard_pre_init*](custom_quantum_functions.md?id=keyboard_pre_init_-function-documentation) - prefer `CUSTOM_MATRIX = lite` if custom matrix used, allows for standard debounce, see [custom matrix 'lite'](custom_matrix.md?id=lite) - prefer LED indicator [Configuration Options](feature_led_indicators.md?id=configuration-options) to custom `led_update_*()` implementations where possible - - Encoder support should not require any keyboard-level code, and associated keymaps should now leverage the [Encoder Map](feature_encoders.md?id=encoder-map) feature instead. + - hardware that's enabled at the keyboard level and requires configuration such as OLED displays or encoders should have basic functionality implemented here - `.h` - `#include "quantum.h"` appears at the top - `LAYOUT` macros should be moved to `info.json` - keymap `config.h` - no duplication of `rules.mk` or `config.h` from keyboard - `keymaps/default/keymap.c` - - `QMKBEST`/`QMKURL` removed - - if using `MO(_LOWER)` and `MO(_RAISE)` keycodes or equivalent, and the keymap has an adjust layer when holding both keys -- if the keymap has no "direct-to-adjust" keycode (such as `MO(_ADJUST)`) then you should prefer to write... - ``` - layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); - } - ``` - ...instead of manually handling `layer_on()`, `update_tri_layer()` inside the keymap's `process_record_user()`. + - `QMKBEST`/`QMKURL` example macros removed + - if using `MO(1)` and `MO(2)` keycodes together to access a third layer, the [Tri Layer](https://docs.qmk.fm/#/feature_tri_layer) feature should be used, rather than manually implementing this using `layer_on/off()` and `update_tri_layer()` functions in the keymap's `process_record_user()`. - default (and via) keymaps should be "pristine" - bare minimum to be used as a "clean slate" for another user to develop their own user-specific keymap - standard layouts preferred in these keymaps, if possible + - should use [encoder map feature](https://docs.qmk.fm/#/feature_encoders?id=encoder-map), rather than `encoder_update_user()` - default keymap should not enable VIA -- the VIA integration documentation requires a keymap called `via` - submitters can have a personal (or bells-and-whistles) keymap showcasing capabilities in the same PR but it shouldn't be embedded in the 'default' keymap - submitters can also have a "manufacturer-matching" keymap that mirrors existing functionality of the commercial product, if porting an existing board - Do not include VIA json files in the PR. These do not belong in the QMK repository as they are not used by QMK firmware -- they belong in the [VIA Keyboard Repo](https://github.com/the-via/keyboards) - Do not include KLE json files in the PR. These have no use within QMK. - Do not include source files from another keyboard or vendors keyboard folder. Including core files is fine. - - For instance, only `wilba_tech` boards shall include `keyboards/wilba_tech/wt_main.c` and `keyboards/wilba_tech/wt_rgb_backlight.c`. But including `drivers/sensors/pmw3360.c` is absolutely fine for any and all boards. + - For instance, only `wilba_tech` boards shall include `keyboards/wilba_tech/wt_main.c` and `keyboards/wilba_tech/wt_rgb_backlight.c`. But including `drivers/sensors/pmw3360.c` is absolutely fine for any and all boards that require it. - Code that needs to be used by multiple boards is a candidate for core code changes, and should be separated out. Also, specific to ChibiOS: diff --git a/keyboards/binepad/bn009/config.h b/keyboards/binepad/bn009/config.h index 3f233e1488cd..1651cc699e4b 100644 --- a/keyboards/binepad/bn009/config.h +++ b/keyboards/binepad/bn009/config.h @@ -16,7 +16,6 @@ #pragma once - #define MATRIX_ROW_PINS { D2, D1, D0 } #define MATRIX_COL_PINS { B6, B5, B4 } diff --git a/keyboards/binepad/bn009r2/config.h b/keyboards/binepad/bn009r2/config.h new file mode 100644 index 000000000000..45b63ec10528 --- /dev/null +++ b/keyboards/binepad/bn009r2/config.h @@ -0,0 +1,12 @@ +// Copyright 2023 Binepad (@binepad) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + + +/* + * Wear Leveling EEPROM Emulation + */ + +#define WEAR_LEVELING_LOGICAL_SIZE 2048 // Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM. +#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) // Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size. diff --git a/keyboards/binepad/bn009r2/info.json b/keyboards/binepad/bn009r2/info.json new file mode 100644 index 000000000000..5d126c866c01 --- /dev/null +++ b/keyboards/binepad/bn009r2/info.json @@ -0,0 +1,42 @@ +{ + "manufacturer": "Binepad", + "keyboard_name": "BN009 R2", + "maintainer": "binepad", + "bootloader": "stm32duino", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": false + }, + "matrix_pins": { + "cols": ["A1", "A2", "A6"], + "rows": ["B6", "B7", "B2"] + }, + "processor": "STM32F103", + "url": "http://binepad.com", + "usb": { + "vid": "0x4249", + "pid": "0x4295", + "device_version": "2.0.0" + }, + "community_layouts": ["ortho_3x3"], + "layouts": { + "LAYOUT_ortho_3x3": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [1, 0], "x": 0, "y": 1 }, + { "matrix": [1, 1], "x": 1, "y": 1 }, + { "matrix": [1, 2], "x": 2, "y": 1 }, + { "matrix": [2, 0], "x": 0, "y": 2 }, + { "matrix": [2, 1], "x": 1, "y": 2 }, + { "matrix": [2, 2], "x": 2, "y": 2 } + ] + } + } +} diff --git a/keyboards/binepad/bn009r2/keymaps/default/keymap.json b/keyboards/binepad/bn009r2/keymaps/default/keymap.json new file mode 100644 index 000000000000..2d5410de04fb --- /dev/null +++ b/keyboards/binepad/bn009r2/keymaps/default/keymap.json @@ -0,0 +1,15 @@ +{ + "keyboard": "binepad/bn009r2", + "version": 1, + "author": "binepad", + "notes": "This file is a keymap.json file for binepad/bn009r2", + "keymap": "default", + "layout": "LAYOUT_ortho_3x3", + "layers": [ + [ + "KC_7", "KC_8", "KC_9", + "KC_4", "KC_5", "KC_6", + "KC_1", "KC_2", "KC_3" + ] + ] +} diff --git a/keyboards/binepad/bn009r2/keymaps/via/keymap.json b/keyboards/binepad/bn009r2/keymaps/via/keymap.json new file mode 100644 index 000000000000..797c54d43a71 --- /dev/null +++ b/keyboards/binepad/bn009r2/keymaps/via/keymap.json @@ -0,0 +1,35 @@ +{ + "config": { + "features": { + "via": true + } + }, + "keyboard": "binepad/bn009r2", + "version": 1, + "author": "binepad", + "notes": "This file is a keymap.json file for binepad/bn009r2", + "keymap": "via", + "layout": "LAYOUT_ortho_3x3", + "layers": [ + [ + "KC_7", "KC_8", "KC_9", + "KC_4", "KC_5", "KC_6", + "KC_1", "KC_2", "KC_3" + ], + [ + "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO" + ], + [ + "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO" + ], + [ + "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO" + ] + ] +} diff --git a/keyboards/binepad/bn009r2/readme.md b/keyboards/binepad/bn009r2/readme.md new file mode 100644 index 000000000000..5444a088431d --- /dev/null +++ b/keyboards/binepad/bn009r2/readme.md @@ -0,0 +1,27 @@ +# BINEPAD BN009 R2 + +![BINEPAD BN009](https://imgur.com/fu0iXD0h.jpg) + +*A 9% macropad* + +* Keyboard Maintainer: [binepad](https://github.com/binepad) +* Hardware Supported: BN009 *(ft. STM32F103)* +* Hardware Availability: [binepad.com](https://www.binepad.com/bn009) + +Make example for this keyboard (after setting up your build environment): + + make binepad/bn009r2:default + +Flashing example for this keyboard: + + make binepad/bn009r2: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) and plug in the keyboard +* **Physical reset button**: Briefly press the button under the small hole on the back of the macropad +* **Keycode in layout**: Press the key mapped to `QK_BOOT` or `RESET` if it is available diff --git a/keyboards/binepad/bn009r2/rules.mk b/keyboards/binepad/bn009r2/rules.mk new file mode 100644 index 000000000000..837f4bffb53e --- /dev/null +++ b/keyboards/binepad/bn009r2/rules.mk @@ -0,0 +1 @@ +# This file is intentionally left blank diff --git a/keyboards/cannonkeys/caerdroia/config.h b/keyboards/cannonkeys/caerdroia/config.h new file mode 100644 index 000000000000..582695dac682 --- /dev/null +++ b/keyboards/cannonkeys/caerdroia/config.h @@ -0,0 +1,24 @@ +/* +Copyright 2015 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U + +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 + diff --git a/keyboards/cannonkeys/caerdroia/info.json b/keyboards/cannonkeys/caerdroia/info.json new file mode 100644 index 000000000000..9fb4da4c9307 --- /dev/null +++ b/keyboards/cannonkeys/caerdroia/info.json @@ -0,0 +1,126 @@ +{ + "keyboard_name": "Caerdroia", + "maintainer": "awkannan", + "manufacturer": "CannonKeys", + "processor": "RP2040", + "bootloader": "rp2040", + "usb": { + "vid": "0xCA04", + "pid": "0x001C", + "device_version": "0.0.1" + }, + "url": "https://cannonkeys.com", + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["GP14", "GP13", "GP12", "GP17", "GP18", "GP19", "GP20", "GP21", "GP26", "GP25", "GP24", "GP23", "GP22", "GP29", "GP16", "GP5", "GP4"], + "rows": ["GP0", "GP2", "GP3", "GP28", "GP10", "GP11"] + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "indicators": { + "caps_lock": "GP27", + "scroll_lock": "GP1", + "on_state": 0 + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 0], "x": 0.0, "y": 0.0 }, + { "matrix": [0, 2], "x": 2.0, "y": 0.0 }, + { "matrix": [0, 3], "x": 3.0, "y": 0.0 }, + { "matrix": [0, 4], "x": 4.0, "y": 0.0 }, + { "matrix": [0, 5], "x": 5.0, "y": 0.0 }, + { "matrix": [0, 6], "x": 6.5, "y": 0.0 }, + { "matrix": [0, 7], "x": 7.5, "y": 0.0 }, + { "matrix": [0, 8], "x": 8.5, "y": 0.0 }, + { "matrix": [0, 9], "x": 9.5, "y": 0.0 }, + { "matrix": [0, 10], "x": 11.0, "y": 0.0 }, + { "matrix": [0, 11], "x": 12.0, "y": 0.0 }, + { "matrix": [0, 12], "x": 13.0, "y": 0.0 }, + { "matrix": [0, 13], "x": 14.0, "y": 0.0 }, + { "matrix": [0, 14], "x": 15.25, "y": 0.0 }, + { "matrix": [0, 15], "x": 16.25, "y": 0.0 }, + { "matrix": [0, 16], "x": 17.25, "y": 0.0 }, + { "matrix": [1, 0], "x": 0.0, "y": 1.25 }, + { "matrix": [1, 1], "x": 1.0, "y": 1.25 }, + { "matrix": [1, 2], "x": 2.0, "y": 1.25 }, + { "matrix": [1, 3], "x": 3.0, "y": 1.25 }, + { "matrix": [1, 4], "x": 4.0, "y": 1.25 }, + { "matrix": [1, 5], "x": 5.0, "y": 1.25 }, + { "matrix": [1, 6], "x": 6.0, "y": 1.25 }, + { "matrix": [1, 7], "x": 7.0, "y": 1.25 }, + { "matrix": [1, 8], "x": 8.0, "y": 1.25 }, + { "matrix": [1, 9], "x": 9.0, "y": 1.25 }, + { "matrix": [1, 10], "x": 10.0, "y": 1.25 }, + { "matrix": [1, 11], "x": 11.0, "y": 1.25 }, + { "matrix": [1, 12], "x": 12.0, "y": 1.25 }, + { "matrix": [1, 13], "x": 13.0, "y": 1.25 }, + { "matrix": [3, 12], "x": 14.0, "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], "w": 1.5, "x": 0.0, "y": 2.25 }, + { "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], "w": 1.5, "x": 13.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], "w": 1.75, "x": 0.0, "y": 3.25 }, + { "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, 13], "w": 2.25, "x": 12.75, "y": 3.25 }, + { "matrix": [4, 0], "w": 1.25, "x": 0.0, "y": 4.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], "w": 1.75, "x": 12.25, "y": 4.25 }, + { "matrix": [4, 13], "x": 14.0, "y": 4.25 }, + { "matrix": [4, 15], "x": 16.25, "y": 4.25 }, + { "matrix": [5, 0], "w": 1.5, "x": 0.0, "y": 5.25 }, + { "matrix": [5, 1], "x": 1.5, "y": 5.25 }, + { "matrix": [5, 2], "w": 1.5, "x": 2.5, "y": 5.25 }, + { "matrix": [5, 6], "w": 7, "x": 4.0, "y": 5.25 }, + { "matrix": [5, 11], "w": 1.5, "x": 11.0, "y": 5.25 }, + { "matrix": [5, 12], "x": 12.5, "y": 5.25 }, + { "matrix": [5, 13], "w": 1.5, "x": 13.5, "y": 5.25 }, + { "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 } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/cannonkeys/caerdroia/keymaps/default/keymap.c b/keyboards/cannonkeys/caerdroia/keymaps/default/keymap.c new file mode 100644 index 000000000000..5fbf689fc4c1 --- /dev/null +++ b/keyboards/cannonkeys/caerdroia/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H +enum layer_names { + _BASE, + _FN1 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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_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_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, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/cannonkeys/caerdroia/keymaps/via/keymap.c b/keyboards/cannonkeys/caerdroia/keymaps/via/keymap.c new file mode 100644 index 000000000000..4ada7ca5909f --- /dev/null +++ b/keyboards/cannonkeys/caerdroia/keymaps/via/keymap.c @@ -0,0 +1,58 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H +enum layer_names { + _BASE, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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_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_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, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [_FN2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [_FN3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; diff --git a/keyboards/cannonkeys/caerdroia/keymaps/via/rules.mk b/keyboards/cannonkeys/caerdroia/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/cannonkeys/caerdroia/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/caerdroia/readme.md b/keyboards/cannonkeys/caerdroia/readme.md new file mode 100644 index 000000000000..389467b7b926 --- /dev/null +++ b/keyboards/cannonkeys/caerdroia/readme.md @@ -0,0 +1,22 @@ +# Caerdroia by AKB + +Caerdroia Keyboard by AKB + +* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +* Hardware Supported: RP2040 +* Hardware Availability: [CannonKeys](https://cannonkeys.com) + + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/caerdroia:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **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**: Hold the "BOOTMODE" button on the back of the PCB and briefly press the "RESET" button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/cannonkeys/caerdroia/rules.mk b/keyboards/cannonkeys/caerdroia/rules.mk new file mode 100644 index 000000000000..59f8593f1849 --- /dev/null +++ b/keyboards/cannonkeys/caerdroia/rules.mk @@ -0,0 +1,2 @@ +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = rp2040_flash diff --git a/keyboards/cannonkeys/chimera65_hs/info.json b/keyboards/cannonkeys/chimera65_hs/info.json new file mode 100644 index 000000000000..bea5e6b7c8ad --- /dev/null +++ b/keyboards/cannonkeys/chimera65_hs/info.json @@ -0,0 +1,103 @@ +{ + "keyboard_name": "Chimera65 HS", + "manufacturer": "CannonKeys", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "usb": { + "vid": "0xCA04", + "pid": "0x001D", + "device_version": "0.0.1" + }, + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["A8", "C13", "B9", "B8", "B7", "B6", "B5", "B4", "B3", "A7", "A5", "A4", "A3", "A2", "A1"], + "rows": ["A14", "A15", "A0", "B1", "B0"] + }, + "indicators": { + "caps_lock": "B14", + "on_state": 0 + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "processor": "STM32F072", + "bootloader": "stm32-dfu", + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 0], "x": 0.0, "y": 0.0 }, + { "matrix": [0, 1], "x": 1.0, "y": 0.0 }, + { "matrix": [0, 2], "x": 2.0, "y": 0.0 }, + { "matrix": [0, 3], "x": 3.0, "y": 0.0 }, + { "matrix": [0, 4], "x": 4.0, "y": 0.0 }, + { "matrix": [0, 5], "x": 5.0, "y": 0.0 }, + { "matrix": [0, 6], "x": 6.0, "y": 0.0 }, + { "matrix": [0, 7], "x": 7.0, "y": 0.0 }, + { "matrix": [0, 8], "x": 8.0, "y": 0.0 }, + { "matrix": [0, 9], "x": 9.0, "y": 0.0 }, + { "matrix": [0, 10], "x": 10.0, "y": 0.0 }, + { "matrix": [0, 11], "x": 11.0, "y": 0.0 }, + { "matrix": [0, 12], "x": 12.0, "y": 0.0 }, + { "matrix": [0, 13], "x": 13.0, "y": 0.0 }, + { "matrix": [0, 14], "x": 14.0, "y": 0.0 }, + { "matrix": [1, 0], "w": 1.5, "x": 0.0, "y": 1.0 }, + { "matrix": [1, 1], "x": 1.5, "y": 1.0 }, + { "matrix": [1, 2], "x": 2.5, "y": 1.0 }, + { "matrix": [1, 3], "x": 3.5, "y": 1.0 }, + { "matrix": [1, 4], "x": 4.5, "y": 1.0 }, + { "matrix": [1, 5], "x": 5.5, "y": 1.0 }, + { "matrix": [1, 6], "x": 6.5, "y": 1.0 }, + { "matrix": [1, 7], "x": 7.5, "y": 1.0 }, + { "matrix": [1, 8], "x": 8.5, "y": 1.0 }, + { "matrix": [1, 9], "x": 9.5, "y": 1.0 }, + { "matrix": [1, 10], "x": 10.5, "y": 1.0 }, + { "matrix": [1, 11], "x": 11.5, "y": 1.0 }, + { "matrix": [1, 12], "x": 12.5, "y": 1.0 }, + { "matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1.0 }, + { "matrix": [1, 14], "x": 15.5, "y": 1.0 }, + { "matrix": [2, 0], "w": 1.75, "x": 0.0, "y": 2.0 }, + { "matrix": [2, 1], "x": 1.75, "y": 2.0 }, + { "matrix": [2, 2], "x": 2.75, "y": 2.0 }, + { "matrix": [2, 3], "x": 3.75, "y": 2.0 }, + { "matrix": [2, 4], "x": 4.75, "y": 2.0 }, + { "matrix": [2, 5], "x": 5.75, "y": 2.0 }, + { "matrix": [2, 6], "x": 6.75, "y": 2.0 }, + { "matrix": [2, 7], "x": 7.75, "y": 2.0 }, + { "matrix": [2, 8], "x": 8.75, "y": 2.0 }, + { "matrix": [2, 9], "x": 9.75, "y": 2.0 }, + { "matrix": [2, 10], "x": 10.75, "y": 2.0 }, + { "matrix": [2, 11], "x": 11.75, "y": 2.0 }, + { "matrix": [2, 13], "w": 2.25, "x": 12.75, "y": 2.0 }, + { "matrix": [2, 14], "x": 15.5, "y": 2.0 }, + { "matrix": [3, 0], "w": 2.25, "x": 0.0, "y": 3.0 }, + { "matrix": [3, 2], "x": 2.25, "y": 3.0 }, + { "matrix": [3, 3], "x": 3.25, "y": 3.0 }, + { "matrix": [3, 4], "x": 4.25, "y": 3.0 }, + { "matrix": [3, 5], "x": 5.25, "y": 3.0 }, + { "matrix": [3, 6], "x": 6.25, "y": 3.0 }, + { "matrix": [3, 7], "x": 7.25, "y": 3.0 }, + { "matrix": [3, 8], "x": 8.25, "y": 3.0 }, + { "matrix": [3, 9], "x": 9.25, "y": 3.0 }, + { "matrix": [3, 10], "x": 10.25, "y": 3.0 }, + { "matrix": [3, 11], "x": 11.25, "y": 3.0 }, + { "matrix": [3, 12], "w": 1.75, "x": 12.25, "y": 3.0 }, + { "matrix": [3, 13], "x": 14.25, "y": 3.25 }, + { "matrix": [3, 14], "x": 15.5, "y": 3.0 }, + { "matrix": [4, 0], "w": 1.25, "x": 0.0, "y": 4.0 }, + { "matrix": [4, 1], "w": 1.25, "x": 1.25, "y": 4.0 }, + { "matrix": [4, 2], "w": 1.25, "x": 2.5, "y": 4.0 }, + { "matrix": [4, 6], "w": 6.25, "x": 3.75, "y": 4.0 }, + { "matrix": [4, 10], "w": 1.5, "x": 10.0, "y": 4.0 }, + { "matrix": [4, 11], "w": 1.5, "x": 11.5, "y": 4.0 }, + { "matrix": [4, 12], "x": 13.25, "y": 4.25 }, + { "matrix": [4, 13], "x": 14.25, "y": 4.25 }, + { "matrix": [4, 14], "x": 15.25, "y": 4.25 } + ] + } + } +} diff --git a/keyboards/cannonkeys/chimera65_hs/keymaps/default/keymap.c b/keyboards/cannonkeys/chimera65_hs/keymaps/default/keymap.c new file mode 100644 index 000000000000..eec6f816d4f7 --- /dev/null +++ b/keyboards/cannonkeys/chimera65_hs/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + 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_INS, + 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_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_PGUP, + 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT( + QK_GESC, 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_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/chimera65_hs/keymaps/via/keymap.c b/keyboards/cannonkeys/chimera65_hs/keymaps/via/keymap.c new file mode 100644 index 000000000000..dc79aa69b5b3 --- /dev/null +++ b/keyboards/cannonkeys/chimera65_hs/keymaps/via/keymap.c @@ -0,0 +1,64 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + 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_INS, + 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_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_PGUP, + 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT( + QK_GESC, 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_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS + ), + + [_FN2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_FN3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/chimera65_hs/keymaps/via/rules.mk b/keyboards/cannonkeys/chimera65_hs/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/cannonkeys/chimera65_hs/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/chimera65_hs/readme.md b/keyboards/cannonkeys/chimera65_hs/readme.md new file mode 100644 index 000000000000..4ae7f628571e --- /dev/null +++ b/keyboards/cannonkeys/chimera65_hs/readme.md @@ -0,0 +1,24 @@ +# Chimera65 Hotswap + +Chimera65 Hotswap Keyboard + +* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +* Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/chimera65_hs:default + +Flashing example for this keyboard: + + make cannonkeys/chimera65_hs: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**: Toggle the switch on the back of the pcb to "0" and briefly press the button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/cannonkeys/chimera65_hs/rules.mk b/keyboards/cannonkeys/chimera65_hs/rules.mk new file mode 100644 index 000000000000..2a5031cd3205 --- /dev/null +++ b/keyboards/cannonkeys/chimera65_hs/rules.mk @@ -0,0 +1,5 @@ +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -v FFFF -p FFFF + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/ortho48v2/config.h b/keyboards/cannonkeys/ortho48v2/config.h new file mode 100644 index 000000000000..2af75a171588 --- /dev/null +++ b/keyboards/cannonkeys/ortho48v2/config.h @@ -0,0 +1,23 @@ +/* +Copyright 2022 CannonKeys + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET // Activates the double-tap behavior +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U // Timeout window in ms in which the double tap can occur. + +#define BACKLIGHT_PWM_DRIVER PWMD6 +#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A diff --git a/keyboards/cannonkeys/ortho48v2/halconf.h b/keyboards/cannonkeys/ortho48v2/halconf.h new file mode 100644 index 000000000000..8c1197b84c63 --- /dev/null +++ b/keyboards/cannonkeys/ortho48v2/halconf.h @@ -0,0 +1,8 @@ +// Copyright 2022 Andrew Kannan +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_PWM TRUE + +#include_next diff --git a/keyboards/cannonkeys/ortho48v2/info.json b/keyboards/cannonkeys/ortho48v2/info.json new file mode 100644 index 000000000000..e49d86d517cb --- /dev/null +++ b/keyboards/cannonkeys/ortho48v2/info.json @@ -0,0 +1,95 @@ +{ + "keyboard_name": "Ortho48 v2", + "maintainer": "awkannan", + "manufacturer": "CannonKeys", + "processor": "RP2040", + "bootloader": "rp2040", + "usb": { + "vid": "0xCA04", + "pid": "0x0018", + "device_version": "0.0.1" + }, + "url": "https://cannonkeys.com", + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["GP7", "GP6", "GP5", "GP4", "GP3", "GP2", "GP1", "GP0", "GP13", "GP24", "GP23", "GP22"], + "rows": ["GP18", "GP19", "GP25", "GP26"] + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "backlight": true, + "encoder": true + }, + "encoder": { + "rotary": [ + { "pin_a": "GP28", "pin_b": "GP29" } + ] + }, + "backlight": { + "breathing": true, + "breathing_period": 5, + "levels": 15, + "pin": "GP12" + }, + "community_layouts": [ + "ortho_4x12" + ], + "layouts": { + "LAYOUT_ortho_4x12": { + "layout": [ + {"label":"Tab", "x":0, "y":0, "matrix": [0,0]}, + {"label":"Q", "x":1, "y":0, "matrix": [0,1]}, + {"label":"W", "x":2, "y":0, "matrix": [0,2]}, + {"label":"E", "x":3, "y":0, "matrix": [0,3]}, + {"label":"R", "x":4, "y":0, "matrix": [0,4]}, + {"label":"T", "x":5, "y":0, "matrix": [0,5]}, + {"label":"Y", "x":6, "y":0, "matrix": [0,6]}, + {"label":"U", "x":7, "y":0, "matrix": [0,7]}, + {"label":"I", "x":8, "y":0, "matrix": [0,8]}, + {"label":"O", "x":9, "y":0, "matrix": [0,9]}, + {"label":"P", "x":10, "y":0, "matrix": [0,10]}, + {"label":"Back Space", "x":11, "y":0, "matrix": [0,11]}, + {"label":"Esc", "x":0, "y":1, "matrix": [1,0]}, + {"label":"A", "x":1, "y":1, "matrix": [1,1]}, + {"label":"S", "x":2, "y":1, "matrix": [1,2]}, + {"label":"D", "x":3, "y":1, "matrix": [1,3]}, + {"label":"F", "x":4, "y":1, "matrix": [1,4]}, + {"label":"G", "x":5, "y":1, "matrix": [1,5]}, + {"label":"H", "x":6, "y":1, "matrix": [1,6]}, + {"label":"J", "x":7, "y":1, "matrix": [1,7]}, + {"label":"K", "x":8, "y":1, "matrix": [1,8]}, + {"label":"L", "x":9, "y":1, "matrix": [1,9]}, + {"label":";", "x":10, "y":1, "matrix": [1,10]}, + {"label":"'", "x":11, "y":1, "matrix": [1,11]}, + {"label":"Shift", "x":0, "y":2, "matrix": [2,0]}, + {"label":"Z", "x":1, "y":2, "matrix": [2,1]}, + {"label":"X", "x":2, "y":2, "matrix": [2,2]}, + {"label":"C", "x":3, "y":2, "matrix": [2,3]}, + {"label":"V", "x":4, "y":2, "matrix": [2,4]}, + {"label":"B", "x":5, "y":2, "matrix": [2,5]}, + {"label":"N", "x":6, "y":2, "matrix": [2,6]}, + {"label":"M", "x":7, "y":2, "matrix": [2,7]}, + {"label":",", "x":8, "y":2, "matrix": [2,8]}, + {"label":".", "x":9, "y":2, "matrix": [2,9]}, + {"label":"/", "x":10, "y":2, "matrix": [2,10]}, + {"label":"Return", "x":11, "y":2, "matrix": [2,11]}, + {"label":"", "x":0, "y":3, "matrix": [3,0]}, + {"label":"Ctrl", "x":1, "y":3, "matrix": [3,1]}, + {"label":"Alt", "x":2, "y":3, "matrix": [3,2]}, + {"label":"Super", "x":3, "y":3, "matrix": [3,3]}, + {"label":"⇓", "x":4, "y":3, "matrix": [3,4]}, + {"label":"", "x":5, "y":3, "matrix": [3,5]}, + {"label":"", "x":6, "y":3, "matrix": [3,6]}, + {"label":"⇑", "x":7, "y":3, "matrix": [3,7]}, + {"label":"←", "x":8, "y":3, "matrix": [3,8]}, + {"label":"↓", "x":9, "y":3, "matrix": [3,9]}, + {"label":"↑", "x":10, "y":3, "matrix": [3,10]}, + {"label":"→", "x":11, "y":3, "matrix": [3,11]}] + } + } +} diff --git a/keyboards/cannonkeys/ortho48v2/keymaps/default/keymap.c b/keyboards/cannonkeys/ortho48v2/keymaps/default/keymap.c new file mode 100644 index 000000000000..78e35ff821d5 --- /dev/null +++ b/keyboards/cannonkeys/ortho48v2/keymaps/default/keymap.c @@ -0,0 +1,92 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum custom_layers { + _BASE, + _RAISE, + _LOWER, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_BASE] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + RGB_TOG, RGB_MOD, BL_UP , BL_DOWN, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_LOWER] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, + [_RAISE] = { ENCODER_CCW_CW(KC_MS_WH_LEFT, KC_MS_WH_RIGHT) }, +}; +#endif diff --git a/keyboards/cannonkeys/ortho48v2/keymaps/default/rules.mk b/keyboards/cannonkeys/ortho48v2/keymaps/default/rules.mk new file mode 100644 index 000000000000..ee325681483f --- /dev/null +++ b/keyboards/cannonkeys/ortho48v2/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/cannonkeys/ortho48v2/keymaps/via/keymap.c b/keyboards/cannonkeys/ortho48v2/keymaps/via/keymap.c new file mode 100644 index 000000000000..4129b4e0f5c0 --- /dev/null +++ b/keyboards/cannonkeys/ortho48v2/keymaps/via/keymap.c @@ -0,0 +1,58 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[1] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +[2] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + RGB_TOG, RGB_MOD, BL_UP , BL_DOWN, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +[3] = LAYOUT_ortho_4x12( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, + [2] = { ENCODER_CCW_CW(KC_MS_WH_LEFT, KC_MS_WH_RIGHT) }, + [3] = { ENCODER_CCW_CW(QK_BACKLIGHT_DOWN, QK_BACKLIGHT_UP) }, +}; +#endif diff --git a/keyboards/cannonkeys/ortho48v2/keymaps/via/rules.mk b/keyboards/cannonkeys/ortho48v2/keymaps/via/rules.mk new file mode 100644 index 000000000000..f1adcab005e8 --- /dev/null +++ b/keyboards/cannonkeys/ortho48v2/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/cannonkeys/ortho48v2/mcuconf.h b/keyboards/cannonkeys/ortho48v2/mcuconf.h new file mode 100644 index 000000000000..75a6bb41ec7c --- /dev/null +++ b/keyboards/cannonkeys/ortho48v2/mcuconf.h @@ -0,0 +1,9 @@ +// Copyright 2022 Andrew Kannan +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef RP_PWM_USE_PWM6 +#define RP_PWM_USE_PWM6 TRUE diff --git a/keyboards/cannonkeys/ortho48v2/readme.md b/keyboards/cannonkeys/ortho48v2/readme.md new file mode 100644 index 000000000000..bb96fbe51741 --- /dev/null +++ b/keyboards/cannonkeys/ortho48v2/readme.md @@ -0,0 +1,22 @@ +# Ortho 48 v2 + +A 4x12 Ortholinear keyboard powered by an onboard RP2040 + +* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +* Hardware Supported: RP2040 +* Hardware Availability: [CannonKeys](https://cannonkeys.com) + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/ortho48v2:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + + +## Bootloader + +Enter the bootloader in 3 ways: + +* **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**: Swap the boot switch on the back of the PCB to "1" and hit the reset button. Or double tap the reset button quickly while the boot switch is set to "0". +* **Keycode in layout**: Press the key mapped to `RESET` if it is available diff --git a/keyboards/cannonkeys/ortho48v2/rules.mk b/keyboards/cannonkeys/ortho48v2/rules.mk new file mode 100644 index 000000000000..59f8593f1849 --- /dev/null +++ b/keyboards/cannonkeys/ortho48v2/rules.mk @@ -0,0 +1,2 @@ +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = rp2040_flash diff --git a/keyboards/cipulot/ec_pro2/config.h b/keyboards/cipulot/ec_pro2/config.h new file mode 100644 index 000000000000..083b71cc1363 --- /dev/null +++ b/keyboards/cipulot/ec_pro2/config.h @@ -0,0 +1,45 @@ +/* Copyright 2023 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* Custom matrix pins and port select array */ +#define MATRIX_ROW_PINS \ + { B15, A8, B0, A7, B1 } +#define MATRIX_COL_CHANNELS \ + { 0, 3, 1, 2, 5, 7, 6, 4 } +#define MUX_SEL_PINS \ + { B6, B5, B4 } + +/* Hardware peripherals pins */ +#define APLEX_EN_PIN_0 B7 +#define APLEX_EN_PIN_1 B3 +#define DISCHARGE_PIN A6 +#define ANALOG_PORT A3 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define DEFAULT_ACTUATION_LEVEL 550 +#define DEFAULT_RELEASE_LEVEL 500 + +#define DISCHARGE_TIME 10 diff --git a/keyboards/cipulot/ec_pro2/ec_switch_matrix.c b/keyboards/cipulot/ec_pro2/ec_switch_matrix.c new file mode 100644 index 000000000000..d45e8c328120 --- /dev/null +++ b/keyboards/cipulot/ec_pro2/ec_switch_matrix.c @@ -0,0 +1,183 @@ +/* Copyright 2023 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ec_switch_matrix.h" +#include "analog.h" +#include "atomic_util.h" +#include "print.h" +#include "wait.h" + +/* Pin and port array */ +const uint32_t row_pins[] = MATRIX_ROW_PINS; +const uint8_t col_channels[] = MATRIX_COL_CHANNELS; +const uint32_t mux_sel_pins[] = MUX_SEL_PINS; + +static ecsm_config_t config; +static uint16_t ecsm_sw_value[MATRIX_ROWS][MATRIX_COLS]; + +static adc_mux adcMux; + +static inline void discharge_capacitor(void) { + writePinLow(DISCHARGE_PIN); +} +static inline void charge_capacitor(uint8_t row) { + writePinHigh(DISCHARGE_PIN); + writePinHigh(row_pins[row]); +} + +static inline void init_mux_sel(void) { + for (int idx = 0; idx < 3; idx++) { + setPinOutput(mux_sel_pins[idx]); + } +} + +static inline void select_mux(uint8_t col) { + uint8_t ch = col_channels[col]; + writePin(mux_sel_pins[0], ch & 1); + writePin(mux_sel_pins[1], ch & 2); + writePin(mux_sel_pins[2], ch & 4); +} + +static inline void init_row(void) { + for (int idx = 0; idx < MATRIX_ROWS; idx++) { + setPinOutput(row_pins[idx]); + writePinLow(row_pins[idx]); + } +} + +/* Initialize the peripherals pins */ +int ecsm_init(ecsm_config_t const* const ecsm_config) { + // Initialize config + config = *ecsm_config; + + palSetLineMode(ANALOG_PORT, PAL_MODE_INPUT_ANALOG); + adcMux = pinToMux(ANALOG_PORT); + + // Dummy call to make sure that adcStart() has been called in the appropriate state + adc_read(adcMux); + + // Initialize discharge pin as discharge mode + writePinLow(DISCHARGE_PIN); + setPinOutputOpenDrain(DISCHARGE_PIN); + + // Initialize drive lines + init_row(); + + // Initialize multiplexer select pin + init_mux_sel(); + + // Enable AMUX + setPinOutput(APLEX_EN_PIN_0); + writePinLow(APLEX_EN_PIN_0); + setPinOutput(APLEX_EN_PIN_1); + writePinLow(APLEX_EN_PIN_1); + + return 0; +} + +int ecsm_update(ecsm_config_t const* const ecsm_config) { + // Save config + config = *ecsm_config; + return 0; +} + +// Read the capacitive sensor value +uint16_t ecsm_readkey_raw(uint8_t channel, uint8_t row, uint8_t col) { + uint16_t sw_value = 0; + + // Select the multiplexer + if (channel == 0) { + writePinHigh(APLEX_EN_PIN_0); + select_mux(col); + writePinLow(APLEX_EN_PIN_0); + } else { + writePinHigh(APLEX_EN_PIN_1); + select_mux(col); + writePinLow(APLEX_EN_PIN_1); + } + + // Set strobe pins to low state + writePinLow(row_pins[row]); + ATOMIC_BLOCK_FORCEON { + // Set the row pin to high state and have capacitor charge + charge_capacitor(row); + // Read the ADC value + sw_value = adc_read(adcMux); + } + // Discharge peak hold capacitor + discharge_capacitor(); + // Waiting for the ghost capacitor to discharge fully + wait_us(DISCHARGE_TIME); + + return sw_value; +} + +// Update press/release state of key +bool ecsm_update_key(matrix_row_t* current_row, uint8_t row, uint8_t col, uint16_t sw_value) { + bool current_state = (*current_row >> col) & 1; + + // Press to release + if (current_state && sw_value < config.ecsm_actuation_threshold) { + *current_row &= ~(1 << col); + return true; + } + + // Release to press + if ((!current_state) && sw_value > config.ecsm_release_threshold) { + *current_row |= (1 << col); + return true; + } + + return false; +} + +// Scan key values and update matrix state +bool ecsm_matrix_scan(matrix_row_t current_matrix[]) { + bool updated = false; + + // Disable AMUX of channel 1 + writePinHigh(APLEX_EN_PIN_1); + for (int col = 0; col < sizeof(col_channels); col++) { + for (int row = 0; row < MATRIX_ROWS; row++) { + ecsm_sw_value[row][col] = ecsm_readkey_raw(0, row, col); + updated |= ecsm_update_key(¤t_matrix[row], row, col, ecsm_sw_value[row][col]); + } + } + + // Disable AMUX of channel 1 + writePinHigh(APLEX_EN_PIN_0); + for (int col = 0; col < (sizeof(col_channels) - 1); col++) { + for (int row = 0; row < MATRIX_ROWS; row++) { + ecsm_sw_value[row][col + 8] = ecsm_readkey_raw(1, row, col); + updated |= ecsm_update_key(¤t_matrix[row], row, col + 8, ecsm_sw_value[row][col + 8]); + } + } + return updated; +} + +// Debug print key values +void ecsm_print_matrix(void) { + for (int row = 0; row < MATRIX_ROWS; row++) { + for (int col = 0; col < MATRIX_COLS; col++) { + uprintf("%4d", ecsm_sw_value[row][col]); + if (col < (MATRIX_COLS - 1)) { + print(","); + } + } + print("\n"); + } + print("\n"); +} diff --git a/keyboards/cipulot/ec_pro2/ec_switch_matrix.h b/keyboards/cipulot/ec_pro2/ec_switch_matrix.h new file mode 100644 index 000000000000..9dcb216caa3f --- /dev/null +++ b/keyboards/cipulot/ec_pro2/ec_switch_matrix.h @@ -0,0 +1,36 @@ +/* Copyright 2023 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include +#include + +#include "matrix.h" + +typedef struct { + uint16_t ecsm_actuation_threshold; // threshold for key release + uint16_t ecsm_release_threshold; // threshold for key press +} ecsm_config_t; + +ecsm_config_t ecsm_config; + +int ecsm_init(ecsm_config_t const* const ecsm_config); +int ecsm_update(ecsm_config_t const* const ecsm_config); +bool ecsm_matrix_scan(matrix_row_t current_matrix[]); +uint16_t ecsm_readkey_raw(uint8_t channel, uint8_t row, uint8_t col); +bool ecsm_update_key(matrix_row_t* current_row, uint8_t row, uint8_t col, uint16_t sw_value); +void ecsm_print_matrix(void); diff --git a/keyboards/cipulot/ec_pro2/halconf.h b/keyboards/cipulot/ec_pro2/halconf.h new file mode 100644 index 000000000000..5b71acecbbc8 --- /dev/null +++ b/keyboards/cipulot/ec_pro2/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2023 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define HAL_USE_ADC TRUE + +#include_next diff --git a/keyboards/cipulot/ec_pro2/info.json b/keyboards/cipulot/ec_pro2/info.json new file mode 100644 index 000000000000..ae92d44e7860 --- /dev/null +++ b/keyboards/cipulot/ec_pro2/info.json @@ -0,0 +1,182 @@ +{ + "manufacturer": "Cipulot", + "keyboard_name": "EC Pro2", + "maintainer": "Cipulot", + "bootloader": "stm32-dfu", + "build": { + "lto": true + }, + "diode_direction": "COL2ROW", + "features": { + "audio": false, + "backlight": false, + "bootmagic": true, + "command": false, + "console": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, + "mouse_key": { + "enabled": true + }, + "processor": "STM32F401", + "rgblight": { + "led_count": 22, + "pin": "B14", + "animations": { + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "rgb_test": true, + "snake": true, + "static_gradient": true, + "twinkle": true + } + }, + "url": "https://www.github.com/Cipulot/EC-Pro-2", + "usb": { + "device_version": "0.0.1", + "pid": "0x6B8E", + "shared_endpoint": { + "keyboard": true + }, + "vid": "0x6369" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "0,0", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "0,1", "matrix": [0, 1], "x": 1, "y": 0 }, + { "label": "0,2", "matrix": [0, 2], "x": 2, "y": 0 }, + { "label": "0,3", "matrix": [0, 3], "x": 3, "y": 0 }, + { "label": "0,4", "matrix": [0, 4], "x": 4, "y": 0 }, + { "label": "0,5", "matrix": [0, 5], "x": 5, "y": 0 }, + { "label": "0,6", "matrix": [0, 6], "x": 6, "y": 0 }, + { "label": "0,7", "matrix": [0, 7], "x": 7, "y": 0 }, + { "label": "0,8", "matrix": [0, 8], "x": 8, "y": 0 }, + { "label": "0,9", "matrix": [0, 9], "x": 9, "y": 0 }, + { "label": "0,10", "matrix": [0, 10], "x": 10, "y": 0 }, + { "label": "0,11", "matrix": [0, 11], "x": 11, "y": 0 }, + { "label": "0,12", "matrix": [0, 12], "x": 12, "y": 0 }, + { "label": "0,13", "matrix": [0, 13], "x": 13, "y": 0 }, + { "label": "0,14", "matrix": [0, 14], "x": 14, "y": 0 }, + { "label": "1,0", "matrix": [1, 0], "w": 1.5, "x": 0, "y": 1 }, + { "label": "1,1", "matrix": [1, 1], "x": 1.5, "y": 1 }, + { "label": "1,2", "matrix": [1, 2], "x": 2.5, "y": 1 }, + { "label": "1,3", "matrix": [1, 3], "x": 3.5, "y": 1 }, + { "label": "1,4", "matrix": [1, 4], "x": 4.5, "y": 1 }, + { "label": "1,5", "matrix": [1, 5], "x": 5.5, "y": 1 }, + { "label": "1,6", "matrix": [1, 6], "x": 6.5, "y": 1 }, + { "label": "1,7", "matrix": [1, 7], "x": 7.5, "y": 1 }, + { "label": "1,8", "matrix": [1, 8], "x": 8.5, "y": 1 }, + { "label": "1,9", "matrix": [1, 9], "x": 9.5, "y": 1 }, + { "label": "1,10", "matrix": [1, 10], "x": 10.5, "y": 1 }, + { "label": "1,11", "matrix": [1, 11], "x": 11.5, "y": 1 }, + { "label": "1,12", "matrix": [1, 12], "x": 12.5, "y": 1 }, + { "label": "1,13", "matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1 }, + { "label": "2,0", "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, + { "label": "2,1", "matrix": [2, 1], "x": 1.75, "y": 2 }, + { "label": "2,2", "matrix": [2, 2], "x": 2.75, "y": 2 }, + { "label": "2,3", "matrix": [2, 3], "x": 3.75, "y": 2 }, + { "label": "2,4", "matrix": [2, 4], "x": 4.75, "y": 2 }, + { "label": "2,5", "matrix": [2, 5], "x": 5.75, "y": 2 }, + { "label": "2,6", "matrix": [2, 6], "x": 6.75, "y": 2 }, + { "label": "2,7", "matrix": [2, 7], "x": 7.75, "y": 2 }, + { "label": "2,8", "matrix": [2, 8], "x": 8.75, "y": 2 }, + { "label": "2,9", "matrix": [2, 9], "x": 9.75, "y": 2 }, + { "label": "2,10", "matrix": [2, 10], "x": 10.75, "y": 2 }, + { "label": "2,11", "matrix": [2, 11], "x": 11.75, "y": 2 }, + { "label": "2,12", "matrix": [2, 12], "x": 12.75, "y": 2 }, + { "label": "2,13", "matrix": [2, 13], "w": 1.25, "x": 13.75, "y": 2 }, + { "label": "3,0", "matrix": [3, 0], "w": 1.25, "x": 0, "y": 3 }, + { "label": "3,1", "matrix": [3, 1], "x": 1.25, "y": 3 }, + { "label": "3,2", "matrix": [3, 2], "x": 2.25, "y": 3 }, + { "label": "3,3", "matrix": [3, 3], "x": 3.25, "y": 3 }, + { "label": "3,4", "matrix": [3, 4], "x": 4.25, "y": 3 }, + { "label": "3,5", "matrix": [3, 5], "x": 5.25, "y": 3 }, + { "label": "3,6", "matrix": [3, 6], "x": 6.25, "y": 3 }, + { "label": "3,7", "matrix": [3, 7], "x": 7.25, "y": 3 }, + { "label": "3,8", "matrix": [3, 8], "x": 8.25, "y": 3 }, + { "label": "3,9", "matrix": [3, 9], "x": 9.25, "y": 3 }, + { "label": "3,10", "matrix": [3, 10], "x": 10.25, "y": 3 }, + { "label": "3,11", "matrix": [3, 11], "x": 11.25, "y": 3 }, + { "label": "3,13", "matrix": [3, 13], "w": 1.75, "x": 12.25, "y": 3 }, + { "label": "3,14", "matrix": [3, 14], "x": 14, "y": 3 }, + { "label": "4,1", "matrix": [4, 1], "x": 1.5, "y": 4 }, + { "label": "4,2", "matrix": [4, 2], "w": 1.5, "x": 2.5, "y": 4 }, + { "label": "4,6", "matrix": [4, 6], "w": 6, "x": 4, "y": 4 }, + { "label": "4,9", "matrix": [4, 9], "w": 1.5, "x": 10, "y": 4 }, + { "label": "4,10", "matrix": [4, 10], "x": 11.5, "y": 4 } + ] + }, + "LAYOUT_60_hhkb": { + "layout": [ + { "label": "0,0", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "0,1", "matrix": [0, 1], "x": 1, "y": 0 }, + { "label": "0,2", "matrix": [0, 2], "x": 2, "y": 0 }, + { "label": "0,3", "matrix": [0, 3], "x": 3, "y": 0 }, + { "label": "0,4", "matrix": [0, 4], "x": 4, "y": 0 }, + { "label": "0,5", "matrix": [0, 5], "x": 5, "y": 0 }, + { "label": "0,6", "matrix": [0, 6], "x": 6, "y": 0 }, + { "label": "0,7", "matrix": [0, 7], "x": 7, "y": 0 }, + { "label": "0,8", "matrix": [0, 8], "x": 8, "y": 0 }, + { "label": "0,9", "matrix": [0, 9], "x": 9, "y": 0 }, + { "label": "0,10", "matrix": [0, 10], "x": 10, "y": 0 }, + { "label": "0,11", "matrix": [0, 11], "x": 11, "y": 0 }, + { "label": "0,12", "matrix": [0, 12], "x": 12, "y": 0 }, + { "label": "0,13", "matrix": [0, 13], "x": 13, "y": 0 }, + { "label": "0,14", "matrix": [0, 14], "x": 14, "y": 0 }, + { "label": "1,0", "matrix": [1, 0], "w": 1.5, "x": 0, "y": 1 }, + { "label": "1,1", "matrix": [1, 1], "x": 1.5, "y": 1 }, + { "label": "1,2", "matrix": [1, 2], "x": 2.5, "y": 1 }, + { "label": "1,3", "matrix": [1, 3], "x": 3.5, "y": 1 }, + { "label": "1,4", "matrix": [1, 4], "x": 4.5, "y": 1 }, + { "label": "1,5", "matrix": [1, 5], "x": 5.5, "y": 1 }, + { "label": "1,6", "matrix": [1, 6], "x": 6.5, "y": 1 }, + { "label": "1,7", "matrix": [1, 7], "x": 7.5, "y": 1 }, + { "label": "1,8", "matrix": [1, 8], "x": 8.5, "y": 1 }, + { "label": "1,9", "matrix": [1, 9], "x": 9.5, "y": 1 }, + { "label": "1,10", "matrix": [1, 10], "x": 10.5, "y": 1 }, + { "label": "1,11", "matrix": [1, 11], "x": 11.5, "y": 1 }, + { "label": "1,12", "matrix": [1, 12], "x": 12.5, "y": 1 }, + { "label": "1,13", "matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1 }, + { "label": "2,0", "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, + { "label": "2,1", "matrix": [2, 1], "x": 1.75, "y": 2 }, + { "label": "2,2", "matrix": [2, 2], "x": 2.75, "y": 2 }, + { "label": "2,3", "matrix": [2, 3], "x": 3.75, "y": 2 }, + { "label": "2,4", "matrix": [2, 4], "x": 4.75, "y": 2 }, + { "label": "2,5", "matrix": [2, 5], "x": 5.75, "y": 2 }, + { "label": "2,6", "matrix": [2, 6], "x": 6.75, "y": 2 }, + { "label": "2,7", "matrix": [2, 7], "x": 7.75, "y": 2 }, + { "label": "2,8", "matrix": [2, 8], "x": 8.75, "y": 2 }, + { "label": "2,9", "matrix": [2, 9], "x": 9.75, "y": 2 }, + { "label": "2,10", "matrix": [2, 10], "x": 10.75, "y": 2 }, + { "label": "2,11", "matrix": [2, 11], "x": 11.75, "y": 2 }, + { "label": "2,13", "matrix": [2, 13], "w": 2.25, "x": 12.75, "y": 2 }, + { "label": "3,0", "matrix": [3, 0], "w": 2.25, "x": 0, "y": 3 }, + { "label": "3,2", "matrix": [3, 2], "x": 2.25, "y": 3 }, + { "label": "3,3", "matrix": [3, 3], "x": 3.25, "y": 3 }, + { "label": "3,4", "matrix": [3, 4], "x": 4.25, "y": 3 }, + { "label": "3,5", "matrix": [3, 5], "x": 5.25, "y": 3 }, + { "label": "3,6", "matrix": [3, 6], "x": 6.25, "y": 3 }, + { "label": "3,7", "matrix": [3, 7], "x": 7.25, "y": 3 }, + { "label": "3,8", "matrix": [3, 8], "x": 8.25, "y": 3 }, + { "label": "3,9", "matrix": [3, 9], "x": 9.25, "y": 3 }, + { "label": "3,10", "matrix": [3, 10], "x": 10.25, "y": 3 }, + { "label": "3,11", "matrix": [3, 11], "x": 11.25, "y": 3 }, + { "label": "3,13", "matrix": [3, 13], "w": 1.75, "x": 12.25, "y": 3 }, + { "label": "3,14", "matrix": [3, 14], "x": 14, "y": 3 }, + { "label": "4,1", "matrix": [4, 1], "x": 1.5, "y": 4 }, + { "label": "4,2", "matrix": [4, 2], "w": 1.5, "x": 2.5, "y": 4 }, + { "label": "4,6", "matrix": [4, 6], "w": 6, "x": 4, "y": 4 }, + { "label": "4,9", "matrix": [4, 9], "w": 1.5, "x": 10, "y": 4 }, + { "label": "4,10", "matrix": [4, 10], "x": 11.5, "y": 4 } + ] + } + } +} diff --git a/keyboards/cipulot/ec_pro2/keymaps/60_hhkb/keymap.c b/keyboards/cipulot/ec_pro2/keymaps/60_hhkb/keymap.c new file mode 100644 index 000000000000..10c7ffb65fdc --- /dev/null +++ b/keyboards/cipulot/ec_pro2/keymaps/60_hhkb/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2023 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [0] = LAYOUT_60_hhkb( + 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_BSLS, KC_GRV, + 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_DEL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, + 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_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI), + + [1] = LAYOUT_60_hhkb( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUSE, KC_UP, _______, KC_BSPC, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, S(KC_8), KC_SLSH, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, S(KC_EQL), KC_MINS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, MO(2)), + + [2] = LAYOUT_60_hhkb( + RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______), + [3] = LAYOUT_60_hhkb( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______) + // clang-format on +}; diff --git a/keyboards/cipulot/ec_pro2/keymaps/default/keymap.c b/keyboards/cipulot/ec_pro2/keymaps/default/keymap.c new file mode 100644 index 000000000000..767b76ea3e72 --- /dev/null +++ b/keyboards/cipulot/ec_pro2/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2023 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [0] = LAYOUT_all( + 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_BSLS, KC_GRV, + 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_DEL, + KC_LCTL, 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_ENTER, + KC_LSFT, KC_BSLS, 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_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI), + + [1] = LAYOUT_all( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUSE, KC_UP, _______, KC_BSPC, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, S(KC_8), KC_SLSH, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, S(KC_EQL), KC_MINS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, MO(2)), + + [2] = LAYOUT_all( + RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______) + // clang-format on +}; diff --git a/keyboards/cipulot/ec_pro2/keymaps/via/config.h b/keyboards/cipulot/ec_pro2/keymaps/via/config.h new file mode 100644 index 000000000000..ebf954d07aca --- /dev/null +++ b/keyboards/cipulot/ec_pro2/keymaps/via/config.h @@ -0,0 +1,20 @@ +/* Copyright 2023 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// This is the size of the EEPROM for the custom VIA-specific data +#define EECONFIG_USER_DATA_SIZE 4 diff --git a/keyboards/cipulot/ec_pro2/keymaps/via/keymap.c b/keyboards/cipulot/ec_pro2/keymaps/via/keymap.c new file mode 100644 index 000000000000..767b76ea3e72 --- /dev/null +++ b/keyboards/cipulot/ec_pro2/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2023 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [0] = LAYOUT_all( + 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_BSLS, KC_GRV, + 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_DEL, + KC_LCTL, 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_ENTER, + KC_LSFT, KC_BSLS, 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_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI), + + [1] = LAYOUT_all( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUSE, KC_UP, _______, KC_BSPC, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, S(KC_8), KC_SLSH, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, S(KC_EQL), KC_MINS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, MO(2)), + + [2] = LAYOUT_all( + RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______) + // clang-format on +}; diff --git a/keyboards/cipulot/ec_pro2/keymaps/via/rules.mk b/keyboards/cipulot/ec_pro2/keymaps/via/rules.mk new file mode 100644 index 000000000000..520b11f20312 --- /dev/null +++ b/keyboards/cipulot/ec_pro2/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes + +SRC += via_apc.c diff --git a/keyboards/cipulot/ec_pro2/keymaps/via/via_apc.c b/keyboards/cipulot/ec_pro2/keymaps/via/via_apc.c new file mode 100644 index 000000000000..5ea77af44c8b --- /dev/null +++ b/keyboards/cipulot/ec_pro2/keymaps/via/via_apc.c @@ -0,0 +1,156 @@ +/* Copyright 2023 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ec_switch_matrix.h" +#include "action.h" +#include "via.h" + +void apc_init_thresholds(void); +void apc_set_threshold(bool is_for_actuation); + +// Declaring an _apc_config_t struct that will store our data +typedef struct _apc_config_t { + uint16_t actuation_threshold; + uint16_t release_threshold; +} apc_config; + +// Check if the size of the reserved persistent memory is the same as the size of struct apc_config +_Static_assert(sizeof(apc_config) == EECONFIG_USER_DATA_SIZE, "Mismatch in keyboard EECONFIG stored data"); + +// Declaring a new variable apc of type apc_config +apc_config apc; + +// Declaring enums for VIA config menu +enum via_apc_enums { + // clang-format off + id_apc_actuation_threshold = 1, + id_apc_release_threshold = 2 + // clang-format on +}; + +// Initializing persistent memory configuration: default values are declared and stored in PMEM +void eeconfig_init_user(void) { + // Default values + apc.actuation_threshold = DEFAULT_ACTUATION_LEVEL; + apc.release_threshold = DEFAULT_RELEASE_LEVEL; + // Write default value to EEPROM now + eeconfig_update_user_datablock(&apc); +} + +// On Keyboard startup +void keyboard_post_init_user(void) { + // Read custom menu variables from memory + eeconfig_read_user_datablock(&apc); + apc_init_thresholds(); +} + +// Handle the data received by the keyboard from the VIA menus +void apc_config_set_value(uint8_t *data) { + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch (*value_id) { + case id_apc_actuation_threshold: { + apc.actuation_threshold = value_data[1] | (value_data[0] << 8); + apc_set_threshold(true); + break; + } + case id_apc_release_threshold: { + apc.release_threshold = value_data[1] | (value_data[0] << 8); + apc_set_threshold(false); + break; + } + } +} + +// Handle the data sent by the keyboard to the VIA menus +void apc_config_get_value(uint8_t *data) { + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch (*value_id) { + case id_apc_actuation_threshold: { + value_data[0] = apc.actuation_threshold >> 8; + value_data[1] = apc.actuation_threshold & 0xFF; + break; + } + case id_apc_release_threshold: { + value_data[0] = apc.release_threshold >> 8; + value_data[1] = apc.release_threshold & 0xFF; + break; + } + } +} + +// Save the data to persistent memory after changes are made +void apc_config_save(void) { + eeconfig_update_user_datablock(&apc); +} + +void via_custom_value_command_kb(uint8_t *data, uint8_t length) { + // data = [ command_id, channel_id, value_id, value_data ] + uint8_t *command_id = &(data[0]); + uint8_t *channel_id = &(data[1]); + uint8_t *value_id_and_data = &(data[2]); + + if (*channel_id == id_custom_channel) { + switch (*command_id) { + case id_custom_set_value: { + apc_config_set_value(value_id_and_data); + break; + } + case id_custom_get_value: { + apc_config_get_value(value_id_and_data); + break; + } + case id_custom_save: { + apc_config_save(); + break; + } + default: { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + return; + } + + *command_id = id_unhandled; +} + +// Initialize the thresholds +void apc_init_thresholds(void) { + ecsm_config.ecsm_actuation_threshold = apc.actuation_threshold; + ecsm_config.ecsm_release_threshold = apc.release_threshold; + + // Update the ecsm_config + ecsm_update(&ecsm_config); +} + +// Set the thresholds +void apc_set_threshold(bool is_for_actuation) { + if (is_for_actuation) { + ecsm_config.ecsm_actuation_threshold = apc.actuation_threshold; + + } else { + ecsm_config.ecsm_release_threshold = apc.release_threshold; + } + // Update the ecsm_config + ecsm_update(&ecsm_config); +} diff --git a/keyboards/cipulot/ec_pro2/matrix.c b/keyboards/cipulot/ec_pro2/matrix.c new file mode 100644 index 000000000000..1850acf26414 --- /dev/null +++ b/keyboards/cipulot/ec_pro2/matrix.c @@ -0,0 +1,44 @@ +/* Copyright 2023 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ec_switch_matrix.h" +#include "matrix.h" + +/* matrix state(1:on, 0:off) */ +extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values + +void matrix_init_custom(void) { + // Default values, overwritten by VIA if enabled later + ecsm_config.ecsm_actuation_threshold = DEFAULT_ACTUATION_LEVEL; + ecsm_config.ecsm_release_threshold = DEFAULT_RELEASE_LEVEL; + + ecsm_init(&ecsm_config); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool updated = ecsm_matrix_scan(current_matrix); + +// RAW matrix values on console +#ifdef CONSOLE_ENABLE + static int cnt = 0; + if (cnt++ == 350) { + cnt = 0; + ecsm_print_matrix(); + } +#endif + return updated; +} diff --git a/keyboards/cipulot/ec_pro2/mcuconf.h b/keyboards/cipulot/ec_pro2/mcuconf.h new file mode 100644 index 000000000000..d91f576bd48b --- /dev/null +++ b/keyboards/cipulot/ec_pro2/mcuconf.h @@ -0,0 +1,22 @@ +/* Copyright 2023 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next + +#undef STM32_ADC_USE_ADC1 +#define STM32_ADC_USE_ADC1 TRUE diff --git a/keyboards/cipulot/ec_pro2/readme.md b/keyboards/cipulot/ec_pro2/readme.md new file mode 100644 index 000000000000..0ada16ec1937 --- /dev/null +++ b/keyboards/cipulot/ec_pro2/readme.md @@ -0,0 +1,27 @@ +# EC Pro2 + +![EC Pro 2 PCB](https://i.imgur.com/uYOgTYoh.png) + +HHKB Pro2 replacement PCB. + +* Keyboard Maintainer: [cipulot](https://github.com/cipulot) +* Hardware Supported: EC Pro2 PCB +* Hardware Availability: [Github](https://github.com/Cipulot/EC-Pro-2) + +Make example for this keyboard (after setting up your build environment): + + make cipulot/ec_pro2:default + +Flashing example for this keyboard: + + make cipulot/ec_pro2: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 Boot0 pins**: Short the Boot0 pins on the back of the PCB while plugging in the keyboard +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/cipulot/ec_pro2/rules.mk b/keyboards/cipulot/ec_pro2/rules.mk new file mode 100644 index 000000000000..b27b0f7ac071 --- /dev/null +++ b/keyboards/cipulot/ec_pro2/rules.mk @@ -0,0 +1,2 @@ +CUSTOM_MATRIX = lite +SRC += analog.c matrix.c ec_switch_matrix.c diff --git a/keyboards/crkbd/keymaps/markstos/config.h b/keyboards/crkbd/keymaps/markstos/config.h new file mode 100644 index 000000000000..ff00a04a8d14 --- /dev/null +++ b/keyboards/crkbd/keymaps/markstos/config.h @@ -0,0 +1,62 @@ +/* +This is the C configuration file for the keymap + + Copyright 2022 Mark Stosberg (@markstos) + SPDX-License-Identifier: GPL-2.0-or-later + +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +#define MASTER_RIGHT +// #define EE_HANDS + +//#define SSD1306OLED + + +// By default, when holding a dual-function key shortly after tapping it, the +// tapped key will begin repeating. This is handy for fast typists when typing +// words with double letters, such as "happy". If you turn this setting ON, it +// will be counted as a held modifier instead. +//#define TAPPING_FORCE_HOLD + +// Customized by markstos +#define TAPPING_TERM 200 +#define TAPPING_TERM_PER_KEY +// used for Tapping Term on thumb keys +#define TAPPING_TERM_THUMB 125 + +// If you press a dual-role key, press another key, and then release the +// dual-role key, all within the tapping term, by default the dual-role key +// will perform its tap action. If the HOLD_ON_OTHER_KEY_PRESS option is +// enabled, the dual-role key will perform its hold action instead. +#define HOLD_ON_OTHER_KEY_PRESS + +// markstos: not sure if these are correct +// They are intended to beep and flash during flashing +#define QMK_LED D5 +#define QMK_SPEAKER C6 + +// Prevent normal rollover on alphas from accidentally triggering mods. +#define IGNORE_MOD_TAP_INTERRUPT + +// When enabled, typing a mod-tap plus second within term will register as the mod-combo +// Ref: https://beta.docs.qmk.fm/using-qmk/software-features/tap_hold#permissive-hold +#define PERMISSIVE_HOLD + +#define COMBO_COUNT 2 + +// Set the COMBO_TERM so low that I won't type the keys one after each other during normal typing. +// They would have be held together intentionally to trigger this. +#define COMBO_TERM 40 + +// These mostly affect my one-shot Shift key, providing a CapsLock alternative. +// I want a relatively low timeout, so if I accidentally type "Shift", I can pause just briefly and move on. +#define ONESHOT_TAP_TOGGLE 3 /* Tapping this number of times holds the key until tapped once again. */ +#define ONESHOT_TIMEOUT 2000 /* Time (in ms) before the one shot key is released */ + diff --git a/keyboards/crkbd/keymaps/markstos/keymap.c b/keyboards/crkbd/keymaps/markstos/keymap.c new file mode 100644 index 000000000000..ca5be183b17e --- /dev/null +++ b/keyboards/crkbd/keymaps/markstos/keymap.c @@ -0,0 +1,112 @@ +// Copyright 2022 Mark Stosberg (@markstos) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + FUNC, + BACKLIT +}; + +enum combos { + DF_DASH, + JK_ESC +}; + +const uint16_t PROGMEM df_combo[] = {KC_D, KC_F, COMBO_END}; +const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + // Add commonly used dash to home row + [DF_DASH] = COMBO(df_combo, KC_MINS), + // For Vim, put Escape on the home row + [JK_ESC] = COMBO(jk_combo, KC_ESC), +}; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum custom_layers { + _QWERTY, + _LOWER, + _RAISE, + _FUNC, +}; + +// For _QWERTY layer +#define OSM_LCTL OSM(MOD_LCTL) +#define OSM_AGR OSM(MOD_RALT) +#define OSL_FUN OSL(_FUNC) +#define GUI_ENT GUI_T(KC_ENT) +#define LOW_TAB LT(_LOWER, KC_TAB) +#define RSE_BSP LT(_RAISE, KC_BSPC) +#define OSM_SFT OSM(MOD_LSFT) + + +// For _RAISE layer +#define CTL_ESC LCTL_T(KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_DEL , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + OSM(MOD_LALT), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H ,KC_J ,KC_K ,KC_L ,KC_QUOT ,OSM_AGR , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,OSL_FUN , + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + OSM_LCTL, GUI_ENT, LOW_TAB, RSE_BSP ,KC_SPC ,OSM_SFT + //`--------------------------' `--------------------------' + ), + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______ , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______ , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX , KC_TILD,KC_GRV, KC_LBRC, KC_LCBR, KC_RCBR, KC_RBRC, KC_COMM,KC_DOT, KC_SLSH, _______ , + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_TRNS, KC_TRNS, LOWER, KC_TRNS, KC_TRNS, KC_COLON + //`--------------------------' `--------------------------' + ), + + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, KC_DEL , XXXXXXX, KC_UNDS, KC_PLUS, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_PIPE,_______ , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_HOME, KC_END , KC_MINS, KC_EQL , KC_PGDN, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_APP ,_______ , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_LT , KC_GT , KC_COPY, KC_PSTE, KC_SCLN, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU,_______ , + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + CTL_ESC, KC_TRNS, XXXXXXX, RAISE , KC_TRNS, KC_TRNS + //`--------------------------' `--------------------------' + ), + + [_FUNC] = LAYOUT( + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 ,_______ , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_F11 , KC_F12 , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,_______ , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT,XXXXXXX , + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, FUNC , XXXXXXX + //`--------------------------' `--------------------------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(_RAISE, KC_BSPC): + return TAPPING_TERM_THUMB; + case LT(_LOWER, KC_TAB): + return TAPPING_TERM_THUMB; + default: + return TAPPING_TERM; + } +} diff --git a/keyboards/crkbd/keymaps/markstos/readme.md b/keyboards/crkbd/keymaps/markstos/readme.md new file mode 100644 index 000000000000..6789c9da30e1 --- /dev/null +++ b/keyboards/crkbd/keymaps/markstos/readme.md @@ -0,0 +1,15 @@ +# Markstos Corne keyboard layout + +![markstos 3x5+1 Corne layout](https://mark.stosberg.com/content/images/2022/11/markstos-3x5-plus-1-layout-v2.2.png) + +A primarily 3x5 layout for split ergonomic keywords with an extra column on each hand for rare and optional keys. + +For a detailed description see [markstos Corne layout](https://mark.stosberg.com/markstos-corne-3x5-1-keyboard-layout). + +# Disclaimer + +This is my personal layout and is subject to evolve further with my tastes. Fork your own copy if you need stability. Suggestions welcome. + +# Author + +* [Mark Stosberg](mailto:mark@stosberg.com) diff --git a/keyboards/crkbd/keymaps/markstos/rules.mk b/keyboards/crkbd/keymaps/markstos/rules.mk new file mode 100644 index 000000000000..9bca23db9517 --- /dev/null +++ b/keyboards/crkbd/keymaps/markstos/rules.mk @@ -0,0 +1,11 @@ +# markstos: enable media keys +EXTRAKEY_ENABLE = yes + +# markstos: smaller file size, little down-side +LTO_ENABLE = yes + +COMBO_ENABLE = yes + +# This is for RGB *underglow* +# https://github.com/qmk/qmk_firmware/blob/master/docs/feature_rgblight.md +RGBLIGHT_ENABLE = no diff --git a/keyboards/frobiac/blackbowl/blackbowl.h b/keyboards/frobiac/blackbowl/blackbowl.h new file mode 100644 index 000000000000..21ebee897edf --- /dev/null +++ b/keyboards/frobiac/blackbowl/blackbowl.h @@ -0,0 +1,32 @@ +// Copyright 2023 @frobiac +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "quantum.h" +#include +#include +#include "i2c_master.h" +#include "wait.h" + +extern uint8_t expander_status; +extern uint8_t expander_input_pin_mask; +extern bool i2c_initialized; + +void init_blackbowl(void); +void init_expander(void); + +// clang-format off +#define I2C_TIMEOUT 100 +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 + +#define xxx KC_NO + +// clang-format on diff --git a/keyboards/frobiac/blackbowl/config.h b/keyboards/frobiac/blackbowl/config.h new file mode 100644 index 000000000000..cb13e694236a --- /dev/null +++ b/keyboards/frobiac/blackbowl/config.h @@ -0,0 +1,56 @@ +// Copyright 2012 Jun Wako +// Copyright 2013 Oleg Kostyuk +// Copyright 2017 Erin Call +// Copyright 2023 @frobiac +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define MATRIX_ROWS 10 +#define MATRIX_COLS 4 +#define EXPANDER_COL_REGISTER GPIOA +#define EXPANDER_ROW_REGISTER GPIOB + +#ifdef PS2_MOUSE_ENABLE +# define PS2_MOUSE_USE_REMOTE_MODE +# define PS2_MOUSE_INIT_DELAY 1000 +#endif + +// clang-format off +#ifdef PS2_DRIVER_USART + +# define PS2_CLOCK_PIN D5 +# define PS2_DATA_PIN D2 + + /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ + /* set DDR of CLOCK as input to be slave */ + #define PS2_USART_INIT() do { \ + PS2_CLOCK_DDR &= ~(1< +// Copyright 2017 Erin Call +// Copyright 2023 @frobiac +// SPDX-License-Identifier: GPL-2.0-or-later + +// This implements a matrix scan (lite) for the BlackBowl keyboard. +// Each side has a dedicated MCP23018 I2C expander. + +#include +#include +#include +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "blackbowl.h" +#include "i2c_master.h" +#include "timer.h" + +#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) +#define ROW_SHIFTER ((matrix_row_t)1) + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); + +static uint8_t expander_reset_loop; +uint8_t expander_status; +const uint8_t expander_input_mask = ((1 << MATRIX_ROWS_PER_SIDE) - 1); // No special mapping, 5 bits [0..4] per side +bool i2c_initialized = false; + +static const uint8_t I2C_ADDR_RIGHT = 0x4E; +static const uint8_t I2C_ADDR_LEFT = 0x46; +static const uint8_t i2c_addr[] = {I2C_ADDR_RIGHT, I2C_ADDR_LEFT}; + +void matrix_init_custom(void) { + if (!i2c_initialized) { + i2c_init(); + wait_ms(1000); + } + + // Pin direction and pull-up depends on diode direction and column register: + // ROW2COL, GPIOA => input, output + uint8_t direction[2] = {0, expander_input_mask}; + uint8_t pullup[2] = {0, expander_input_mask}; + + for (uint8_t i = 0; i < 2; ++i) { + expander_status = i2c_writeReg(i2c_addr[i], IODIRA, direction, 2, I2C_TIMEOUT); + if (expander_status) return; + + expander_status = i2c_writeReg(i2c_addr[i], GPPUA, pullup, 2, I2C_TIMEOUT); + } +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool matrix_has_changed = false; + + if (expander_status) { // if there was an error + ++expander_reset_loop; + if (++expander_reset_loop == 0) { + // since expander_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + matrix_init_custom(); + } + } + + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + matrix_has_changed |= read_rows_on_col(current_matrix, current_col); + } + + return matrix_has_changed; +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + bool matrix_changed = false; + uint8_t port = 0xFF & ~(1 << current_col); + uint8_t column_state[] = {0, 0}; + + // On both expanders: select col and read rows + for (size_t i = 0; i < 2; ++i) { + if (!expander_status) { + expander_status = i2c_writeReg(i2c_addr[i], EXPANDER_COL_REGISTER, &port, 1, I2C_TIMEOUT); + } + wait_us(30); + + if (expander_status) { + return false; + } + + expander_status = i2c_readReg(i2c_addr[i], EXPANDER_ROW_REGISTER, &column_state[i], 1, I2C_TIMEOUT); + column_state[i] = (~column_state[i]) & ((1 << MATRIX_ROWS_PER_SIDE) - 1); + } + + // now map rows 0..4 on each side to cumulative to 0..9 + uint16_t col_state = column_state[0] | ((column_state[1] << MATRIX_ROWS_PER_SIDE) /*& 0x3e0*/); + + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + if (col_state & (1 << current_row)) { + // key closed; set state bit in matrix + current_matrix[current_row] |= (ROW_SHIFTER << current_col); + } else { + // key open; clear state bit in matrix + current_matrix[current_row] &= ~(ROW_SHIFTER << current_col); + } + + // Determine whether the matrix changed state + if ((last_row_value != current_matrix[current_row]) && !(matrix_changed)) { + matrix_changed = true; + } + } + return matrix_changed; +} diff --git a/keyboards/frobiac/blackbowl/readme.md b/keyboards/frobiac/blackbowl/readme.md new file mode 100644 index 000000000000..3150ca204653 --- /dev/null +++ b/keyboards/frobiac/blackbowl/readme.md @@ -0,0 +1,36 @@ +# frobiac/blackbowl + +![frobiac/blackbowl](https://i.imgur.com/nehpp3fh.jpeg) + +Custom 3D-printed and handwired 36-key split-keyboard with trackpoint developed in 2016. + +* Keyboard Maintainer: [frobiac](https://github.com/frobiac) +* Hardware Supported: Teensy-2.0, IBM Trackpoint, one MCP23018 per side, one RGB-LED +* Development History: [deskthority.net](https://deskthority.net/viewtopic.php?p=344785#p344785) +* Layout [Alpha KLE](http://www.keyboard-layout-editor.com/#/gists/6a6ec84d59fc346effbe894af159eabd) (same as BlackBowl) +* [Original Firmware](https://github.com/frobiac/adnw) + +Make example for this keyboard (after setting up your build environment): + + make frobiac/blackbowl + +Flashing example for this keyboard: + + make frobiac/blackbowl: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). + + +The I2C code is based on the code from 'handwired/dactyl', +but reduced to ROW2COL and EXPANDER_COL_REGISTER=GPIOA define choices. +Adjustments were made for the two I2C addresses, one per side. + + +## Bootloader + +Enter the bootloader in 2 ways: + +* **Physical reset button**: Briefly press the button on the Teensy by inserting a small pin in the small hole in the switch plate +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available + + diff --git a/keyboards/frobiac/blackbowl/rules.mk b/keyboards/frobiac/blackbowl/rules.mk new file mode 100644 index 000000000000..6004c37f9eaa --- /dev/null +++ b/keyboards/frobiac/blackbowl/rules.mk @@ -0,0 +1,9 @@ +CUSTOM_MATRIX = lite + +# project specific files +QUANTUM_LIB_SRC += i2c_master.c +SRC += matrix.c + +PS2_MOUSE_ENABLE = yes +PS2_ENABLE = yes +PS2_DRIVER = usart diff --git a/keyboards/frobiac/blackflat/config.h b/keyboards/frobiac/blackflat/config.h new file mode 100644 index 000000000000..20801757dc51 --- /dev/null +++ b/keyboards/frobiac/blackflat/config.h @@ -0,0 +1,12 @@ +// Copyright 2023 @frobiac +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#ifdef PS2_MOUSE_ENABLE +# define PS2_DATA_PIN D4 +# define PS2_CLOCK_PIN B3 + +# define PS2_MOUSE_USE_REMOTE_MODE +# define PS2_MOUSE_INIT_DELAY 1000 +#endif diff --git a/keyboards/frobiac/blackflat/info.json b/keyboards/frobiac/blackflat/info.json new file mode 100644 index 000000000000..0d9981658274 --- /dev/null +++ b/keyboards/frobiac/blackflat/info.json @@ -0,0 +1,85 @@ +{ + "manufacturer": "frobiac", + "keyboard_name": "blackflat", + "url": "https://www.github.com/frobiac/adnw", + "maintainer": "frobiac", + "bootloader": "halfkay", + "processor": "atmega32u4", + "diode_direction": "COL2ROW", + "features": { + "audio": false, + "backlight": false, + "bootmagic": false, + "command": false, + "console": false, + "dynamic_macro": true, + "extrakey": true, + "mousekey": true, + "nkro": false, + "unicode": false, + "rgblight": false + }, + "build": { + "lto": true + }, + "matrix_pins": { + "cols": ["F0", "F1", "F4", "F5", "F6"], + "rows": ["B6", "B5", "B4", "F7", "D2", "C6", "C7", "D5"] + }, + "usb": { + "device_version": "1.0.0", + "pid": "0x1D50", + "vid": "0x6033" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "label":"K", "x":0, "y":1.00}, + {"matrix": [0, 1], "label":"U", "x":1, "y":0.50}, + {"matrix": [0, 2], "label":"Q", "x":2, "y":0.00}, + {"matrix": [0, 3], "label":".", "x":3, "y":0.00}, + {"matrix": [0, 4], "label":"J", "x":4, "y":0.00}, + + {"matrix": [4, 0], "label":"P", "x":6, "y":0.00}, + {"matrix": [4, 1], "label":"C", "x":7, "y":0.00}, + {"matrix": [4, 2], "label":"L", "x":8, "y":0.00}, + {"matrix": [4, 3], "label":"M", "x":9, "y":0.50}, + {"matrix": [4, 4], "label":"F", "x":10, "y":1.00}, + + {"matrix": [1, 0], "label":"H", "x":0, "y":2.00}, + {"matrix": [1, 1], "label":"I", "x":1, "y":1.50}, + {"matrix": [1, 2], "label":"E", "x":2, "y":1.00}, + {"matrix": [1, 3], "label":"A", "x":3, "y":1.00}, + {"matrix": [1, 4], "label":"O", "x":4, "y":1.00}, + + {"matrix": [5, 0], "label":"D", "x":6, "y":1.00}, + {"matrix": [5, 1], "label":"T", "x":7, "y":1.00}, + {"matrix": [5, 2], "label":"R", "x":8, "y":1.00}, + {"matrix": [5, 3], "label":"N", "x":9, "y":1.50}, + {"matrix": [5, 4], "label":"S", "x":10, "y":2.00}, + + {"matrix": [2, 0], "label":"X", "x":0, "y":3.00}, + {"matrix": [2, 1], "label":"Y", "x":1, "y":2.50}, + {"matrix": [2, 2], "label":"-", "x":2, "y":2.00}, + {"matrix": [2, 3], "label":",", "x":3, "y":2.00}, + {"matrix": [2, 4], "label":"/", "x":4, "y":2.00}, + + {"matrix": [6, 0], "label":"B", "x":6, "y":2.00}, + {"matrix": [6, 1], "label":"G", "x":7, "y":2.00}, + {"matrix": [6, 2], "label":"W", "x":8, "y":2.00}, + {"matrix": [6, 3], "label":"V", "x":9, "y":2.50}, + {"matrix": [6, 4], "label":"Z", "x":10, "y":3.00}, + + {"matrix": [3, 0], "label":"", "x":0, "y":0.00}, + {"matrix": [3, 2], "label":"Gui", "x":2, "y":3.00}, + {"matrix": [3, 3], "label":"Tab", "x":3, "y":3.00}, + {"matrix": [3, 4], "label":"Spc", "x":4, "y":3.00}, + + {"matrix": [7, 0], "label":"L2", "x":6, "y":3.00}, + {"matrix": [7, 1], "label":"Sh", "x":7, "y":3.00}, + {"matrix": [7, 2], "label":"L3", "x":8, "y":3.00}, + {"matrix": [7, 4], "label":"Fx", "x":10, "y":0.00} + ] + } + } +} diff --git a/keyboards/frobiac/blackflat/keymaps/default/keymap.c b/keyboards/frobiac/blackflat/keymaps/default/keymap.c new file mode 100644 index 000000000000..8cf73b9316a9 --- /dev/null +++ b/keyboards/frobiac/blackflat/keymaps/default/keymap.c @@ -0,0 +1,85 @@ +// Copyright 2023 @frobiac +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +#include "keymap_german.h" + +enum layer_number { + _ADNW = 0, + _QWERTZ, + _NAVNUM, + _SYMBOL, + _FUNC, + _MOUSE, +}; + +#define CTL_TAB LCTL_T(KC_TAB) +#define ALT_SPC LALT_T(KC_SPC) +#define NAV_ESC LT(_NAVNUM, KC_ESC) +#define SFT_BSP LSFT_T(KC_BSPC) +#define SYM_ENT LT(_SYMBOL, KC_ENT) +#define MOUSE_X LT(_MOUSE, KC_X) +#define MOUSE_Y LT(_MOUSE, KC_Y) + +/* + * ┌───┐ ┌───┬───┬───┐ ┌───┬───┬───┐RST┌───┐ + * │MOU├───┤ Q │ . │ J │ │ P │ C │ L ├───┤Fx │ + * ├───┤ U ├───┼───┼───┤ ├─[TP]──┼───┤ M ├───┤ + * │ K ├───┤ E │ A │ O │ │ D │ T │ R ├───┤ F │ + * ├───┤ I ├───┼───┼───┤ ├───┼───┼───┤ N ├───┤ + * │ H ├───┤ - │ ; │ / │ │ D │ G │ W ├───┤ S │ + * ├───┤ Y ├───┼───┼───┤ ├───┼───┼───┤ V ├───┤ + * │ X ├───┤ │Tab│Spc│ │Esc│Bsp│Ret├───┤ Z │ + * └───┘ └───┴───┴───┘ └───┴───┴───┘ └───┘ + * + */ + +// clang-format off + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_ADNW] = LAYOUT( + KC_K, KC_U, KC_Q, KC_DOT, KC_J, KC_P, KC_C, KC_L, KC_M, KC_F, + KC_H, KC_I, KC_E, KC_A, KC_O, KC_D, KC_T, KC_R, KC_N, KC_S, + MOUSE_X, DE_Y, DE_MINS, KC_COMM, DE_SLSH, KC_B, KC_G, KC_W, KC_V, RSFT_T(DE_Z), + XXXXXXX, KC_LGUI, CTL_TAB, ALT_SPC, NAV_ESC, SFT_BSP, SYM_ENT, MO(_FUNC) + ), + + [_QWERTZ] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + MOUSE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), + XXXXXXX, KC_LGUI, CTL_TAB, ALT_SPC, NAV_ESC, SFT_BSP, SYM_ENT, MO(_FUNC) + ), + + [_SYMBOL] = LAYOUT( + DE_AT, DE_DEG, DE_LBRC, DE_RBRC, DE_HASH, DE_EXLM, DE_LABK, DE_RABK, DE_EQL, DE_AMPR, + DE_BSLS, DE_EURO, DE_LCBR, DE_RCBR, DE_ASTR, DE_QUES, DE_LPRN, DE_RPRN, DE_PLUS, KC_ENT, + XXXXXXX, DE_DLR, DE_PIPE, DE_TILD, DE_GRV, DE_CIRC, DE_PERC, DE_DQUO, DE_QUOT, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_NAVNUM] = LAYOUT( + KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, DE_SS, KC_7, KC_8, KC_9, DE_ADIA, + KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_DOT, KC_4, KC_5, KC_6, DE_ODIA, + XXXXXXX, XXXXXXX, KC_INS, XXXXXXX, XXXXXXX, KC_0, KC_1, KC_2, KC_3, DE_UDIA, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_FUNC] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, DF(_QWERTZ),DF(_ADNW), XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, + DM_REC1, DM_RSTP, DM_PLY1, XXXXXXX, QK_RBT, XXXXXXX, KC_F4, KC_F5, KC_F6, KC_F11, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_MOUSE] = LAYOUT( + KC_WH_L, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, KC_ACL0, XXXXXXX, KC_BTN3, XXXXXXX, KC_BTN5, + KC_WH_R, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, KC_ACL1, XXXXXXX, KC_BTN1, KC_BTN2, KC_BTN4, + MOUSE_X, KC_BTN1, KC_BTN3, KC_BTN2, KC_WH_D, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +// clang-format on diff --git a/keyboards/frobiac/blackflat/readme.md b/keyboards/frobiac/blackflat/readme.md new file mode 100644 index 000000000000..1bfba962f1bd --- /dev/null +++ b/keyboards/frobiac/blackflat/readme.md @@ -0,0 +1,31 @@ +# frobiac/blackflat + +![frobiac/blackflat](https://i.imgur.com/eaewuolh.jpeg) + +Custom 3D-printed and handwired 36-key split-keyboard with trackpoint developed in 2016. + +* Keyboard Maintainer: [frobiac](https://github.com/frobiac) +* Hardware Supported: Teensy-2.0, IBM Trackpoint +* Development History: [deskthority.net](https://deskthority.net/viewtopic.php?p=339638#p339638) +* Layout [Alpha KLE](http://www.keyboard-layout-editor.com/#/gists/6a6ec84d59fc346effbe894af159eabd) (same as BlackBowl) +* [Original Firmware](https://github.com/frobiac/adnw) + +Make example for this keyboard (after setting up your build environment): + + make frobiac/blackflat + +Flashing example for this keyboard: + + make frobiac/blackflat: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 2 ways: + +* **Physical reset button**: Briefly press the button between left-hand topmost ringfinger key and USB socket +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available + + + diff --git a/keyboards/frobiac/blackflat/rules.mk b/keyboards/frobiac/blackflat/rules.mk new file mode 100644 index 000000000000..6e7633bfe015 --- /dev/null +++ b/keyboards/frobiac/blackflat/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/frobiac/hypernano/config.h b/keyboards/frobiac/hypernano/config.h new file mode 100644 index 000000000000..843ad6f55b28 --- /dev/null +++ b/keyboards/frobiac/hypernano/config.h @@ -0,0 +1,17 @@ +// Copyright 2023 @frobiac +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#ifdef PS2_MOUSE_ENABLE +# define PS2_RESET_PIN B0 +# define PS2_DATA_PIN B1 +# define PS2_CLOCK_PIN B2 + +# define PS2_MOUSE_INVERT_X +# define PS2_MOUSE_INVERT_Y + +# define PS2_MOUSE_USE_REMOTE_MODE +# define PS2_MOUSE_INIT_DELAY 1000 +#endif + diff --git a/keyboards/frobiac/hypernano/info.json b/keyboards/frobiac/hypernano/info.json new file mode 100644 index 000000000000..30113e182efd --- /dev/null +++ b/keyboards/frobiac/hypernano/info.json @@ -0,0 +1,84 @@ +{ + "manufacturer": "frobiac", + "keyboard_name": "hypernano", + "url": "https://www.github.com/frobiac/adnw", + "maintainer": "frobiac", + "bootloader": "halfkay", + "processor": "atmega32u4", + "diode_direction": "COL2ROW", + "features": { + "audio": false, + "backlight": false, + "bootmagic": false, + "command": false, + "console": false, + "dynamic_macro": true, + "extrakey": true, + "mousekey": true, + "nkro": false, + "unicode": false, + "rgblight": false + }, + "build": { + "lto": true + }, + "matrix_pins": { + "cols": ["F6", "F5", "F4", "F1", "F0", "F7"], + "rows": ["D7", "D6", "D5", "D4", "D3", "D2", "D1", "D0"] + }, + "usb": { + "device_version": "1.0.0", + "pid": "0x1D50", + "vid": "0x6033" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 0], "label":"K", "x":0, "y":0, "w":1.5}, + { "matrix": [0, 1], "label":"U", "x":1.5, "y":0}, + { "matrix": [0, 2], "label":"Q", "x":2.5, "y":0}, + { "matrix": [0, 3], "label":".", "x":3.5, "y":0}, + { "matrix": [0, 4], "label":"J", "x":4.5, "y":0}, + { "matrix": [1, 1], "label":"P", "x":7.5, "y":0}, + { "matrix": [1, 2], "label":"C", "x":8.5, "y":0}, + { "matrix": [1, 3], "label":"L", "x":9.5, "y":0}, + { "matrix": [1, 4], "label":"M", "x":10.5, "y":0}, + { "matrix": [1, 5], "label":"F", "x":11.5, "y":0, "w":1.5}, + { "matrix": [2, 0], "label":"H", "x":0, "y":1, "w":1.25}, + { "matrix": [2, 1], "label":"I", "x":1.25, "y":1}, + { "matrix": [2, 2], "label":"E", "x":2.25, "y":1}, + { "matrix": [2, 3], "label":"A", "x":3.25, "y":1}, + { "matrix": [2, 4], "label":"O", "x":4.25, "y":1}, + { "matrix": [3, 1], "label":"D", "x":7.75, "y":1}, + { "matrix": [3, 2], "label":"T", "x":8.75, "y":1}, + { "matrix": [3, 3], "label":"R", "x":9.75, "y":1}, + { "matrix": [3, 4], "label":"N", "x":10.75, "y":1}, + { "matrix": [3, 5], "label":"S", "x":11.75, "y":1, "w":1.25}, + { "matrix": [4, 0], "label":"X", "x":0, "y":2}, + { "matrix": [4, 1], "label":"Y", "x":1, "y":2}, + { "matrix": [4, 2], "label":"-", "x":2, "y":2}, + { "matrix": [4, 3], "label":",", "x":3, "y":2}, + { "matrix": [4, 4], "label":"/", "x":4, "y":2}, + { "matrix": [4, 5], "label":"", "x":5, "y":2}, + { "matrix": [5, 0], "label":"", "x":7, "y":2}, + { "matrix": [5, 1], "label":"B", "x":8, "y":2}, + { "matrix": [5, 2], "label":"G", "x":9, "y":2}, + { "matrix": [5, 3], "label":"W", "x":10, "y":2}, + { "matrix": [5, 4], "label":"V", "x":11, "y":2}, + { "matrix": [5, 5], "label":"Z", "x":12, "y":2}, + { "matrix": [6, 0], "label":"", "x":0, "y":3, "w":1.25}, + { "matrix": [6, 1], "label":"", "x":1.25, "y":3}, + { "matrix": [6, 2], "label":"Gui", "x":2.25, "y":3}, + { "matrix": [6, 3], "label":"Tab", "x":3.25, "y":3}, + { "matrix": [6, 4], "label":"Spc", "x":4.25, "y":3}, + { "matrix": [6, 5], "label":"", "x":5.25, "y":3}, + { "matrix": [7, 0], "label":"", "x":6.75, "y":3}, + { "matrix": [7, 1], "label":"L2", "x":7.75, "y":3}, + { "matrix": [7, 2], "label":"Sh", "x":8.75, "y":3}, + { "matrix": [7, 3], "label":"L3", "x":9.75, "y":3}, + { "matrix": [7, 4], "label":"", "x":10.75, "y":3}, + { "matrix": [7, 5], "label":"", "x":11.75, "y":3, "w":1.25} + ] + } + } +} diff --git a/keyboards/frobiac/hypernano/keymaps/default/keymap.c b/keyboards/frobiac/hypernano/keymaps/default/keymap.c new file mode 100644 index 000000000000..5e5277805fc7 --- /dev/null +++ b/keyboards/frobiac/hypernano/keymaps/default/keymap.c @@ -0,0 +1,85 @@ +// Copyright 2023 @frobiac +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +#include "keymap_german.h" + +enum layer_number { + _ADNW = 0, + _QWERTZ, + _NAVNUM, + _SYMBOL, + _FUNC, + _MOUSE, +}; + +#define CTL_TAB LCTL_T(KC_TAB) +#define ALT_SPC LALT_T(KC_SPC) +#define NAV_ESC LT(_NAVNUM, KC_ESC) +#define SFT_BSP LSFT_T(KC_BSPC) +#define SYM_ENT LT(_SYMBOL, KC_ENT) +#define MOUSE_X LT(_MOUSE, KC_X) +#define MOUSE_Y LT(_MOUSE, KC_Y) + +/* + * ┌─────┬───┬───┬───┬───┐───────┌───┬───┬───┬───┬─────┐ + * │ K │ U │ Q │ . │ J │ │ P │ C │ L │ M │ F │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┘ _ └┬──┴┬──┴┬──┴┬──┴┬────┤ + * │ H │ I │ E │ A │ O │ (_) │ D │ T │ R │ N │ S │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┐ ┌──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │ X │ Y │ - │ , │ / │ │ │ │ B │ G │ W │ V │ Z │ + * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ┌┴──┬┴──┬┴──┬┴──┬┴──┬┴───┤ + * │ │ │ │Tab│Spc│ │o│ │Esc│Bsp│Ret│ │ │ + * └────┴───┴───┴───┴───┴───┘─└───┴───┴───┴───┴───┴────┘ + * + */ + +// clang-format off + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_ADNW] = LAYOUT( + KC_K, KC_U, KC_Q, KC_DOT, KC_J, KC_P, KC_C, KC_L, KC_M, KC_F, + KC_H, KC_I, KC_E, KC_A, KC_O, KC_D, KC_T, KC_R, KC_N, KC_S, + MOUSE_X, DE_Y, DE_MINS, KC_COMM, DE_SLSH, XXXXXXX, XXXXXXX, KC_B, KC_G, KC_W, KC_V, RSFT_T(DE_Z), + XXXXXXX, XXXXXXX, KC_LGUI, CTL_TAB, ALT_SPC, XXXXXXX, XXXXXXX, NAV_ESC, SFT_BSP, SYM_ENT, XXXXXXX, MO(_FUNC) + ), + + [_QWERTZ] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + MOUSE_Y, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), + XXXXXXX, XXXXXXX, KC_LGUI, CTL_TAB, ALT_SPC, XXXXXXX, XXXXXXX, NAV_ESC, SFT_BSP, SYM_ENT, XXXXXXX, MO(_FUNC) + ), + + [_SYMBOL] = LAYOUT( + DE_AT, DE_DEG, DE_LBRC, DE_RBRC, DE_HASH, DE_EXLM, DE_LABK, DE_RABK, DE_EQL, DE_AMPR, + DE_BSLS, DE_EURO, DE_LCBR, DE_RCBR, DE_ASTR, DE_QUES, DE_LPRN, DE_RPRN, DE_PLUS, KC_ENT, + XXXXXXX, DE_DLR, DE_PIPE, DE_TILD, DE_GRV, XXXXXXX, XXXXXXX, DE_CIRC, DE_PERC, DE_DQUO, DE_QUOT, XXXXXXX, + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______ + ), + + [_NAVNUM] = LAYOUT( + KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, DE_SS, KC_7, KC_8, KC_9, DE_ADIA, + KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_DOT, KC_4, KC_5, KC_6, DE_ODIA, + XXXXXXX, XXXXXXX, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_0, KC_1, KC_2, KC_3, DE_UDIA, + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______ + ), + + [_FUNC] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, DF(_QWERTZ),DF(_ADNW), XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, + DM_REC1, DM_RSTP, DM_PLY1, XXXXXXX, QK_RBT, XXXXXXX, KC_F4, KC_F5, KC_F6, KC_F11, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F12, + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______ + ), + + [_MOUSE] = LAYOUT( + KC_WH_L, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, KC_ACL0, XXXXXXX, KC_BTN3, XXXXXXX, KC_BTN5, + KC_WH_R, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, KC_ACL1, XXXXXXX, KC_BTN1, KC_BTN2, KC_BTN4, + MOUSE_X, KC_BTN1, KC_BTN3, KC_BTN2, KC_WH_D, XXXXXXX, XXXXXXX, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______ + ), + +}; + +// clang-format on diff --git a/keyboards/frobiac/hypernano/readme.md b/keyboards/frobiac/hypernano/readme.md new file mode 100644 index 000000000000..849ea8198759 --- /dev/null +++ b/keyboards/frobiac/hypernano/readme.md @@ -0,0 +1,30 @@ +# frobiac/hypernano + +![frobiac/hypernano](https://i.imgur.com/ZVGtpBbh.jpeg) + +Custom 3D-printed and handwired 44-key keyboard with trackpoint developed in 2013. + +* Keyboard Maintainer: [frobiac](https://github.com/frobiac) +* Hardware Supported: Teensy-2.0, IBM Trackpoint +* Development History: [deskthority.net](https://deskthority.net/viewtopic.php?p=98734#p98734) +* Layout [Alpha KLE](http://www.keyboard-layout-editor.com/#/gists/e4f60451766bbe7002c0b9a9ddfb3e34) +* [Original Firmware](https://github.com/frobiac/adnw) + +Make example for this keyboard (after setting up your build environment): + + make frobiac/hypernano + +Flashing example for this keyboard: + + make frobiac/hypernano:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Physical reset button**: Briefly press the button in the middle of the bottom row +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available + + diff --git a/keyboards/frobiac/hypernano/rules.mk b/keyboards/frobiac/hypernano/rules.mk new file mode 100644 index 000000000000..6e7633bfe015 --- /dev/null +++ b/keyboards/frobiac/hypernano/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/frobiac/readme.md b/keyboards/frobiac/readme.md new file mode 100644 index 000000000000..600cf34cfeba --- /dev/null +++ b/keyboards/frobiac/readme.md @@ -0,0 +1 @@ +Collection of keyboards previously supported by custom firmware and now ported to QMK. diff --git a/keyboards/frobiac/redtilt/config.h b/keyboards/frobiac/redtilt/config.h new file mode 100644 index 000000000000..5eb0f8bc3d42 --- /dev/null +++ b/keyboards/frobiac/redtilt/config.h @@ -0,0 +1,14 @@ +// Copyright 2023 @frobiac +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#ifdef PS2_MOUSE_ENABLE +# define PS2_RESET_PIN B0 +# define PS2_DATA_PIN B1 +# define PS2_CLOCK_PIN B2 + +# define PS2_MOUSE_USE_REMOTE_MODE +# define PS2_MOUSE_INIT_DELAY 1000 +# define PS2_MOUSE_ROTATE 90 +#endif diff --git a/keyboards/frobiac/redtilt/info.json b/keyboards/frobiac/redtilt/info.json new file mode 100644 index 000000000000..f2f5d27f3574 --- /dev/null +++ b/keyboards/frobiac/redtilt/info.json @@ -0,0 +1,94 @@ +{ + "manufacturer": "frobiac", + "keyboard_name": "redtilt", + "url": "https://www.github.com/frobiac/adnw", + "maintainer": "frobiac", + "bootloader": "halfkay", + "processor": "atmega32u4", + "diode_direction": "COL2ROW", + "features": { + "audio": false, + "backlight": false, + "bootmagic": false, + "command": false, + "console": false, + "dynamic_macro": true, + "extrakey": true, + "mousekey": true, + "nkro": false, + "unicode": false, + "rgblight": false + }, + "build": { + "lto": true + }, + "matrix_pins": { + "cols": ["F0", "F1", "F4", "F5", "F6", "F7"], + "rows": ["D3", "D2", "D1", "D0", "B5", "B4", "D7", "B6"] + }, + "usb": { + "device_version": "1.0.0", + "pid": "0x1D50", + "vid": "0x6033" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "label":"", "x":0, "y":2.00}, + {"matrix": [0, 1], "label":"K", "x":1, "y":2.00}, + {"matrix": [0, 2], "label":"U", "x":2, "y":1.50}, + {"matrix": [0, 3], "label":"Q", "x":3, "y":1.00}, + {"matrix": [0, 4], "label":".", "x":4, "y":1.00}, + {"matrix": [0, 5], "label":"J", "x":5, "y":1.00}, + + {"matrix": [4, 0], "label":"P", "x":8, "y":1.00}, + {"matrix": [4, 1], "label":"C", "x":9, "y":1.00}, + {"matrix": [4, 2], "label":"L", "x":10, "y":1.00}, + {"matrix": [4, 3], "label":"M", "x":11, "y":1.50}, + {"matrix": [4, 4], "label":"F", "x":12, "y":2.00}, + {"matrix": [4, 5], "label":"", "x":13, "y":2.00}, + + {"matrix": [1, 0], "label":" ", "x":0, "y":3.00}, + {"matrix": [1, 1], "label":"H", "x":1, "y":3.00}, + {"matrix": [1, 2], "label":"I", "x":2, "y":2.50}, + {"matrix": [1, 3], "label":"E", "x":3, "y":2.00}, + {"matrix": [1, 4], "label":"A", "x":4, "y":2.00}, + {"matrix": [1, 5], "label":"O", "x":5, "y":2.00}, + + {"matrix": [5, 0], "label":"D", "x":8, "y":2.00}, + {"matrix": [5, 1], "label":"T", "x":9, "y":2.00}, + {"matrix": [5, 2], "label":"R", "x":10, "y":2.00}, + {"matrix": [5, 3], "label":"N", "x":11, "y":2.50}, + {"matrix": [5, 4], "label":"S", "x":12, "y":3.00}, + {"matrix": [5, 5], "label":"", "x":13, "y":3.00}, + + {"matrix": [2, 0], "label":"", "x":0, "y":4.00}, + {"matrix": [2, 1], "label":"X", "x":1, "y":4.00}, + {"matrix": [2, 2], "label":"Y", "x":2, "y":3.50}, + {"matrix": [2, 3], "label":"-", "x":3, "y":3.00}, + {"matrix": [2, 4], "label":",", "x":4, "y":3.00}, + {"matrix": [2, 5], "label":"/", "x":5, "y":3.00}, + + {"matrix": [6, 0], "label":"B", "x":8, "y":3.00}, + {"matrix": [6, 1], "label":"G", "x":9, "y":3.00}, + {"matrix": [6, 2], "label":"W", "x":10, "y":3.00}, + {"matrix": [6, 3], "label":"V", "x":11, "y":3.50}, + {"matrix": [6, 4], "label":"Z", "x":12, "y":4.00}, + {"matrix": [6, 5], "label":"", "x":13, "y":4.00}, + + {"matrix": [3, 0], "label":"", "x":0, "y":1.00}, + {"matrix": [3, 1], "label":"", "x":1, "y":1.00}, + {"matrix": [3, 3], "label":"Gui", "x":3, "y":4.00}, + {"matrix": [3, 4], "label":"Tab", "x":4, "y":4.00}, + {"matrix": [3, 5], "label":"Spc", "x":5, "y":4.00}, + + {"matrix": [7, 0], "label":"L2", "x":8, "y":4.00}, + {"matrix": [7, 1], "label":"Sh", "x":9, "y":4.00}, + {"matrix": [7, 2], "label":"L3", "x":10, "y":4.00}, + {"matrix": [7, 4], "label":"Fx", "x":12, "y":1.00}, + {"matrix": [7, 5], "label":"", "x":13, "y":1.00} + ] + } + } +} + diff --git a/keyboards/frobiac/redtilt/keymaps/default/keymap.c b/keyboards/frobiac/redtilt/keymaps/default/keymap.c new file mode 100644 index 000000000000..d6df7a9db31d --- /dev/null +++ b/keyboards/frobiac/redtilt/keymaps/default/keymap.c @@ -0,0 +1,87 @@ +// Copyright 2023 @frobiac +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +#include "keymap_german.h" + +enum layer_number { + _ADNW = 0, + _QWERTZ, + _NAVNUM, + _SYMBOL, + _FUNC, + _MOUSE, +}; + +#define CTL_TAB LCTL_T(KC_TAB) +#define ALT_SPC LALT_T(KC_SPC) +#define NAV_ESC LT(_NAVNUM, KC_ESC) +#define SFT_BSP LSFT_T(KC_BSPC) +#define SYM_ENT LT(_SYMBOL, KC_ENT) +#define MOUSE_X LT(_MOUSE, KC_X) +#define MOUSE_Y LT(_MOUSE, KC_Y) +#define RSFT__Z RSFT_T(DE_Z) +#define RSFT_SL RSFT_T(KC_SLSH) + +/* + * ┌───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┐ + * │ │MOU├───┤ Q │ . │ J │ │ P │ C │ L ├───┤Fx │ │ + * ├───┼───┤ U ├───┼───┼───┤ ├─[TP]──┼───┤ M ├───┼───┤ + * │ │ K ├───┤ E │ A │ O │ │ D │ T │ R ├───┤ F │ │ + * ├───┼───┤ I ├───┼───┼───┤ ├───┼───┼───┤ N ├───┼───┤ + * │ │ H ├───┤ - │ ; │ / │ │ D │ G │ W ├───┤ S │ │ + * ├───┼───┤ Y ├───┼───┼───┤ ├───┼───┼───┤ V ├───┼───┤ + * │ │ X ├───┤ │Tab│Spc│ │Esc│Bsp│Ret├───┤ Z │Tab│ + * └───┴───┘ └───┴───┴───┘ └───┴───┴───┘ └───┴───┘ + * + */ + +// clang-format off + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_ADNW] = LAYOUT( + XXXXXXX, KC_K, KC_U, KC_Q, KC_DOT, KC_J, KC_P, KC_C, KC_L, KC_M, KC_F, XXXXXXX, + XXXXXXX, KC_H, KC_I, KC_E, KC_A, KC_O, KC_D, KC_T, KC_R, KC_N, KC_S, XXXXXXX, + XXXXXXX, MOUSE_X, DE_Y, DE_MINS, KC_COMM, DE_SLSH, KC_B, KC_G, KC_W, KC_V, RSFT__Z, XXXXXXX, + XXXXXXX, XXXXXXX, KC_LGUI, CTL_TAB, ALT_SPC, NAV_ESC, SFT_BSP, SYM_ENT, MO(_FUNC), XXXXXXX + ), + + [_QWERTZ] = LAYOUT( + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, XXXXXXX, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, XXXXXXX, + XXXXXXX, MOUSE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_SL, XXXXXXX, + XXXXXXX, XXXXXXX, KC_LGUI, CTL_TAB, ALT_SPC, NAV_ESC, SFT_BSP, SYM_ENT, MO(_FUNC),XXXXXXX + ), + + [_SYMBOL] = LAYOUT( + XXXXXXX, DE_AT, DE_DEG, DE_LBRC, DE_RBRC, DE_HASH, DE_EXLM, DE_LABK, DE_RABK, DE_EQL, DE_AMPR, XXXXXXX, + XXXXXXX, DE_BSLS, DE_EURO, DE_LCBR, DE_RCBR, DE_ASTR, DE_QUES, DE_LPRN, DE_RPRN, DE_PLUS, KC_ENT, XXXXXXX, + XXXXXXX, XXXXXXX, DE_DLR, DE_PIPE, DE_TILD, DE_GRV, DE_CIRC, DE_PERC, DE_DQUO, DE_QUOT, XXXXXXX, XXXXXXX, + XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX + ), + + [_NAVNUM] = LAYOUT( + XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, DE_SS, KC_7, KC_8, KC_9, DE_ADIA, XXXXXXX, + XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_DOT, KC_4, KC_5, KC_6, DE_ODIA, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, XXXXXXX, XXXXXXX, KC_0, KC_1, KC_2, KC_3, DE_UDIA, XXXXXXX, + XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX + ), + + [_FUNC] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF(_QWERTZ),DF(_ADNW), XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, + XXXXXXX, DM_REC1, DM_RSTP, DM_PLY1, XXXXXXX, QK_RBT, XXXXXXX, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F12, XXXXXXX, + XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX + ), + + [_MOUSE] = LAYOUT( + XXXXXXX, KC_WH_L, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, KC_ACL0, XXXXXXX, KC_BTN3, XXXXXXX, KC_BTN5, XXXXXXX, + XXXXXXX, KC_WH_R, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, KC_ACL1, XXXXXXX, KC_BTN1, KC_BTN2, KC_BTN4, XXXXXXX, + XXXXXXX, MOUSE_X, KC_BTN1, KC_BTN3, KC_BTN2, KC_WH_D, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX + ), + +}; + +// clang-format on diff --git a/keyboards/frobiac/redtilt/readme.md b/keyboards/frobiac/redtilt/readme.md new file mode 100644 index 000000000000..3b87b1a01e0a --- /dev/null +++ b/keyboards/frobiac/redtilt/readme.md @@ -0,0 +1,31 @@ +# frobiac/redtilt + +![frobiac/redtilt](https://i.imgur.com/stMcpmSh.jpeg) + +Custom 3D-printed and handwired 46-key split-keyboard with trackpoint developed in 2013. + +* Keyboard Maintainer: [frobiac](https://github.com/frobiac) +* Hardware Supported: Teensy-2.0, IBM Trackpoint +* Development History: [deskthority.net](https://deskthority.net/viewtopic.php?p=116641#p116641) +* Layout [Full KLE](http://www.keyboard-layout-editor.com/#/gists/8f30f08f84f61749c0e549f7eca97262) +* [Original Firmware](https://github.com/frobiac/adnw) + +Make example for this keyboard (after setting up your build environment): + + make frobiac/redtilt + +Flashing example for this keyboard: + + make frobiac/redtilt: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 2 ways: + +* **Physical reset button**: Briefly press the button on the Teensy by inserting a small pin in the small hole in the switch plate +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available + + + diff --git a/keyboards/frobiac/redtilt/rules.mk b/keyboards/frobiac/redtilt/rules.mk new file mode 100644 index 000000000000..6e7633bfe015 --- /dev/null +++ b/keyboards/frobiac/redtilt/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/gummykey/config.h b/keyboards/gummykey/config.h new file mode 100644 index 000000000000..30f6269abc56 --- /dev/null +++ b/keyboards/gummykey/config.h @@ -0,0 +1,26 @@ +// Copyright 2023 Gummor (@gumorr) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + + +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2 } + +#define USE_I2C + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT diff --git a/keyboards/gummykey/gummykey.c b/keyboards/gummykey/gummykey.c new file mode 100644 index 000000000000..3669d08057f4 --- /dev/null +++ b/keyboards/gummykey/gummykey.c @@ -0,0 +1,4 @@ +// Copyright 2023 Gummor (@gumorr) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "gummykey.h" diff --git a/keyboards/gummykey/gummykey.h b/keyboards/gummykey/gummykey.h new file mode 100644 index 000000000000..79d36dc8a550 --- /dev/null +++ b/keyboards/gummykey/gummykey.h @@ -0,0 +1,28 @@ +// Copyright 2023 Gummor (@gumorr) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_split_4x6_5( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L44, L45, R45, R44, R42, R41, R40 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, ___, L44, L45 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, ___, R44, R45 } \ +} diff --git a/keyboards/gummykey/info.json b/keyboards/gummykey/info.json new file mode 100644 index 000000000000..4f2136f358cd --- /dev/null +++ b/keyboards/gummykey/info.json @@ -0,0 +1,89 @@ +{ + "keyboard_name": "GummyKey", + "manufacturer": "Gumorr", + "url": "https://github.com/gumorr/GummyKey", + "maintainer": "Gumorr", + "usb": { + "vid": "0xAA12", + "pid": "0x0001", + "device_version": "1.0.0" + }, + "processor": "atmega32u4", + "bootloader": "caterina", + "diode_direction": "ROW2COL", + "layouts": { + "LAYOUT_split_4x6_5": { + "layout": + [ + {"x":0.25, "y":0}, + {"x":1.25, "y":0}, + {"x":2.25, "y":0}, + {"x":3.25, "y":0}, + {"x":4.25, "y":0.125}, + {"x":5.25, "y":0.25}, + + {"x":0.25, "y":1}, + {"x":1.25, "y":1}, + {"x":2.25, "y":1}, + {"x":3.25, "y":1}, + {"x":4.25, "y":1.125}, + {"x":5.25, "y":1.25}, + + {"x":0, "y":2, "w":1.25}, + {"x":1.25, "y":2}, + {"x":2.25, "y":2}, + {"x":3.25, "y":2}, + {"x":4.25, "y":2.125}, + {"x":5.25, "y":2.25}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3.125}, + {"x":5.25, "y":3.25}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4}, + {"x":2.25, "y":4}, + {"x":3.5, "y":4.25, "w":2.25}, + {"x":6.75, "y":4.25}, + + + {"x":13.25, "y":0}, + {"x":12.25, "y":0}, + {"x":11.25, "y":0}, + {"x":10.25, "y":0}, + {"x":9.25, "y":0.125}, + {"x":8.25, "y":0.25}, + + {"x":13.25, "y":1}, + {"x":12.25, "y":1}, + {"x":11.25, "y":1}, + {"x":10.25, "y":1}, + {"x":9.25, "y":1.125}, + {"x":8.25, "y":1.25}, + + {"x":13.25, "y":2, "w":1.25}, + {"x":12.25, "y":2}, + {"x":11.25, "y":2}, + {"x":10.25, "y":2}, + {"x":9.25, "y":2.125}, + {"x":8.25, "y":2.25}, + + {"x":13.25, "y":3, "w":1.25}, + {"x":12.25, "y":3}, + {"x":11.25, "y":3}, + {"x":10.25, "y":3}, + {"x":9.25, "y":3.125}, + {"x":8.25, "y":3.25}, + + {"x":13.25, "y":4, "w":1.25}, + {"x":12.25, "y":4}, + {"x":11.25, "y":4}, + {"x":8, "y":4.25, "w":2.25}, + {"x":7, "y":4.25} + ] + } + } +} diff --git a/keyboards/gummykey/keymaps/default/keymap.c b/keyboards/gummykey/keymaps/default/keymap.c new file mode 100644 index 000000000000..d950e3b59a4a --- /dev/null +++ b/keyboards/gummykey/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +// Copyright 2023 Gummor (@gumorr) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FUNCTION +}; + +#define FUNCT MO(_FUNCTION) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_BASE] = LAYOUT_split_4x6_5( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, FUNCT, FUNCT, KC_SPC, KC_RALT, KC_APP, KC_RCTL +), + +[_FUNCTION] = LAYOUT_split_4x6_5( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_CAPS, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, KC_RSFT, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT +), + +}; diff --git a/keyboards/gummykey/readme.md b/keyboards/gummykey/readme.md new file mode 100644 index 000000000000..80558ee3307a --- /dev/null +++ b/keyboards/gummykey/readme.md @@ -0,0 +1,27 @@ +# GummyKey + +![gummykey](https://i.imgur.com/R6ffs2Bh.png) + +a 4x6+5 split keyboard i made + +* Keyboard Maintainer: [Gummor](https://github.com/gumorr) +* Hardware Supported: Pro Micro +* Hardware Availability: [Github](https://github.com/gumorr/GummyKey) + +Make example for this keyboard (after setting up your build environment): + + make gummykey:default + +Flashing example for this keyboard: + + make gummykey: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 \ No newline at end of file diff --git a/keyboards/gummykey/rules.mk b/keyboards/gummykey/rules.mk new file mode 100644 index 000000000000..b043543633bf --- /dev/null +++ b/keyboards/gummykey/rules.mk @@ -0,0 +1,13 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/polly40/info.json b/keyboards/handwired/polly40/info.json index 69265ed6ec50..5caea79983fb 100644 --- a/keyboards/handwired/polly40/info.json +++ b/keyboards/handwired/polly40/info.json @@ -11,8 +11,8 @@ "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { - "rows": ["F0", "F1", "F5", "B4"], - "cols": ["F4", "D7", "B5", "B6", "C6", "C7", "D4", "D6", "D5", "D0", "D1", "D2"] + "rows": ["C6", "D4", "D0", "D1"], + "cols": ["F4", "F5", "F6", "F7", "B1", "B3", "D7", "B2", "B6", "B5", "B4", "E6"] }, "diode_direction": "COL2ROW", "features": { @@ -30,46 +30,46 @@ "layouts": { "LAYOUT": { "layout": [ - {"label": "K00 (F0,F4)", "matrix": [0, 0], "x": 0, "y": 0}, - {"label": "K01 (F0,D7)", "matrix": [0, 1], "x": 1, "y": 0}, - {"label": "K02 (F0,B5)", "matrix": [0, 2], "x": 2, "y": 0}, - {"label": "K03 (F0,B6)", "matrix": [0, 3], "x": 3, "y": 0}, - {"label": "K04 (F0,C6)", "matrix": [0, 4], "x": 4, "y": 0}, - {"label": "K05 (F0,C7)", "matrix": [0, 5], "x": 5, "y": 0}, - {"label": "K06 (F0,D4)", "matrix": [0, 6], "x": 6, "y": 0}, - {"label": "K07 (F0,D6)", "matrix": [0, 7], "x": 7, "y": 0}, - {"label": "K08 (F0,D5)", "matrix": [0, 8], "x": 8, "y": 0}, - {"label": "K09 (F0,D0)", "matrix": [0, 9], "x": 9, "y": 0}, - {"label": "K0A (F0,D1)", "matrix": [0, 10], "x": 10, "y": 0}, - {"label": "K0B (F0,D2)", "matrix": [0, 11], "x": 11, "y": 0}, - {"label": "K10 (F1,F4)", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, - {"label": "K11 (F1,D7)", "matrix": [1, 1], "x": 1.25, "y": 1}, - {"label": "K12 (F1,B5)", "matrix": [1, 2], "x": 2.25, "y": 1}, - {"label": "K13 (F1,B6)", "matrix": [1, 3], "x": 3.25, "y": 1}, - {"label": "K14 (F1,C6)", "matrix": [1, 4], "x": 4.25, "y": 1}, - {"label": "K15 (F1,C7)", "matrix": [1, 5], "x": 5.25, "y": 1}, - {"label": "K16 (F1,D4)", "matrix": [1, 6], "x": 6.25, "y": 1}, - {"label": "K17 (F1,D6)", "matrix": [1, 7], "x": 7.25, "y": 1}, - {"label": "K18 (F1,D5)", "matrix": [1, 8], "x": 8.25, "y": 1}, - {"label": "K19 (F1,D0)", "matrix": [1, 9], "x": 9.25, "y": 1}, - {"label": "K1B (F1,D2)", "matrix": [1, 11], "x": 10.25, "y": 1, "w": 1.75}, - {"label": "K20 (F5,F4)", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, - {"label": "K22 (F5,B5)", "matrix": [2, 2], "x": 1.75, "y": 2}, - {"label": "K23 (F5,B6)", "matrix": [2, 3], "x": 2.75, "y": 2}, - {"label": "K24 (F5,C6)", "matrix": [2, 4], "x": 3.75, "y": 2}, - {"label": "K25 (F5,C7)", "matrix": [2, 5], "x": 4.75, "y": 2}, - {"label": "K26 (F5,D4)", "matrix": [2, 6], "x": 5.75, "y": 2}, - {"label": "K27 (F5,D6)", "matrix": [2, 7], "x": 6.75, "y": 2}, - {"label": "K28 (F5,D5)", "matrix": [2, 8], "x": 7.75, "y": 2}, - {"label": "K29 (F5,D0)", "matrix": [2, 9], "x": 8.75, "y": 2}, - {"label": "K2A (F5,D1)", "matrix": [2, 10], "x": 9.75, "y": 2, "w": 1.25}, - {"label": "K2B (F5,D2)", "matrix": [2, 11], "x": 11, "y": 2}, - {"label": "K30 (B4,F4)", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, - {"label": "K31 (B4,D7)", "matrix": [3, 1], "x": 1.25, "y": 3}, - {"label": "K32 (B4,B5)", "matrix": [3, 2], "x": 2.25, "y": 3}, - {"label": "K36 (B4,D4)", "matrix": [3, 6], "x": 3.25, "y": 3, "w": 6.25}, - {"label": "K3A (B4,D1)", "matrix": [3, 10], "x": 9.5, "y": 3, "w": 1.25}, - {"label": "K3B (B4,D2)", "matrix": [3, 11], "x": 10.75, "y": 3, "w": 1.25} + {"label": "K00 (C6,F4)", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "K01 (C6,F5)", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "K02 (C6,F6)", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "K03 (C6,F7)", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "K04 (C6,B1)", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "K05 (C6,B3)", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "K06 (C6,D7)", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "K07 (C6,B2)", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "K08 (C6,B6)", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "K09 (C6,B5)", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "K0A (C6,B4)", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "K0B (C6,E6)", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "K10 (D4,F4)", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, + {"label": "K11 (D4,F5)", "matrix": [1, 1], "x": 1.25, "y": 1}, + {"label": "K12 (D4,F6)", "matrix": [1, 2], "x": 2.25, "y": 1}, + {"label": "K13 (D4,F7)", "matrix": [1, 3], "x": 3.25, "y": 1}, + {"label": "K14 (D4,B1)", "matrix": [1, 4], "x": 4.25, "y": 1}, + {"label": "K15 (D4,B3)", "matrix": [1, 5], "x": 5.25, "y": 1}, + {"label": "K16 (D4,D7)", "matrix": [1, 6], "x": 6.25, "y": 1}, + {"label": "K17 (D4,B2)", "matrix": [1, 7], "x": 7.25, "y": 1}, + {"label": "K18 (D4,B6)", "matrix": [1, 8], "x": 8.25, "y": 1}, + {"label": "K19 (D4,B5)", "matrix": [1, 9], "x": 9.25, "y": 1}, + {"label": "K1B (D4,E6)", "matrix": [1, 11], "x": 10.25, "y": 1, "w": 1.75}, + {"label": "K20 (D0,F4)", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "K22 (D0,F6)", "matrix": [2, 2], "x": 1.75, "y": 2}, + {"label": "K23 (D0,F7)", "matrix": [2, 3], "x": 2.75, "y": 2}, + {"label": "K24 (D0,B1)", "matrix": [2, 4], "x": 3.75, "y": 2}, + {"label": "K25 (D0,B3)", "matrix": [2, 5], "x": 4.75, "y": 2}, + {"label": "K26 (D0,D7)", "matrix": [2, 6], "x": 5.75, "y": 2}, + {"label": "K27 (D0,B2)", "matrix": [2, 7], "x": 6.75, "y": 2}, + {"label": "K28 (D0,B6)", "matrix": [2, 8], "x": 7.75, "y": 2}, + {"label": "K29 (D0,B5)", "matrix": [2, 9], "x": 8.75, "y": 2}, + {"label": "K2A (D0,B4)", "matrix": [2, 10], "x": 9.75, "y": 2, "w": 1.25}, + {"label": "K2B (D0,E6)", "matrix": [2, 11], "x": 11, "y": 2}, + {"label": "K30 (D1,F4)", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, + {"label": "K31 (D1,F5)", "matrix": [3, 1], "x": 1.25, "y": 3}, + {"label": "K32 (D1,F6)", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "K36 (D1,D7)", "matrix": [3, 6], "x": 3.25, "y": 3, "w": 6.25}, + {"label": "K3A (D1,B4)", "matrix": [3, 10], "x": 9.5, "y": 3, "w": 1.25}, + {"label": "K3B (D1,E6)", "matrix": [3, 11], "x": 10.75, "y": 3, "w": 1.25} ] } }, diff --git a/keyboards/handwired/polly40/keymaps/default/keymap.c b/keyboards/handwired/polly40/keymaps/default/keymap.c index 130887fb9006..a89e438ae8b8 100644 --- a/keyboards/handwired/polly40/keymaps/default/keymap.c +++ b/keyboards/handwired/polly40/keymaps/default/keymap.c @@ -22,13 +22,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, 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, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_RSFT, MO(3), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(2), MO(1) + KC_LCTL, LT(3,KC_LGUI), LT(1,KC_LALT), KC_SPC, TG(2), MO(1) ), [1] = LAYOUT( 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENT, - KC_PSCR, KC_MPLY, KC_VOLD, KC_VOLU, KC_INS, KC_DEL, KC_COMM, KC_DOT, KC_SLSH, KC_PGUP, _______, + KC_PSCR, KC_MPLY, KC_VOLD, KC_VOLU, LSG(KC_S), MAGIC_TOGGLE_NKRO, KC_COMM, KC_DOT, KC_SLSH, KC_PGUP, _______, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_PGDN, _______ ), diff --git a/keyboards/handwired/polly40/keymaps/via/keymap.c b/keyboards/handwired/polly40/keymaps/via/keymap.c index 130887fb9006..a7139d5d7530 100644 --- a/keyboards/handwired/polly40/keymaps/via/keymap.c +++ b/keyboards/handwired/polly40/keymaps/via/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, 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, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_RSFT, MO(3), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(2), MO(1) + KC_LCTL, LT(3,KC_LGUI), LT(1,KC_LALT), KC_SPC, TG(2), MO(1) ), [1] = LAYOUT( diff --git a/keyboards/handwired/sejin_eat1010r2/info.json b/keyboards/handwired/sejin_eat1010r2/info.json new file mode 100644 index 000000000000..e913412a9f76 --- /dev/null +++ b/keyboards/handwired/sejin_eat1010r2/info.json @@ -0,0 +1,39 @@ +{ + "keyboard_name": "EAT-1010R2", + "manufacturer": "Sejin", + "url": "", + "maintainer": "DmNosachev", + "usb": { + "vid": "0x515A", + "pid": "0x4D4D", + "device_version": "0.0.1" + }, + "diode_direction": "COL2ROW", + "development_board": "bluepill", + "matrix_pins": { + "cols": ["B9", "B8", "B7", "B6", "B5", "B4", "B3", "A15", "C13", "C14", "C15", "A0", "A1", "A2", "A3", "A4"], + "rows": ["B11", "B12", "B13", "B14", "B15", "A8", "A9", "A10"], + "ghost": true + }, + "indicators": { + "caps_lock": "B1", + "num_lock": "B0", + "scroll_lock": "B10" + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": false + }, + "bootmagic": { + "matrix": [1, 0] + }, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"|", "x":13, "y":1.5}, {"label":"\u2190", "x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Enter", "x":13.5, "y":2.5, "w":1.5, "h":2}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}] + } + } +} diff --git a/keyboards/handwired/sejin_eat1010r2/keymaps/debug/keymap.c b/keyboards/handwired/sejin_eat1010r2/keymaps/debug/keymap.c new file mode 100644 index 000000000000..67691cd54242 --- /dev/null +++ b/keyboards/handwired/sejin_eat1010r2/keymaps/debug/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2023 DmNosachev + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT_debug( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed +#ifdef CONSOLE_ENABLE + uprintf("row: %u, col: %u, pressed: %u\n", record->event.key.row, record->event.key.col, record->event.pressed); +#endif + return true; +} \ No newline at end of file diff --git a/keyboards/handwired/sejin_eat1010r2/keymaps/debug/rules.mk b/keyboards/handwired/sejin_eat1010r2/keymaps/debug/rules.mk new file mode 100644 index 000000000000..032f2ee316aa --- /dev/null +++ b/keyboards/handwired/sejin_eat1010r2/keymaps/debug/rules.mk @@ -0,0 +1 @@ +CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/sejin_eat1010r2/keymaps/default/keymap.c b/keyboards/handwired/sejin_eat1010r2/keymaps/default/keymap.c new file mode 100644 index 000000000000..8ab4907331df --- /dev/null +++ b/keyboards/handwired/sejin_eat1010r2/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2023 DmNosachev + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN1 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,---------------------------------------------------------------------------------------------------------------------------------------. + * | Esc | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 | F10 | F11 | F12 | |PrnSc|ScrLk|Pause| | + * |---------------------------------------------------------------------------------------------------------------------------------------| + * | ~ ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | Bsp | |Insrt|Home |PgUp | |NumLk| / | * | - | + * |---------------------------------------------------------------------------------------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | | Del | End |PgDn | | 7 | 8 | 9 | + | + * |-------------------------------------------------------------------------------| | --------------------------------------| | + * | Caps | A | S | D | F | G | H | J | K | L | ;: | '" | Enter | | 4 | 5 | 6 | | + * |---------------------------------------------------------------------------------------------------------------------------------------| + * | Shift | Z | X | C | V | B | N | M | , | . | /? | Shift | | Up | | 1 | 2 | 3 |Enter| + * |-----------------------------------------------------------------------------------------|---------------------------------------| | + * | Ctrl | | Alt | Space | Alt | | Ctr | |Left |Down |Right| | 0 | . | | + * `---------------------------------------------------------------------------------------------------------------------------------------' +*/ + [_BASE] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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_BSLS, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + 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_P4, KC_P5, KC_P6, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; diff --git a/keyboards/handwired/sejin_eat1010r2/readme.md b/keyboards/handwired/sejin_eat1010r2/readme.md new file mode 100644 index 000000000000..397e1f5c88b9 --- /dev/null +++ b/keyboards/handwired/sejin_eat1010r2/readme.md @@ -0,0 +1,48 @@ +# QMK-based firmware for Sejin EAT-1010R2 keyboard + +* Keyboard Maintainer: [DmNosachev](https://github.com/DmNosachev) +* Hardware Supported: Sejin EAT-1010R2 (membrane keyboard, Sejin +Futaba-mount dome, Asian 101 ISO layout), Blue/Black Pill STM32F103 MCU +oard. Alternatevely you can use any MCU which is supported by QMK and +has 27 or more IO pins + +Make example for this keyboard (after setting up your build environment): + + make handwired/sejin_eat1010r2:default + +Flashing example for this keyboard: + + make handwired/sejin_eat1010r2: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). + +## Additional hardware +* 16 and 8 pin 2.54mm (0.1'') FPC connectors. They can be found at +Aliexpress for 2–3 USD for 10pcs. Two 8 pin connectors can be glued +together as a replacement for 16 pin. +* Three 5mm LEDs and current limiting resistors (150–300Ω, depending on +LED specs). This keyboard has exactly the same spacing between LEDs as +IBM Model M, so a corresponding PCB can be used after adding resistors. + +## Membrane +Sejin EAT-1010R2 has 16x8 matrix. There are 16 and 8 pin flex connectors +from membrane sheets. Solder FPC connectors to devboard (numbering from +left to right, see *matrix_pins* in info.json file). + +## Bootloader +Burn [STM32duino bootloader](https://github.com/rogerclarkmelbourne/STM32duino-bootloader) +to Blue Pill board. + +There are several ways to get into the bootloader: +* STM32duino bootloader waits for 3 seconds in DFU mode before jumping to application. +You just have to start the flashing process, then connect the USB. +* This firmware is configured with [bootmagic feature](https://docs.qmk.fm/#/feature_bootmagic). +Hold the ESC key down when plugging the keyboard in to trigger the bootloader. + +## Troubleshooting +There is *debug* layout which has mapping for every matrix position and +prints column and raw numbers to console (hid_listen or QMK toolbox). diff --git a/keyboards/handwired/sejin_eat1010r2/rules.mk b/keyboards/handwired/sejin_eat1010r2/rules.mk new file mode 100644 index 000000000000..a92b0993283e --- /dev/null +++ b/keyboards/handwired/sejin_eat1010r2/rules.mk @@ -0,0 +1,2 @@ +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/sejin_eat1010r2/sejin_eat1010r2.h b/keyboards/handwired/sejin_eat1010r2/sejin_eat1010r2.h new file mode 100644 index 000000000000..9618ed6b649b --- /dev/null +++ b/keyboards/handwired/sejin_eat1010r2/sejin_eat1010r2.h @@ -0,0 +1,74 @@ +/* Copyright 2023 DmNosachev + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +/* readability */ +#define XXX KC_NO + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT( \ + K10, K1B, K2B, K27, K17, K15, K25, K14, K13, K24, K35, K26, K16, K1C, K2C, K1D, \ + K20, K30, K3B, K37, K21, K11, K12, K22, K45, K34, K23, K33, K44, K06, K46, K36, K3C, K3D, K2D, K3E, K4E, K3F, \ + K40, K00, K4B, K47, K41, K31, K32, K42, K55, K04, K43, K03, K54, K07, K05, K4C, K0C, K0D, K4D, K0E, K4F, \ + K70, K50, K0B, K67, K51, K01, K02, K52, K65, K64, K53, K63, K5C, K5D, K5E, \ + K7A, K6B, K5B, K77, K71, K61, K62, K72, K75, K74, K73, K6A, K56, K6C, K6D, K6E, K5F, \ + K79, K78, K7B, K68, K69, K66, K76, K7C, K7E, K7F \ +) \ +{ \ +/* 0 */ { K00, K01, K02, K03, K04, K05, K06, K07, XXX, XXX, XXX, K0B, K0C, K0D, K0E, XXX }, \ +/* 1 */ { K10, K11, K12, K13, K14, K15, K16, K17, XXX, XXX, XXX, K1B, K1C, K1D, XXX, XXX }, \ +/* 2 */ { K20, K21, K22, K23, K24, K25, K26, K27, XXX, XXX, XXX, K2B, K2C, K2D, XXX, XXX }, \ +/* 3 */ { K30, K31, K32, K33, K34, K35, K36, K37, XXX, XXX, XXX, K3B, K3C, K3D, K3E, K3F }, \ +/* 4 */ { K40, K41, K42, K43, K44, K45, K46, K47, XXX, XXX, XXX, K4B, K4C, K4D, K4E, K4F }, \ +/* 5 */ { K50, K51, K52, K53, K54, K55, K56, XXX, XXX, XXX, XXX, K5B, K5C, K5D, K5E, K5F }, \ +/* 6 */ { XXX, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, XXX }, \ +/* 7 */ { K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C, XXX, K7E, K7F } \ +} +/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ + +#define LAYOUT_debug( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F, \ + K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F, \ + K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C, K7D, K7E, K7F \ +) \ +{ \ +/* 0 */ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ +/* 1 */ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ +/* 2 */ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ +/* 3 */ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ +/* 4 */ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \ +/* 5 */ { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \ +/* 6 */ { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \ +/* 7 */ { K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C, K7D, K7E, K7F } \ +} +/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ + diff --git a/keyboards/handwired/tsubasa/config.h b/keyboards/handwired/tsubasa/config.h new file mode 100644 index 000000000000..6bfe3355930e --- /dev/null +++ b/keyboards/handwired/tsubasa/config.h @@ -0,0 +1,36 @@ +/* +Copyright 2021 @kuriatsu + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once +#define MASTER_RIGHT + +#define RGB_DI_PIN D2 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 12 +# define RGBLIGHT_SPLIT +# define RGBLED_SPLIT {6, 6} +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 1 +# define RGBLIGHT_VAL_STEP 1 +# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#endif + +#define SPLIT_WPM_ENABLE +#define SPLIT_LAYER_STATE_ENABLE diff --git a/keyboards/handwired/tsubasa/info.json b/keyboards/handwired/tsubasa/info.json new file mode 100644 index 000000000000..1e5ba1eb8e21 --- /dev/null +++ b/keyboards/handwired/tsubasa/info.json @@ -0,0 +1,94 @@ +{ + "keyboard_name": "tsubasa", + "url": "https://github.com/kuriatsu/TSUBASA", + "maintainer": "kuriatsu", + "manufacturer": "kuriatsu", + "usb": { + "vid": "0xFEED", + "pid": "0x0000", + "device_version": "1.0.0" + }, + "matrix_pins": { + "cols": ["F6", "F7", "B1", "B3", "B2", "B6"], + "rows": ["C6", "D7", "E6", "B4", "B5"] + }, + "processor": "atmega32u4", + "bootloader": "caterina", + "diode_direction": "COL2ROW", + "split": { + "enabled": true, + "soft_serial_pin": "D3", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + } + } + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"!", "x":0.5, "y":0}, + {"label":"@", "x":1.5, "y":0}, + {"label":"#", "x":2.5, "y":0}, + {"label":"$", "x":3.5, "y":0}, + {"label":"%", "x":4.5, "y":0}, + {"label":"^", "x":5.5, "y":0}, + {"label":"&", "x":9.5, "y":0}, + {"label":"*", "x":10.5, "y":0}, + {"label":"(", "x":11.5, "y":0}, + {"label":")", "x":12.5, "y":0}, + {"label":"_", "x":13.5, "y":0}, + {"label":"+", "x":14.5, "y":0}, + {"label":"TAB", "x":0, "y":1}, + {"label":"Q", "x":1, "y":1}, + {"label":"W", "x":2, "y":1}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1}, + {"label":"T", "x":5, "y":1}, + {"label":"Y", "x":9, "y":1}, + {"label":"U", "x":10, "y":1}, + {"label":"I", "x":11, "y":1}, + {"label":"O", "x":12, "y":1}, + {"label":"P", "x":13, "y":1}, + {"label":"{", "x":14, "y":1}, + {"label":"Caps Lock", "x":0.25, "y":2}, + {"label":"A", "x":1.25, "y":2}, + {"label":"S", "x":2.25, "y":2}, + {"label":"D", "x":3.25, "y":2}, + {"label":"F", "x":4.25, "y":2}, + {"label":"G", "x":5.25, "y":2}, + {"label":"H", "x":9.25, "y":2}, + {"label":"J", "x":10.25, "y":2}, + {"label":"K", "x":11.25, "y":2}, + {"label":"L", "x":12.25, "y":2}, + {"label":":", "x":13.25, "y":2}, + {"label":"\"", "x":14.25, "y":2}, + {"label":"}", "x":15, "y":1}, + {"label":"SHIFT", "x":0.75, "y":3}, + {"label":"Z", "x":1.75, "y":3}, + {"label":"X", "x":2.75, "y":3}, + {"label":"C", "x":3.75, "y":3}, + {"label":"V", "x":4.75, "y":3}, + {"label":"B", "x":5.75, "y":3}, + {"label":"Encoder Mode", "x":8.75, "y":3}, + {"label":"N", "x":9.75, "y":3}, + {"label":"M", "x":10.75, "y":3}, + {"label":"<", "x":11.75, "y":3}, + {"label":">", "x":12.75, "y":3}, + {"label":"?", "x":13.75, "y":3}, + {"label":"Esc", "x":2.25, "y":4}, + {"label":"Super", "x":3.25, "y":4}, + {"label":"Alt", "x":4.25, "y":4.25}, + {"label":"Space", "x":5.25, "y":4.5}, + {"label":"Shift", "x":6.25, "y":4.75}, + {"label":"BS", "x":8.25, "y":4.75}, + {"label":"Enter", "x":9.25, "y":4.5}, + {"label":"Fn", "x":10.25, "y":4.25}, + {"label":"|", "x":11.25, "y":4}, + {"label":"~", "x":12.25, "y":4} + ] + } + } +} diff --git a/keyboards/handwired/tsubasa/keymaps/default/keymap.c b/keyboards/handwired/tsubasa/keymaps/default/keymap.c new file mode 100644 index 000000000000..0d55567cc163 --- /dev/null +++ b/keyboards/handwired/tsubasa/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2021 kuriatsu + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + 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_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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, KC_RGUI, KC_LALT, KC_SPC, KC_LSFT, KC_BSPC, KC_ENT, MO(_FN), KC_BSLS, KC_GRV + ), + [_FN] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, RGB_TOG, KC_PGUP, XXXXXXX, KC_UP, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, + _______, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, RGB_MOD, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAI, RGB_HUI, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______ + ) +}; + + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_BASE] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, + [_FN] = { ENCODER_CCW_CW( KC_VOLU, KC_VOLD)} +}; +#endif + + diff --git a/keyboards/handwired/tsubasa/keymaps/default/readme.md b/keyboards/handwired/tsubasa/keymaps/default/readme.md new file mode 100644 index 000000000000..bfc5167d0314 --- /dev/null +++ b/keyboards/handwired/tsubasa/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The default keymap for tsubasa +![keymap](https://i.imgur.com/wIRs6Ebh.png) diff --git a/keyboards/handwired/tsubasa/keymaps/default/rules.mk b/keyboards/handwired/tsubasa/keymaps/default/rules.mk new file mode 100644 index 000000000000..ee325681483f --- /dev/null +++ b/keyboards/handwired/tsubasa/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/handwired/tsubasa/readme.md b/keyboards/handwired/tsubasa/readme.md new file mode 100644 index 000000000000..c9c208b4cb56 --- /dev/null +++ b/keyboards/handwired/tsubasa/readme.md @@ -0,0 +1,23 @@ +# TSUBASA + +![tsubasa](https://i.imgur.com/q5JlhvMh.jpeg) + +Hotswap split row-staggerd keyboard with an OLED and a rotary encoder + +* Keyboard Maintainer: [kuriatsu](https://github.com/kuriatsu) +* Hardware Supported: ProMicro +* Hardware Availability and Build Guide: [Repository](https://github.com/kuriatsu/TSUBASA) + +Make example for this keyboard (after setting up your build environment): + + make handwired/tsubasa:default + +Flashing example for this keyboard: + + make handwired/tsubasa: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 + +**Physical reset**: Ground Reset of ProMicro diff --git a/keyboards/handwired/tsubasa/rules.mk b/keyboards/handwired/tsubasa/rules.mk new file mode 100644 index 000000000000..cddbc1e33fa0 --- /dev/null +++ b/keyboards/handwired/tsubasa/rules.mk @@ -0,0 +1,19 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes + +ENCODER_ENABLE = yes + +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +WPM_ENABLE = yes diff --git a/keyboards/handwired/tsubasa/tsubasa.c b/keyboards/handwired/tsubasa/tsubasa.c new file mode 100644 index 000000000000..5ae19c185ada --- /dev/null +++ b/keyboards/handwired/tsubasa/tsubasa.c @@ -0,0 +1,51 @@ +/* Copyright 2021 @kuriatsu + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "tsubasa.h" + +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (index == 0) { + if (clockwise) { + tap_code_delay(KC_VOLU, 10); + } else { + tap_code_delay(KC_VOLD, 10); + } + } + return true; +} +#endif + +#ifdef OLED_ENABLE +static void render_scrl(void) { + static const char PROGMEM raw_scrl[] = { + 128,192,192,224, 96, 48, 48, 48, 48, 48, 48, 48,240,240,240,240,240,112,112, 56, 56, 56, 56, 24, 28, 28, 28,124,248,248,240, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192,192,224,112, 56, 56, 56, 56, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7, 15, 28, 24, 24, 24, 12, 12, 0, 0,192,254,255,255,255, 15, 32, 32, 48, 48, 16, 24, 24, 8, 12,140,156,254,255, 51,129,192,192,224,224,224,224,224,192,192,192,224,224,224, 0, 0, 0, 0,192,192,224, 96, 0, 0, 0,240,254,255,255,135,192,224,224,224,224,224,128, 0, 0,128,128,192,224, 96, 96,224,224,224,224,224, 96, 0, 0, 0,128,192,192,224,224,224,224,224, 64, 0,128,128,192,224, 96,224,224,224,224,224,224, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,128,192,252,255,255,127, 15, 1, 16, 24, 8, 12, 12, 12,132,134,198,238,127, 59,131, 0, 30, 63, 63,124,248,240,240, 3, 1,193,253,255,127, 7, 0, 0,128,240,254,255, 63, 7, 0,128,224,254,255,127, 7, 1, 0, 0,192,252,255,127, 63,251,252,255,127, 7, 1, 0,128,192,252,255,255, 31, 1,128,192,192, 30, 63, 63,124,248,240,240,193,224,252,255,255, 7, 1, 0,128,192,252,255,255, 31, 1,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 96,112,112, 48, 56, 28, 14, 15, 3, 3, 5, 4, 4, 6, 6, 2, 2, 2, 3, 3, 1, 1, 1, 1, 7, 7, 15, 31, 31, 12, 12, 12, 6, 7, 3, 1, 0, 0, 31, 31, 15, 14, 6, 7, 3, 15, 31, 15, 15, 7, 7, 3, 63, 31, 31, 31, 30, 14, 14, 6, 7, 3, 3, 1, 0, 0, 15, 31, 31, 15, 6, 6, 3, 11, 31, 15, 15, 7, 7, 7, 15, 31, 31, 12, 12, 12, 6, 7, 3, 1, 0, 15, 31, 31, 15, 6, 6, 3, 11, 31, 15, 15, 7, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }; + oled_write_raw_P(raw_scrl, sizeof(raw_scrl)); +} +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } + render_scrl(); + oled_set_cursor(14, 0); + oled_write_P(PSTR("WPM:"), false); + oled_write(get_u8_str(get_current_wpm(), ' '), false); + return false; +} +#endif diff --git a/keyboards/handwired/tsubasa/tsubasa.h b/keyboards/handwired/tsubasa/tsubasa.h new file mode 100644 index 000000000000..ff7bfa75a469 --- /dev/null +++ b/keyboards/handwired/tsubasa/tsubasa.h @@ -0,0 +1,47 @@ +/* Copyright 2021 @kuriatsu + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R35, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R40, R30, R31, R32, R33, R34, \ + L40, L41, L42, L43, L44, R41, R42, R43, R44, R45 \ +) { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, KC_NO }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45 } \ +} + diff --git a/keyboards/hfdkb/keyboard_sw/k83/config.h b/keyboards/hfdkb/keyboard_sw/k83/config.h new file mode 100644 index 000000000000..f5525a994386 --- /dev/null +++ b/keyboards/hfdkb/keyboard_sw/k83/config.h @@ -0,0 +1,87 @@ +/* Copyright (C) 2022 jonylee@hfd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + + +#define RGB_TRIGGER_ON_KEYDOWN +/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */ +#define FORCE_NKRO + +/* encoder resolution */ +#define TAP_CODE_DELAY 15 + +/* DIP switch */ +#define DIP_SWITCH_PINS \ + { A9 } + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* SPI Config for spi flash*/ +#define SPI_DRIVER SPIDQ +#define SPI_SCK_PIN B3 +#define SPI_MOSI_PIN B5 +#define SPI_MISO_PIN B4 +#define SPI_MOSI_PAL_MODE 5 + +#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 +#define WEAR_LEVELING_BACKING_SIZE (8 * 1024) + +/* I2C Config for LED Driver */ +#define DRIVER_COUNT 2 +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110111 +#define I2C1_SDA_PIN B7 +#define I2C1_SCL_PIN B6 +#define I2C1_SCL_PAL_MODE 4 +#define I2C1_OPMODE OPMODE_I2C +#define I2C1_CLOCK_SPEED 400000 /* 400000 */ + +#define DRIVER_1_LED_TOTAL 61 +#define DRIVER_2_LED_TOTAL 21 +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL + 10) + +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended + +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_KEYRELEASES + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_MULTISPLASH + +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 /* The maximum brightness level */ diff --git a/keyboards/hfdkb/keyboard_sw/k83/halconf.h b/keyboards/hfdkb/keyboard_sw/k83/halconf.h new file mode 100644 index 000000000000..2f64e65393a5 --- /dev/null +++ b/keyboards/hfdkb/keyboard_sw/k83/halconf.h @@ -0,0 +1,23 @@ +/* Copyright (C) 2022 jonylee@hfd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define HAL_USE_I2C TRUE +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#include_next diff --git a/keyboards/hfdkb/keyboard_sw/k83/info.json b/keyboards/hfdkb/keyboard_sw/k83/info.json new file mode 100644 index 000000000000..6810aff30f6c --- /dev/null +++ b/keyboards/hfdkb/keyboard_sw/k83/info.json @@ -0,0 +1,116 @@ +{ + "keyboard_name": "KB83", + "manufacturer": "www.hfd.cn", + "maintainer": "hfd", + "usb": { + "vid": "0xFFFE", + "pid": "0x0007", + "device_version": "1.0.0" + }, + "processor": "WB32FQ95", + "bootloader": "wb32-dfu", + "matrix_pins": { + "cols": ["C1","C2","C3","A0","A1","A2","A3","A4","A5","A6","A7","C4","C5","B0","B1","B2"], + "rows": ["B15", "C6", "C7", "C8", "C9", "A8"] + }, + "diode_direction": "ROW2COL", + "encoder": { + "rotary": [ + { "pin_a": "B14", "pin_b": "B13","resolution": 4 } + ] + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + + { "label": "~", "x": 0, "y": 1.25 }, + { "label": "!", "x": 1, "y": 1.25 }, + { "label": "@", "x": 2, "y": 1.25 }, + { "label": "#", "x": 3, "y": 1.25 }, + { "label": "$", "x": 4, "y": 1.25 }, + { "label": "%", "x": 5, "y": 1.25 }, + { "label": "^", "x": 6, "y": 1.25 }, + { "label": "&", "x": 7, "y": 1.25 }, + { "label": "*", "x": 8, "y": 1.25 }, + { "label": "(", "x": 9, "y": 1.25 }, + { "label": ")", "x": 10, "y": 1.25 }, + { "label": "_", "x": 11, "y": 1.25 }, + { "label": "+", "x": 12, "y": 1.25 }, + { "label": "Bksp", "x": 14, "y": 1.25 }, + { "label": "Insert", "x": 15.25, "y": 1.25 }, + + { "label": "Tab", "x": 0, "y": 2.25, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.25 }, + { "label": "W", "x": 2.5, "y": 2.25 }, + { "label": "E", "x": 3.5, "y": 2.25 }, + { "label": "R", "x": 4.5, "y": 2.25 }, + { "label": "T", "x": 5.5, "y": 2.25 }, + { "label": "Y", "x": 6.5, "y": 2.25 }, + { "label": "U", "x": 7.5, "y": 2.25 }, + { "label": "I", "x": 8.5, "y": 2.25 }, + { "label": "O", "x": 9.5, "y": 2.25 }, + { "label": "P", "x": 10.5, "y": 2.25 }, + { "label": "{", "x": 11.5, "y": 2.25 }, + { "label": "}", "x": 12.5, "y": 2.25 }, + { "label": "|", "x": 13.5, "y": 2.25, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.25 }, + + { "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.25 }, + { "label": "S", "x": 2.75, "y": 3.25 }, + { "label": "D", "x": 3.75, "y": 3.25 }, + { "label": "F", "x": 4.75, "y": 3.25 }, + { "label": "G", "x": 5.75, "y": 3.25 }, + { "label": "H", "x": 6.75, "y": 3.25 }, + { "label": "J", "x": 7.75, "y": 3.25 }, + { "label": "K", "x": 8.75, "y": 3.25 }, + { "label": "L", "x": 9.75, "y": 3.25 }, + { "label": ":", "x": 10.75, "y": 3.25 }, + { "label": "\"", "x": 11.75, "y": 3.25 }, + { "label": "Enter", "x": 13.75, "y": 3.25, "w": 1.25 }, + { "label": "End", "x": 16.25, "y": 2.25 }, + + { "label": "Shift", "x": 0, "y": 4.25, "w": 1.25 }, + { "label": "Z", "x": 2.25, "y": 4.25 }, + { "label": "X", "x": 3.25, "y": 4.25 }, + { "label": "C", "x": 4.25, "y": 4.25 }, + { "label": "V", "x": 5.25, "y": 4.25 }, + { "label": "B", "x": 6.25, "y": 4.25 }, + { "label": "N", "x": 7.25, "y": 4.25 }, + { "label": "M", "x": 8.25, "y": 4.25 }, + { "label": "<", "x": 9.25, "y": 4.25 }, + { "label": ">", "x": 10.25, "y": 4.25 }, + { "label": "?", "x": 11.25, "y": 4.25 }, + { "label": "Shift", "x": 12.25, "y": 4.25, "w": 1.75 }, + { "label": "Up", "x": 16.25, "y": 4.25 }, + { "label": "Up", "x": 16.25, "y": 4.25 }, + + { "label": "Ctrl", "x": 0, "y": 5.25, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.25, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.25, "w": 1.25 }, + { "label": "Space", "x": 3.75, "y": 5.25, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.25, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.25, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.25, "w": 1.25 }, + { "label": "Left", "x": 15.25, "y": 5.25 }, + { "label": "Down", "x": 16.25, "y": 5.25 }, + { "label": "Right", "x": 17.25, "y": 5.25 } + ] + } + } +} diff --git a/keyboards/hfdkb/keyboard_sw/k83/k83.c b/keyboards/hfdkb/keyboard_sw/k83/k83.c new file mode 100644 index 000000000000..f21ac50cd7cf --- /dev/null +++ b/keyboards/hfdkb/keyboard_sw/k83/k83.c @@ -0,0 +1,603 @@ +/* Copyright (C) 2022 jonylee@hfd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "k83.h" +// clang-format off +#ifdef RGB_MATRIX_ENABLE +const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {1, A_1, B_1, C_1}, + {1, A_2, B_2, C_2}, + {1, A_3, B_3, C_3}, + {1, A_4, B_4, C_4}, + {1, A_5, B_5, C_5}, + {1, A_6, B_6, C_6}, + {1, A_7, B_7, C_7}, + {1, A_8, B_8, C_8}, + {1, A_9, B_9, C_9}, + {1, A_10, B_10, C_10}, + {1, A_11, B_11, C_11}, + {1, A_12, B_12, C_12}, + {1, A_13, B_13, C_13}, + {1, A_14, B_14, C_14}, + + {0, A_1, B_1, C_1}, + {0, A_2, B_2, C_2}, + {0, A_3, B_3, C_3}, + {0, A_4, B_4, C_4}, + {0, A_5, B_5, C_5}, + {0, A_6, B_6, C_6}, + {0, A_7, B_7, C_7}, + {0, A_8, B_8, C_8}, + {0, A_9, B_9, C_9}, + {0, A_10, B_10, C_10}, + {0, A_11, B_11, C_11}, + {0, A_12, B_12, C_12}, + {0, A_13, B_13, C_13}, + {0, A_14, B_14, C_14}, + {1, D_1, E_1, F_1}, + + {0, D_1, E_1, F_1}, + {0, D_2, E_2, F_2}, + {0, D_3, E_3, F_3}, + {0, D_4, E_4, F_4}, + {0, D_5, E_5, F_5}, + {0, D_6, E_6, F_6}, + {0, D_7, E_7, F_7}, + {0, D_8, E_8, F_8}, + {0, D_9, E_9, F_9}, + {0, D_10, E_10, F_10}, + {0, D_11, E_11, F_11}, + {0, D_12, E_12, F_12}, + {0, D_13, E_13, F_13}, + {0, D_14, E_14, F_14}, + {1, D_2, E_2, F_2}, + + {0, G_1, H_1, I_1}, + {0, G_2, H_2, I_2}, + {0, G_3, H_3, I_3}, + {0, G_4, H_4, I_4}, + {0, G_5, H_5, I_5}, + {0, G_6, H_6, I_6}, + {0, G_7, H_7, I_7}, + {0, G_8, H_8, I_8}, + {0, G_9, H_9, I_9}, + {0, G_10, H_10, I_10}, + {0, G_11, H_11, I_11}, + {0, G_12, H_12, I_12}, + {0, G_13, H_13, I_13}, + {1, D_3, E_3, F_3}, + + {0, J_1, K_1, L_1}, + {0, J_2, K_2, L_2}, + {0, J_3, K_3, L_3}, + {0, J_4, K_4, L_4}, + {0, J_5, K_5, L_5}, + {0, J_6, K_6, L_6}, + {0, J_7, K_7, L_7}, + {0, J_8, K_8, L_8}, + {0, J_9, K_9, L_9}, + {0, J_10, K_10, L_10}, + {0, J_11, K_11, L_11}, + {0, J_12, K_12, L_12}, + {1, D_7, E_7, F_7}, + {1, D_4, E_4, F_4}, + + {0, J_13, K_13, L_13}, + {0, J_14, K_14, L_14}, + {0, J_15, K_15, L_15}, + {0, J_16, K_16, L_16}, + + {0, G_14, H_14, I_14}, + {0, G_15, H_15, I_15}, + {0, G_16, H_16, I_16}, + + {0, D_15, E_15, F_15}, + {1, D_6, E_6, F_6}, + {1, D_5, E_5, F_5}, + + {1, G_1, H_1, I_1}, + {1, G_2, H_2, I_2}, + {1, G_3, H_3, I_3}, + {1, G_4, H_4, I_4}, + {1, G_5, H_5, I_5}, + + {1, J_1, K_1, L_1}, + {1, J_2, K_2, L_2}, + {1, J_3, K_3, L_3}, + {1, J_4, K_4, L_4}, + {1, J_5, K_5, L_5}, +}; + +led_config_t g_led_config = { + { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, NO_LED, NO_LED}, + { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, NO_LED, 28}, + { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, NO_LED, 43}, + { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, NO_LED, 57}, + { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, NO_LED, NO_LED, 69, 70, 71}, + { 72, 73, 74, NO_LED, NO_LED, 75, NO_LED, NO_LED, NO_LED, 76, 77, 78, NO_LED, 79, 80, 81} + }, + { + { 0, 0}, // 0 + { 14, 0}, // 1 + { 29, 0}, // 2 + { 44, 0}, // 3 + { 59, 0}, // 4 + { 74, 0}, // 5 + { 89, 0}, // 6 + {104, 0}, // 7 + {119, 0}, // 8 + {134, 0}, // 9 + {149, 0}, // 10 + {164, 0}, // 11 + {179, 0}, // 12 + {194, 0}, // 13 + + { 0, 12}, // 14 + { 14, 12}, // 15 + { 28, 12}, // 16 + { 42, 12}, // 17 + { 56, 12}, // 18 + { 70, 12}, // 19 + { 84, 12}, // 20 + { 98, 12}, // 21 + {112, 12}, // 22 + {126, 12}, // 23 + {140, 12}, // 24 + {154, 12}, // 25 + {168, 12}, // 26 + {182, 12}, // 27 + {224, 12}, // 28 + + { 0, 25}, // 29 + { 14, 25}, // 30 + { 28, 25}, // 31 + { 42, 25}, // 32 + { 56, 25}, // 33 + { 70, 25}, // 34 + { 84, 25}, // 35 + { 98, 25}, // 36 + {112, 25}, // 37 + {126, 25}, // 38 + {140, 25}, // 39 + {154, 25}, // 40 + {168, 25}, // 41 + {182, 25}, // 42 + {224, 25}, // 43 + + { 0, 38}, // 44 + { 28, 38}, // 45 + { 42, 38}, // 46 + { 56, 38}, // 47 + { 70, 38}, // 48 + { 84, 38}, // 49 + { 98, 38}, // 50 + {112, 38}, // 51 + {126, 38}, // 52 + {140, 38}, // 53 + {154, 38}, // 54 + {168, 38}, // 55 + {182, 38}, // 56 + {224, 38}, // 57 + + { 0, 51}, // 58 + { 18, 51}, // 59 + { 37, 51}, // 60 + { 56, 51}, // 61 + { 74, 51}, // 62 + { 93, 51}, // 63 + {112, 51}, // 64 + {130, 51}, // 65 + {149, 51}, // 66 + {168, 51}, // 67 + {186, 51}, // 68 + {200, 51}, // 69 + {214, 51}, // 70 + {224, 51}, // 71 + + { 0, 64}, // 72 + { 18, 64}, // 73 + { 37, 64}, // 74 + { 92, 64}, // 75 + {140, 64}, // 76 + {154, 64}, // 77 + {168, 64}, // 78 + {196, 64}, // 80 + {210, 64}, // 81 + {224, 64}, // 82 + + {0, 0}, // 68 LED 1 + {0, 16}, // 69 LED 2 + {0, 32}, // 70 LED 3 + {0, 48}, // 71 LED 4 + {0, 64}, // 72 LED 5 + + {224, 0 }, // 78 LED 12 + {224, 16}, // 79 LED 13 + {224, 32}, // 80 LED 14 + {224, 48}, // 81 LED 15 + {224, 64}, // 82 LED 16 + }, + { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, + } +}; + +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } + // caps lock red + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(44, 255, 0, 0); + } else { + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(44, 0, 0, 0); + } + } + // GUI lock red + if (keymap_config.no_gui) { + RGB_MATRIX_INDICATOR_SET_COLOR(73, 255, 0, 0); + } else { + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(73, 0, 0, 0); + } + } + return true; +} + +#endif + +enum __layers { + WIN_B, + WIN_FN, + MAC_B, + MAC_FN +}; + +enum colors { + WHITE, + RED, + GREEN, + BLUE +}; +enum colors led_color_status = WHITE; + +// clang-format on +static bool fn_make_flag = false; +static bool Lkey_flag = false; +static bool reset_glint_flag = false; +static bool while_test_flag = false; +static bool alarm_flag = false; +static uint16_t current_time = 0; +static uint8_t glint_cnt = 0; +static uint16_t scancode = 0; +static uint8_t alarm_cnt = 0; +static uint8_t RGB_HSV_level; + +HSV hsv; + +void led_test(uint8_t color); +void clear_eeprom(void); +void rgb_hsv_updata_user(void); + +bool dip_switch_update_kb(uint8_t index, bool active) { + if (!dip_switch_update_user(index, active)) { + return false; + } + if (index == 0) { + default_layer_set(1UL << (active ? 2 : 0)); + } + if(active){ + keymap_config.no_gui = 0; + eeconfig_update_keymap(keymap_config.raw); + } + return true; +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + switch (keycode) { + case MO(WIN_FN): + case MO(MAC_FN): + fn_make_flag = record->event.pressed; + return true; + case KC_ESC: + if (fn_make_flag && record->event.pressed) { + Lkey_flag = true; + current_time = timer_read(); + scancode = KC_ESC; + return false; + } else { + Lkey_flag = 0; + } + return true; + case KC_END: + if (fn_make_flag && record->event.pressed) { + if (while_test_flag) { + while_test_flag = false; + rgb_matrix_init(); + } else { + Lkey_flag = true; + current_time = timer_read(); + scancode = KC_END; + } + return false; + } else { + Lkey_flag = 0; + } + return true; + case KC_LEFT: + if (while_test_flag == true) { + if (record->event.pressed) { + if (glint_cnt == 0) + glint_cnt = 3; + else + glint_cnt--; + if ((glint_cnt % 4) == 0) { + rgb_matrix_sethsv_noeeprom(HSV_WHITE); + } else if ((glint_cnt % 4) == 1) { + rgb_matrix_sethsv_noeeprom(HSV_RED); + } else if ((glint_cnt % 4) == 2) { + rgb_matrix_sethsv_noeeprom(HSV_GREEN); + } else if ((glint_cnt % 4) == 3) { + rgb_matrix_sethsv_noeeprom(HSV_BLUE); + } + } + return false; + } + return true; + case KC_RGHT: + if (while_test_flag == true) { + if (record->event.pressed) { + glint_cnt++; + if (glint_cnt >= 4) glint_cnt = 0; + + if ((glint_cnt % 4) == 0) { + rgb_matrix_sethsv_noeeprom(HSV_WHITE); + } else if ((glint_cnt % 4) == 1) { + rgb_matrix_sethsv_noeeprom(HSV_RED); + } else if ((glint_cnt % 4) == 2) { + rgb_matrix_sethsv_noeeprom(HSV_GREEN); + } else if ((glint_cnt % 4) == 3) { + rgb_matrix_sethsv_noeeprom(HSV_BLUE); + } + } + return false; + } + return true; + case DF(WIN_B): + if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) { + alarm_flag = true; + rgb_matrix_toggle_noeeprom(); + current_time = timer_read(); + set_single_persistent_default_layer(WIN_B); + return false; + } + return true; + case DF(MAC_B): + if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) { + alarm_flag = true; + rgb_matrix_toggle_noeeprom(); + current_time = timer_read(); + set_single_persistent_default_layer(MAC_B); + return false; + } + return true; + + case RGB_VAI: + if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) { + if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_val() / (RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4)) < 4) { + RGB_HSV_level++; + rgb_matrix_config.hsv.v = (uint8_t)(RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4) * RGB_HSV_level; + } + rgb_hsv_updata_user(); + } + return false; + case RGB_VAD: + if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) { + if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_val() / (RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4)) > 0) { + RGB_HSV_level--; + rgb_matrix_config.hsv.v = (uint8_t)(RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4) * RGB_HSV_level; + } + rgb_hsv_updata_user(); + } + return false; + case RGB_SAI: + if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) { + if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_sat() / (UINT8_MAX / 4)) < 4) { + RGB_HSV_level++; + rgb_matrix_config.hsv.s = (uint8_t)(UINT8_MAX / 4) * RGB_HSV_level; + } + rgb_hsv_updata_user(); + } + return false; + case RGB_SAD: + if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) { + if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_sat() / (UINT8_MAX / 4)) > 0) { + RGB_HSV_level--; + rgb_matrix_config.hsv.s = (uint8_t)(UINT8_MAX / 4) * RGB_HSV_level; + } + rgb_hsv_updata_user(); + } + return false; + case RGB_HUI: + if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) { + if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_hue() / (UINT8_MAX / 6)) < 6) { + RGB_HSV_level++; + rgb_matrix_config.hsv.h = (uint8_t)(UINT8_MAX / 6) * RGB_HSV_level; + } + rgb_hsv_updata_user(); + } + return false; + case RGB_HUD: + if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) { + if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_hue() / (UINT8_MAX / 6)) > 0) { + RGB_HSV_level--; + rgb_matrix_config.hsv.h = (uint8_t)(UINT8_MAX / 6) * RGB_HSV_level; + } + rgb_hsv_updata_user(); + } + return false; + case RGB_SPI: + if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) { + if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_speed() / (UINT8_MAX / 4)) < 4) { + RGB_HSV_level++; + rgb_matrix_set_speed((uint8_t)(UINT8_MAX / 4) * RGB_HSV_level); + } + } + return false; + case RGB_SPD: + if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) { + if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_speed() / (UINT8_MAX / 4)) > 0) { + RGB_HSV_level--; + rgb_matrix_set_speed((uint8_t)(UINT8_MAX / 4) * RGB_HSV_level); + } + } + return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_set_color_all(0, 0, 0); + } break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + } break; + } + } + if (!rgb_matrix_is_enabled()) { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable(); + } + return false; + + default: + return process_record_user(keycode, record); + } +} + +void housekeeping_task_kb(void) { + if (Lkey_flag) { + if (scancode == KC_ESC) { + if (timer_elapsed(current_time) >= 3000) { + Lkey_flag = false; + clear_eeprom(); + + current_time = timer_read(); + reset_glint_flag = true; + glint_cnt = 0; + rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR); + rgb_matrix_sethsv_noeeprom(HSV_OFF); + } + } else if (scancode == KC_END) { + if (timer_elapsed(current_time) >= 3000) { + Lkey_flag = false; + clear_eeprom(); + + while_test_flag = true; + glint_cnt = 0; + rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR); + rgb_matrix_sethsv_noeeprom(HSV_WHITE); + } + } + } else if (reset_glint_flag) { + if ((timer_elapsed(current_time)) >= 300) { + current_time = timer_read(); + if (((glint_cnt++) & 0x01) == 0) { + rgb_matrix_sethsv_noeeprom(HSV_RED); + } else { + rgb_matrix_sethsv_noeeprom(HSV_OFF); + } + if (glint_cnt >= 7) { + glint_cnt = 0; + reset_glint_flag = false; + rgb_matrix_init(); + } + } + } else if (alarm_cnt != 0) { + alarm_cnt--; + if (alarm_cnt == 0) { + alarm_flag = true; + rgb_matrix_toggle_noeeprom(); + current_time = timer_read(); + } + } else if (alarm_flag) { + if ((timer_elapsed(current_time)) >= 200) { + rgb_matrix_toggle_noeeprom(); + alarm_flag = 0; + } + } +} + +void led_test(uint8_t color) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR); + + switch (color) { + case WHITE: + rgb_matrix_sethsv_noeeprom(HSV_WHITE); + break; + + case RED: + rgb_matrix_sethsv_noeeprom(HSV_RED); + break; + + case GREEN: + rgb_matrix_sethsv_noeeprom(HSV_GREEN); + break; + + case BLUE: + rgb_matrix_sethsv_noeeprom(HSV_BLUE); + break; + } +} + +void clear_eeprom(void) { + layer_state_t default_layer_temp = default_layer_state; + eeconfig_init(); + default_layer_set(default_layer_temp); + +#ifdef VIA_ENABLE + // This resets the layout options + via_set_layout_options(VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT); + // This resets the keymaps in EEPROM to what is in flash. + dynamic_keymap_reset(); + // This resets the macros in EEPROM to nothing. + dynamic_keymap_macro_reset(); +#endif + + rgb_matrix_enable_noeeprom(); +} + +void rgb_hsv_updata_user(void) { + rgb_matrix_sethsv(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v); +} diff --git a/keyboards/hfdkb/keyboard_sw/k83/k83.h b/keyboards/hfdkb/keyboard_sw/k83/k83.h new file mode 100644 index 000000000000..17f6187b0167 --- /dev/null +++ b/keyboards/hfdkb/keyboard_sw/k83/k83.h @@ -0,0 +1,39 @@ +/* Copyright (C) 2022 jonylee@hfd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT(\ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K413, K414, K415, \ + K500, K501, K502, K505, K509, K510, K511, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, KC_NO, KC_NO, K413, K414, K415 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, KC_NO, K513, K514, K515 } \ +} +// clang-format on + + + diff --git a/keyboards/hfdkb/keyboard_sw/k83/keymaps/default/keymap.c b/keyboards/hfdkb/keyboard_sw/k83/keymaps/default/keymap.c new file mode 100644 index 000000000000..16efd29b5ce4 --- /dev/null +++ b/keyboards/hfdkb/keyboard_sw/k83/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +/* Copyright (C) 2022 jonylee@hfd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +// clang-format off +enum __layers { + WIN_B, + WIN_FN, + MAC_B, + MAC_FN +}; + +#define KC_TASK LGUI(KC_TAB) +#define KC_FLXP LGUI(KC_E) +#define KC_SIRI LALT(KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [WIN_B] = LAYOUT( /* Base */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + 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_HOME, + 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_PGUP, + 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_PGDN, + 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_FN] = LAYOUT( /* FN */ + _______, KC_BRID, KC_BRIU, KC_MAIL, KC_WSCH, KC_CALC, KC_MSEL, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, + _______, GU_TOGG, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI), + + [MAC_B] = LAYOUT( /* Base */ + KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, KC_SIRI, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, KC_MUTE, + 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_HOME, + 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_PGUP, + 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_PGDN, + 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_END, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [MAC_FN] = LAYOUT( /* FN */ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, KC_CALC, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_VAI, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [WIN_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) }, + [WIN_FN] = { ENCODER_CCW_CW(RGB_SAI, RGB_SAD) }, + [MAC_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) }, + [MAC_FN] = { ENCODER_CCW_CW(RGB_SAI, RGB_SAD) }, +}; +#endif + diff --git a/keyboards/hfdkb/keyboard_sw/k83/keymaps/via/keymap.c b/keyboards/hfdkb/keyboard_sw/k83/keymaps/via/keymap.c new file mode 100644 index 000000000000..16efd29b5ce4 --- /dev/null +++ b/keyboards/hfdkb/keyboard_sw/k83/keymaps/via/keymap.c @@ -0,0 +1,73 @@ +/* Copyright (C) 2022 jonylee@hfd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +// clang-format off +enum __layers { + WIN_B, + WIN_FN, + MAC_B, + MAC_FN +}; + +#define KC_TASK LGUI(KC_TAB) +#define KC_FLXP LGUI(KC_E) +#define KC_SIRI LALT(KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [WIN_B] = LAYOUT( /* Base */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + 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_HOME, + 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_PGUP, + 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_PGDN, + 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_FN] = LAYOUT( /* FN */ + _______, KC_BRID, KC_BRIU, KC_MAIL, KC_WSCH, KC_CALC, KC_MSEL, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, + _______, GU_TOGG, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI), + + [MAC_B] = LAYOUT( /* Base */ + KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, KC_SIRI, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, KC_MUTE, + 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_HOME, + 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_PGUP, + 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_PGDN, + 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_END, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [MAC_FN] = LAYOUT( /* FN */ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, KC_CALC, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_VAI, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [WIN_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) }, + [WIN_FN] = { ENCODER_CCW_CW(RGB_SAI, RGB_SAD) }, + [MAC_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) }, + [MAC_FN] = { ENCODER_CCW_CW(RGB_SAI, RGB_SAD) }, +}; +#endif + diff --git a/keyboards/hfdkb/keyboard_sw/k83/keymaps/via/rules.mk b/keyboards/hfdkb/keyboard_sw/k83/keymaps/via/rules.mk new file mode 100644 index 000000000000..4253f570f0bb --- /dev/null +++ b/keyboards/hfdkb/keyboard_sw/k83/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/hfdkb/keyboard_sw/k83/mcuconf.h b/keyboards/hfdkb/keyboard_sw/k83/mcuconf.h new file mode 100644 index 000000000000..0d16f4f04e46 --- /dev/null +++ b/keyboards/hfdkb/keyboard_sw/k83/mcuconf.h @@ -0,0 +1,24 @@ +/* Copyright (C) 2022 jonylee@hfd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include_next + +#undef WB32_SPI_USE_QSPI +#define WB32_SPI_USE_QSPI TRUE + +#undef WB32_I2C_USE_I2C1 +#define WB32_I2C_USE_I2C1 TRUE diff --git a/keyboards/hfdkb/keyboard_sw/k83/readme.md b/keyboards/hfdkb/keyboard_sw/k83/readme.md new file mode 100644 index 000000000000..871e9b893649 --- /dev/null +++ b/keyboards/hfdkb/keyboard_sw/k83/readme.md @@ -0,0 +1,18 @@ +# k83 + +A customizable 75% encoder keyboard. + +* Keyboard Maintainer: [jonylee@hfd](https://github.com/jonylee1986) +* Hardware Supported: k83 + +Make example for this keyboard (after setting up your build environment): + + make hfdkb/keyboard_sw/k83:default + +Flashing example for this keyboard: + + make hfdkb/keyboard_sw/k83:default:flash + +**Reset Key**: Hold down the key located at *K01*, which programmed as *Esc* while plugging in the keyboard. + +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). diff --git a/keyboards/hfdkb/keyboard_sw/k83/rgb_matrix_kb.inc b/keyboards/hfdkb/keyboard_sw/k83/rgb_matrix_kb.inc new file mode 100644 index 000000000000..56e2bd31cbbd --- /dev/null +++ b/keyboards/hfdkb/keyboard_sw/k83/rgb_matrix_kb.inc @@ -0,0 +1,51 @@ +// !!! DO NOT ADD #pragma once !!! // + +// Step 1. +// Declare custom effects using the RGB_MATRIX_EFFECT macro +// (note the lack of semicolon after the macro!) + +RGB_MATRIX_EFFECT(turn_off_rgb) +RGB_MATRIX_EFFECT(kb_reset_rgb) + +// Step 2. +// Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +// e.g: A simple effect, self-contained within a single method +static bool turn_off_rgb(effect_params_t *params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (uint8_t i = led_min; i < led_max; i++) { + rgb_matrix_set_color(i, 0x00, 0x00, 0x00); + } + return rgb_matrix_check_finished_leds(led_max); +} + +// e.g: A more complex effect, relying on external methods and state, with +// dedicated init and run methods +static uint8_t some_global_state; +static void kb_reset_rgb_init(effect_params_t* params) { + some_global_state = 0; +} +static bool kb_reset_rgb_run(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + some_global_state++; + if(some_global_state&0x01){ + for (uint8_t i = led_min; i < led_max; i++) + rgb_matrix_set_color(i, 0, 0, 0); + } + else{ + for (uint8_t i = led_min; i < led_max; i++) + rgb_matrix_set_color(i, 0xc0, 0xc0, 0xc0); + } + if(some_global_state>=7) + rgb_matrix_init(); + return rgb_matrix_check_finished_leds(led_max); +} + +static bool kb_reset_rgb(effect_params_t* params) { + if (params->init) kb_reset_rgb_init(params); + return kb_reset_rgb_run(params); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/keyboards/hfdkb/keyboard_sw/k83/rules.mk b/keyboards/hfdkb/keyboard_sw/k83/rules.mk new file mode 100644 index 000000000000..176dd64c1c85 --- /dev/null +++ b/keyboards/hfdkb/keyboard_sw/k83/rules.mk @@ -0,0 +1,20 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +KEYBOARD_SHARED_EP = no +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +DIP_SWITCH_ENABLE = yes # DPI Switch +ENCODER_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = IS31FL3733 +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = spi_flash +#RGB_MATRIX_CUSTOM_USER = yes #Add turnoff LED diff --git a/keyboards/karn/config.h b/keyboards/karn/config.h new file mode 100644 index 000000000000..2e737bfd7107 --- /dev/null +++ b/keyboards/karn/config.h @@ -0,0 +1,18 @@ +// Copyright 2023 Robert Mills (@robcmills) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define DIRECT_PINS {{NO_PIN, A15,A8, B15, B14, B13}, \ + {B10, B1, B0, A7, A6, A5 }, \ + {NO_PIN, B3, B4, B5, B8, B9 }, \ + {A4, A3, A2, NO_PIN, NO_PIN, NO_PIN}} + +#define DIRECT_PINS_RIGHT {{B13, B14, B15, A8, A15, NO_PIN}, \ + {A5, A6, A7, B0, B1, B10}, \ + {B9, B8, B5, B4, B3, NO_PIN}, \ + {A2, A3, A4, NO_PIN, NO_PIN, NO_PIN}} + +#define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. +#define SERIAL_USART_TX_PIN B6 // USART TX pin +#define SERIAL_USART_RX_PIN B7 // USART RX pin diff --git a/keyboards/karn/halconf.h b/keyboards/karn/halconf.h new file mode 100644 index 000000000000..150de899ab69 --- /dev/null +++ b/keyboards/karn/halconf.h @@ -0,0 +1,8 @@ +// Copyright 2023 Robert Mills (@robcmills) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_SERIAL TRUE + +#include_next diff --git a/keyboards/karn/info.json b/keyboards/karn/info.json new file mode 100644 index 000000000000..961aa8efd24d --- /dev/null +++ b/keyboards/karn/info.json @@ -0,0 +1,75 @@ +{ + "manufacturer": "Robert Mills", + "keyboard_name": "karn", + "maintainer": "robcmills", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "development_board": "blackpill_f401", + "url": "https://github.com/robcmills/karn-keyboard", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "bootmagic": { + "matrix": [0, 1] + }, + "split": { + "enabled": true + }, + "community_layouts": ["split_3x6_3"], + "layouts": { + "LAYOUT_split_3x6_3": { + "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": [4, 0], "x": 8, "y": 0}, + { "matrix": [4, 1], "x": 9, "y": 0 }, + { "matrix": [4, 2], "x": 10, "y": 0 }, + { "matrix": [4, 3], "x": 11, "y": 0 }, + { "matrix": [4, 4], "x": 12, "y": 0}, + { "matrix": [4, 5], "x": 13, "y": 0}, + { "matrix": [1, 0], "x": 0, "y": 1}, + { "matrix": [1, 1], "x": 1, "y": 1}, + { "matrix": [1, 2], "x": 2, "y": 1 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [1, 4], "x": 4, "y": 1 }, + { "matrix": [1, 5], "x": 5, "y": 1}, + { "matrix": [5, 0], "x": 8, "y": 1}, + { "matrix": [5, 1], "x": 9, "y": 1 }, + { "matrix": [5, 2], "x": 10, "y": 1 }, + { "matrix": [5, 3], "x": 11, "y": 1 }, + { "matrix": [5, 4], "x": 12, "y": 1}, + { "matrix": [5, 5], "x": 13, "y": 1}, + { "matrix": [2, 0], "x": 0, "y": 2}, + { "matrix": [2, 1], "x": 1, "y": 2}, + { "matrix": [2, 2], "x": 2, "y": 2 }, + { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [2, 4], "x": 4, "y": 2 }, + { "matrix": [2, 5], "x": 5, "y": 2}, + { "matrix": [6, 0], "x": 8, "y": 2}, + { "matrix": [6, 1], "x": 9, "y": 2 }, + { "matrix": [6, 2], "x": 10, "y": 2 }, + { "matrix": [6, 3], "x": 11, "y": 2 }, + { "matrix": [6, 4], "x": 12, "y": 2}, + { "matrix": [6, 5], "x": 13, "y": 2}, + { "matrix": [3, 0], "x": 3.5, "y": 3.25 }, + { "matrix": [3, 1], "x": 4.5, "y": 3.5 }, + { "matrix": [3, 2], "x": 5.5, "y": 3.75 }, + { "matrix": [7, 0], "x": 7.5, "y": 3.75 }, + { "matrix": [7, 1], "x": 8.5, "y": 3.5 }, + { "matrix": [7, 2], "x": 9.5, "y": 3.25 } + ] + } + } +} diff --git a/keyboards/karn/keymaps/colemak/config.h b/keyboards/karn/keymaps/colemak/config.h new file mode 100644 index 000000000000..71eb08ed1e25 --- /dev/null +++ b/keyboards/karn/keymaps/colemak/config.h @@ -0,0 +1,13 @@ +// Copyright 2023 Robert Mills (@robcmills) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Equivalent to zmk behavior-hold-tap tap-preferred flavor +// Do not force the mod-tap key press to be handled as a modifier +// if any other key was pressed while the mod-tap key is held down. +#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY + +// Equivalent to zmk behavior-hold-tap hold-preferred flavor +#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY + diff --git a/keyboards/karn/keymaps/colemak/keymap.c b/keyboards/karn/keymaps/colemak/keymap.c new file mode 100644 index 000000000000..dbe78c0dada5 --- /dev/null +++ b/keyboards/karn/keymaps/colemak/keymap.c @@ -0,0 +1,96 @@ +// Copyright 2023 Robert Mills (@robcmills) +// SPDX-License-Identifier: GPL-2.0 + +#include QMK_KEYBOARD_H + +// Tap Dance declarations +enum { + TD_F1_F11, + TD_F2_F12, +}; + +// Tap Dance definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for F1, twice for F11 + [TD_F1_F11] = ACTION_TAP_DANCE_DOUBLE(KC_F1, KC_F11), + [TD_F2_F12] = ACTION_TAP_DANCE_DOUBLE(KC_F2, KC_F12), +}; + +bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_Z): // Special case for Shift + return true; // Immediately select the hold action when another key is pressed. + case SFT_T(KC_ESC): + return true; + default: + return false; // Do not select the hold action when another key is pressed. + } +} + +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CTL_T(KC_X): + return true; + case ALT_T(KC_C): + return true; + case CMD_T(KC_V): + return true; + case CMD_T(KC_M): + return true; + case ALT_T(KC_COMM): + return true; + case CTL_T(KC_DOT): + return true; + case KC_X: + return true; + case KC_C: + return true; + case KC_V: + return true; + case KC_M: + return true; + case KC_COMM: + return true; + case KC_DOT: + return true; + default: + return false; + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + // default (colemak) + [0] = LAYOUT_split_3x6_3( + KC_NO, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_NO, + HYPR_T(KC_TAB),KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, HYPR_T(KC_ENT), + KC_NO, SFT_T(KC_Z),CTL_T(KC_X),ALT_T(KC_C),CMD_T(KC_V),KC_B, KC_K, CMD_T(KC_M),ALT_T(KC_COMM),CTL_T(KC_DOT),RSFT_T(KC_SLSH),KC_NO, + MO(1), SFT_T(KC_ESC),MO(3), KC_BSPC,KC_SPC,MO(2) + ), + + // symbols + [1] = LAYOUT_split_3x6_3( + _______, KC_BSLS, KC_GRV, KC_QUOT, KC_DQT, KC_LCBR, KC_RCBR, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_DEL, _______, _______ + ), + + // nav + [2] = LAYOUT_split_3x6_3( + _______, _______, KC_Q, _______, _______, KC_VOLU, _______, _______, _______, KC_SCLN, _______, _______, + _______, C(KC_UP),C(KC_DOWN),G(KC_GRV), G(KC_TAB), KC_VOLD, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_CAPS, _______, + _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + // numbers + [3] = LAYOUT_split_3x6_3( + _______, TD(TD_F1_F11), TD(TD_F2_F12), KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/keyboards/karn/keymaps/colemak/readme.md b/keyboards/karn/keymaps/colemak/readme.md new file mode 100644 index 000000000000..8d3be932fe63 --- /dev/null +++ b/keyboards/karn/keymaps/colemak/readme.md @@ -0,0 +1,58 @@ +``` + /* + * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ + * │ Q │ W │ F │ P │ G │ BASE │ J │ L │ U │ Y │ ; │ + * │ │ │ │ │ │ LAYER │ │ │ │ │ │ + * ┌─────┼─────┼─────┼─────┼─────┼─────┤ ┌─────┐ ├─────┼─────┼─────┼─────┼─────┼─────┐ + * │ TAB │ A │ R │ S │ T │ D │ │ TAP │ │ H │ N │ E │ I │ O │ ENT │ + * │ HYP │ │ │ │ │ │ │ HOLD│ │ │ │ │ │ │ HYP │ + * └─────┼─────┼─────┼─────┼─────┼─────┤ └─────┘ ├─────┼─────┼─────┼─────┼─────┼─────┘ + * │ Z │ X │ C │ V │ B │ │ K │ M │ , │ . │ / │ + * │ SFT │ CTL │ ALT │ CMD │ │ │ │ CMD │ ALT │ CTL │ SFT │ + * └─────┴─────┴─────┼─────┼─────┼─────┐ ┌─────┼─────┼─────┼─────┴─────┴─────┘ + * │ │ ESC │ │ │ BAK │ SPC │ │ + * │ SYM │ SFT │ NUM │ │ │ │ NAV │ + * └─────┴─────┴─────┘ └─────┴─────┴─────┘ + * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ + * │ \ │ ` │ ' │ " │ { │ SYM │ } │ - │ = │ [ │ ] │ + * │ │ │ │ │ │ LAYER │ │ │ │ │ │ + * ┌─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┐ + * │ │ ! │ @ │ # │ $ │ % │ │ ^ │ & │ * │ ( │ ) │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┘ + * │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └─────┴─────┴─────┼─────┼─────┼─────┐ ┌─────┼─────┼─────┼─────┴─────┴─────┘ + * │ │ │ │ │ DEL │ │ │ + * │ │ │ │ │ │ │ │ + * └─────┴─────┴─────┘ └─────┴─────┴─────┘ + * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ + * │ │ │ │ │ VOL │ NAV │ │ │ │ │ │ + * │ │ │ │ │ UP │ LAYER │ │ │ │ │ │ + * ┌─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┐ + * │ │ CTL │ CTL │ CMD │ CMD │ VOL │ │ ← │ ↓ │ ↑ │ → │CAPS │ │ + * │ │ + ↓ │ + ↑ │ + ` │ +TAB│ DOWN│ │ │ │ │ │LOCK │ │ + * └─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┘ + * │ │ │ │ │ MUTE│ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └─────┴─────┴─────┼─────┼─────┼─────┐ ┌─────┼─────┼─────┼─────┴─────┴─────┘ + * │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ + * └─────┴─────┴─────┘ └─────┴─────┴─────┘ + * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ + * │ F1 │ F2 │ F3 │ F4 │ F5 │ NUM │ F6 │ F7 │ F8 │ F9 │ F10 │ + * │ F11 │ F12 │ │ │ │ LAYER │ │ │ │ │ │ + * ┌─────┼─────┼─────┼─────┼─────┼─────┤ ┌─────┐ ├─────┼─────┼─────┼─────┼─────┼─────┐ + * │ │ 1 │ 2 │ 3 │ 4 │ 5 │ │ TAP │ │ 6 │ 7 │ 8 │ 9 │ 0 │ │ + * │ │ │ │ │ │ │ │TAPx2│ │ │ │ │ │ │ │ + * └─────┼─────┼─────┼─────┼─────┼─────┤ └─────┘ ├─────┼─────┼─────┼─────┼─────┼─────┘ + * │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └─────┴─────┴─────┼─────┼─────┼─────┐ ┌─────┼─────┼─────┼─────┴─────┴─────┘ + * │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ + * └─────┴─────┴─────┘ └─────┴─────┴─────┘ + */ +``` + + diff --git a/keyboards/karn/keymaps/colemak/rules.mk b/keyboards/karn/keymaps/colemak/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/karn/keymaps/colemak/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/karn/keymaps/default/keymap.c b/keyboards/karn/keymaps/default/keymap.c new file mode 100644 index 000000000000..5f679552d974 --- /dev/null +++ b/keyboards/karn/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +// Copyright 2023 Robert Mills (@robcmills) +// SPDX-License-Identifier: GPL-2.0 + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + // default (qwerty) + [0] = LAYOUT_split_3x6_3( + KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NO, + HYPR_T(KC_TAB),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, HYPR_T(KC_ENT), + KC_NO, SFT_T(KC_Z),CTL_T(KC_X),ALT_T(KC_C),CMD_T(KC_V),KC_B, KC_N, CMD_T(KC_M),ALT_T(KC_COMM),CTL_T(KC_DOT),RSFT_T(KC_SLSH),KC_NO, + MO(1), SFT_T(KC_ESC),MO(3), KC_BSPC,KC_SPC,MO(2) + ), + + // symbols + [1] = LAYOUT_split_3x6_3( + _______, KC_BSLS, KC_GRV, KC_QUOT, KC_DQT, KC_LCBR, KC_RCBR, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_DEL, _______, _______ + ), + + // nav + [2] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, _______, _______, + _______, C(KC_UP),C(KC_DOWN),G(KC_GRV), G(KC_TAB), KC_VOLD, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_CAPS, _______, + _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + // numbers + [3] = LAYOUT_split_3x6_3( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/keyboards/karn/mcuconf.h b/keyboards/karn/mcuconf.h new file mode 100644 index 000000000000..766fa7d06e06 --- /dev/null +++ b/keyboards/karn/mcuconf.h @@ -0,0 +1,9 @@ +// Copyright 2022 Robert Mills (@robcmills) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE diff --git a/keyboards/karn/readme.md b/keyboards/karn/readme.md new file mode 100644 index 000000000000..037cc5d652ed --- /dev/null +++ b/keyboards/karn/readme.md @@ -0,0 +1,42 @@ +# Karn 2 + +Split, ortholinear, non-staggered, diodeless, 38 key keyboard, with a unique set of 1.5u thumb arc keys and 1.5u pinky reach keys. + +* Keyboard Maintainer: [Robert Mills](https://github.com/robcmills) +* Hardware Supported: Blackpill STM32F401 + +Based on the excellent [cantor](https://github.com/diepala/cantor), and inspired by the popular [corne](https://github.com/foostan/crkbd), [ferris](https://github.com/pierrechevalier83/ferris) and [sweep](https://github.com/davidphilipbarr/Sweep) keyboards. + +[https://github.com/robcmills/karn-keyboard](https://github.com/robcmills/karn-keyboard) + +![karn-2-left](https://i.imgur.com/vm6XFyIh.jpeg) + +![karn-2-full](https://i.imgur.com/R7WnlC3h.jpeg) + +![karn-2-pcb](https://i.imgur.com/EQqyyEDh.png) + + +### Make + +Make example for this keyboard (after setting up your build environment): + + make karn:default + +Flashing example for this keyboard: + + make karn: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 top left key and plug in the keyboard. For the right side, hold the top right key and plug the keyboard. +* **Physical reset button**: + * Press and hold the BOOT0 button. + * Press and release the NRST button. + * Release the BOOT0 button. +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available + diff --git a/keyboards/karn/rules.mk b/keyboards/karn/rules.mk new file mode 100644 index 000000000000..c6e298832137 --- /dev/null +++ b/keyboards/karn/rules.mk @@ -0,0 +1 @@ +SERIAL_DRIVER = usart diff --git a/keyboards/keebio/kbo5000/rev1/info.json b/keyboards/keebio/kbo5000/rev1/info.json index 9d3445f880d7..5df36178e7cc 100644 --- a/keyboards/keebio/kbo5000/rev1/info.json +++ b/keyboards/keebio/kbo5000/rev1/info.json @@ -21,8 +21,8 @@ "encoder": { "right": { "rotary": [ - {"pin_a": "D6", "pin_b": "C7"}, - {"pin_a": "D4", "pin_b": "C6"} + {"pin_a": "D6", "pin_b": "D4"}, + {"pin_a": "C7", "pin_b": "C6"} ] } } diff --git a/keyboards/keebio/sinc/rev3/info.json b/keyboards/keebio/sinc/rev3/info.json index 64be26e70973..baf5af5f1ad7 100644 --- a/keyboards/keebio/sinc/rev3/info.json +++ b/keyboards/keebio/sinc/rev3/info.json @@ -165,9 +165,9 @@ { "flags": 4, "matrix": [10, 3], "x": 176, "y": 64 }, { "flags": 4, "matrix": [10, 4], "x": 188, "y": 64 }, { "flags": 2, "x": 194, "y": 64 }, - { "flags": 4, "matrix": [10, 5], "x": 200, "y": 64 }, - { "flags": 4, "matrix": [10, 6], "x": 212, "y": 64 }, - { "flags": 4, "matrix": [10, 7], "x": 224, "y": 64 }, + { "flags": 4, "matrix": [10, 6], "x": 200, "y": 64 }, + { "flags": 4, "matrix": [10, 7], "x": 212, "y": 64 }, + { "flags": 4, "matrix": [10, 8], "x": 224, "y": 64 }, { "flags": 2, "x": 224, "y": 55 } ] } diff --git a/keyboards/skme/zeno/zeno.c b/keyboards/kprepublic/bm80v2/keymaps/smooted/config.h similarity index 91% rename from keyboards/skme/zeno/zeno.c rename to keyboards/kprepublic/bm80v2/keymaps/smooted/config.h index 8d6294cc5b20..88fa41d11098 100644 --- a/keyboards/skme/zeno/zeno.c +++ b/keyboards/kprepublic/bm80v2/keymaps/smooted/config.h @@ -1,5 +1,4 @@ -/* Copyright 2019 Holten Campbell - * +/* Copyright 2022 bdtc123 * * 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 @@ -13,4 +12,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "zeno.h" + +#pragma once +#define FORCE_NKRO diff --git a/keyboards/kprepublic/bm80v2/keymaps/smooted/keymap.c b/keyboards/kprepublic/bm80v2/keymaps/smooted/keymap.c new file mode 100644 index 000000000000..ba91157d927b --- /dev/null +++ b/keyboards/kprepublic/bm80v2/keymaps/smooted/keymap.c @@ -0,0 +1,25 @@ +// Copyright 2021 Yizhen Liu (@edwardslau) +// SPDX-License-Identifier: GPL-2.0 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_tkl_ansi( + QK_BOOT, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/kprepublic/bm80v2/keymaps/smooted/rules.mk b/keyboards/kprepublic/bm80v2/keymaps/smooted/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/kprepublic/bm80v2/keymaps/smooted/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/lily58/r2g/config.h b/keyboards/lily58/r2g/config.h index 1d857ce696ae..9770e28a533d 100644 --- a/keyboards/lily58/r2g/config.h +++ b/keyboards/lily58/r2g/config.h @@ -45,7 +45,6 @@ along with this program. If not, see . #if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES) # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE # define ENABLE_RGB_MATRIX_SOLID_REACTIVE -# define ENABLE_RGB_MATRIX_MULTISPLASH #endif # define SPLIT_TRANSPORT_MIRROR diff --git a/keyboards/macro3/info.json b/keyboards/macro3/info.json index 780dfca3036f..fa6cd1c47160 100644 --- a/keyboards/macro3/info.json +++ b/keyboards/macro3/info.json @@ -14,8 +14,16 @@ {"pin_a": "F7", "pin_b": "F6"} ] }, - "processor": "atmega32u4", - "bootloader": "atmel-dfu", + "development_board": "promicro", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "encoder": true + }, + "bootmagic": { + "matrix": [0, 3] + }, "matrix_pins": { "direct": [ ["D7", "C6", "D4", "D1"], diff --git a/keyboards/macro3/post_config.h b/keyboards/macro3/post_config.h deleted file mode 100644 index 4e2b6cf1b986..000000000000 --- a/keyboards/macro3/post_config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2020 David Philip Barr <@davidphilipbarr> - * Copyright 2021 @filterpaper - * SPDX-License-Identifier: GPL-2.0+ - */ - -#pragma once - -/* Top right key */ -#ifndef BOOTMAGIC_LITE_ROW -# define BOOTMAGIC_LITE_ROW 0 -#endif -#ifndef BOOTMAGIC_LITE_COLUMN -# define BOOTMAGIC_LITE_COLUMN 3 -#endif - -#ifndef ENCODER_RESOLUTION -# define ENCODER_RESOLUTION 2 -#endif - diff --git a/keyboards/macro3/rules.mk b/keyboards/macro3/rules.mk index b03b6fa90581..6e7633bfe015 100644 --- a/keyboards/macro3/rules.mk +++ b/keyboards/macro3/rules.mk @@ -1,13 +1 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -ENCODER_ENABLE = yes +# This file intentionally left blank diff --git a/keyboards/momokai/tap_duo/config.h b/keyboards/momokai/tap_duo/config.h index 555c7912d668..ca447bf9c6d1 100644 --- a/keyboards/momokai/tap_duo/config.h +++ b/keyboards/momokai/tap_duo/config.h @@ -38,84 +38,61 @@ //TODO: implement RGB Matrix #define RGB_DI_PIN F0 -#define RGBLED_NUM 4 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 +#ifdef RGB_MATRIX_ENABLE +#define RGB_MATRIX_LED_COUNT 4 +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 + // RGB Matrix Animation modes. Explicitly enabled + // For full list of effects, see: + // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects + #define ENABLE_RGB_MATRIX_SOLID_COLOR + #define ENABLE_RGB_MATRIX_ALPHAS_MODS + #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT + #define ENABLE_RGB_MATRIX_BREATHING + #define ENABLE_RGB_MATRIX_BAND_SAT + #define ENABLE_RGB_MATRIX_BAND_VAL + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT + #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL + #define ENABLE_RGB_MATRIX_CYCLE_ALL + #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN + #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN + #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL + #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL + #define ENABLE_RGB_MATRIX_DUAL_BEACON + #define ENABLE_RGB_MATRIX_RAINBOW_BEACON + #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #define ENABLE_RGB_MATRIX_RAINDROPS + #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + #define ENABLE_RGB_MATRIX_HUE_BREATHING + #define ENABLE_RGB_MATRIX_HUE_PENDULUM + #define ENABLE_RGB_MATRIX_HUE_WAVE + #define ENABLE_RGB_MATRIX_PIXEL_RAIN + #define ENABLE_RGB_MATRIX_PIXEL_FLOW + #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL -#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_SWIRL + // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined + #define ENABLE_RGB_MATRIX_TYPING_HEATMAP + #define ENABLE_RGB_MATRIX_DIGITAL_RAIN - -/*== all animations enable ==*/ -// #define RGBLIGHT_ANIMATIONS -/*== or choose animations ==*/ - #define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - #define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - #define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - #define RGBLIGHT_EFFECT_RGB_TEST - #define RGBLIGHT_EFFECT_ALTERNATING - -// #ifdef RGB_DI_PIN -// #define DRIVER_LED_TOTAL 5 - -// #define RGB_MATRIX_KEYPRESSES // reacts to keypresses -// // # define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value -// #endif -// #ifdef RGB_MATRIX_ENABLE -// // # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value -// // RGB Matrix Animation modes. Explicitly enabled -// // For full list of effects, see: -// // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects -// #define ENABLE_RGB_MATRIX_SOLID_COLOR -// #define ENABLE_RGB_MATRIX_ALPHAS_MODS -// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -// #define ENABLE_RGB_MATRIX_BREATHING -// // #define ENABLE_RGB_MATRIX_BAND_SAT -// // #define ENABLE_RGB_MATRIX_BAND_VAL -// // #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -// // #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -// // #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT -// // #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL -// #define ENABLE_RGB_MATRIX_CYCLE_ALL -// #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN -// // #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN -// // #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL -// #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL -// // #define ENABLE_RGB_MATRIX_DUAL_BEACON -// #define ENABLE_RGB_MATRIX_RAINBOW_BEACON -// // #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// #define ENABLE_RGB_MATRIX_RAINDROPS -// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// #define ENABLE_RGB_MATRIX_HUE_BREATHING -// #define ENABLE_RGB_MATRIX_HUE_PENDULUM -// #define ENABLE_RGB_MATRIX_HUE_WAVE -// #define ENABLE_RGB_MATRIX_PIXEL_RAIN -// #define ENABLE_RGB_MATRIX_PIXEL_FLOW -// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL - -// // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -// // #define ENABLE_RGB_MATRIX_TYPING_HEATMAP -// // #define ENABLE_RGB_MATRIX_DIGITAL_RAIN - -// // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -// // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE -// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// #define ENABLE_RGB_MATRIX_SPLASH -// // #define ENABLE_RGB_MATRIX_MULTISPLASH -// #define ENABLE_RGB_MATRIX_SOLID_SPLASH -// // #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -// #endif + // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined + // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + #define ENABLE_RGB_MATRIX_SPLASH + #define ENABLE_RGB_MATRIX_MULTISPLASH + #define ENABLE_RGB_MATRIX_SOLID_SPLASH + #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif diff --git a/keyboards/momokai/tap_duo/rules.mk b/keyboards/momokai/tap_duo/rules.mk index 0b56f37c994a..0459a2ad6b56 100644 --- a/keyboards/momokai/tap_duo/rules.mk +++ b/keyboards/momokai/tap_duo/rules.mk @@ -8,7 +8,8 @@ CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output - +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 LTO_ENABLE = yes diff --git a/keyboards/momokai/tap_duo/tap_duo.c b/keyboards/momokai/tap_duo/tap_duo.c index 2216c37f4318..bd5381083862 100644 --- a/keyboards/momokai/tap_duo/tap_duo.c +++ b/keyboards/momokai/tap_duo/tap_duo.c @@ -16,16 +16,16 @@ #include "tap_duo.h" -// #ifdef RGB_MATRIX_ENABLE -// led_config_t g_led_config = { { -// // Key Matrix to LED Index -// { 0, 1, 2, NO_LED, NO_LED, NO_LED} -// }, { -// // LED Index to Physical Position -// { 56, 0}, { 112, 0}, { 168, 0}, { 0, 64}, { 224, 64} -// }, { -// // LED Index to Flag -// 4,4,4,2,2 -// } }; +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0, 1, NO_LED, NO_LED, NO_LED} +}, { + // LED Index to Physical Position + { 112, 0}, { 168, 0}, { 0, 64}, { 224, 64} +}, { + // LED Index to Flag + 4,4,2,2 +} }; -// #endif +#endif diff --git a/keyboards/momokai/tap_trio/config.h b/keyboards/momokai/tap_trio/config.h index ba2c74ee17ee..7a38599d11a9 100644 --- a/keyboards/momokai/tap_trio/config.h +++ b/keyboards/momokai/tap_trio/config.h @@ -25,81 +25,64 @@ //TODO: implement RGB Matrix #define RGB_DI_PIN F0 -#define RGBLED_NUM 5 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_SWIRL -#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_SWIRL +#ifdef RGB_MATRIX_ENABLE +#define RGB_MATRIX_LED_COUNT 5 +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 + // RGB Matrix Animation modes. Explicitly enabled + // For full list of effects, see: + // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects + #define ENABLE_RGB_MATRIX_SOLID_COLOR + #define ENABLE_RGB_MATRIX_ALPHAS_MODS + #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT + #define ENABLE_RGB_MATRIX_BREATHING + #define ENABLE_RGB_MATRIX_BAND_SAT + #define ENABLE_RGB_MATRIX_BAND_VAL + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT + #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL + #define ENABLE_RGB_MATRIX_CYCLE_ALL + #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN + #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN + #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL + #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL + #define ENABLE_RGB_MATRIX_DUAL_BEACON + #define ENABLE_RGB_MATRIX_RAINBOW_BEACON + #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #define ENABLE_RGB_MATRIX_RAINDROPS + #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + #define ENABLE_RGB_MATRIX_HUE_BREATHING + #define ENABLE_RGB_MATRIX_HUE_PENDULUM + #define ENABLE_RGB_MATRIX_HUE_WAVE + #define ENABLE_RGB_MATRIX_PIXEL_RAIN + #define ENABLE_RGB_MATRIX_PIXEL_FLOW + #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL - #define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - #define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - #define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - #define RGBLIGHT_EFFECT_RGB_TEST - #define RGBLIGHT_EFFECT_ALTERNATING + // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined + #define ENABLE_RGB_MATRIX_TYPING_HEATMAP + #define ENABLE_RGB_MATRIX_DIGITAL_RAIN -// #ifdef RGB_DI_PIN -// #define RGB_MATRIX_LED_COUNT 5 - -// #define RGB_MATRIX_KEYPRESSES // reacts to keypresses -// // # define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value -// #endif -// #ifdef RGB_MATRIX_ENABLE -// // # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value -// // RGB Matrix Animation modes. Explicitly enabled -// // For full list of effects, see: -// // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects -// #define ENABLE_RGB_MATRIX_SOLID_COLOR -// #define ENABLE_RGB_MATRIX_ALPHAS_MODS -// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -// #define ENABLE_RGB_MATRIX_BREATHING -// // #define ENABLE_RGB_MATRIX_BAND_SAT -// // #define ENABLE_RGB_MATRIX_BAND_VAL -// // #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -// // #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -// // #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT -// // #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL -// #define ENABLE_RGB_MATRIX_CYCLE_ALL -// #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN -// // #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN -// // #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL -// #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL -// // #define ENABLE_RGB_MATRIX_DUAL_BEACON -// #define ENABLE_RGB_MATRIX_RAINBOW_BEACON -// // #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// #define ENABLE_RGB_MATRIX_RAINDROPS -// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// #define ENABLE_RGB_MATRIX_HUE_BREATHING -// #define ENABLE_RGB_MATRIX_HUE_PENDULUM -// #define ENABLE_RGB_MATRIX_HUE_WAVE -// #define ENABLE_RGB_MATRIX_PIXEL_RAIN -// #define ENABLE_RGB_MATRIX_PIXEL_FLOW -// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL - -// // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -// // #define ENABLE_RGB_MATRIX_TYPING_HEATMAP -// // #define ENABLE_RGB_MATRIX_DIGITAL_RAIN - -// // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -// // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE -// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// #define ENABLE_RGB_MATRIX_SPLASH -// // #define ENABLE_RGB_MATRIX_MULTISPLASH -// #define ENABLE_RGB_MATRIX_SOLID_SPLASH -// // #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -// #endif + // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined + // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + #define ENABLE_RGB_MATRIX_SPLASH + #define ENABLE_RGB_MATRIX_MULTISPLASH + #define ENABLE_RGB_MATRIX_SOLID_SPLASH + #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif diff --git a/keyboards/momokai/tap_trio/rules.mk b/keyboards/momokai/tap_trio/rules.mk index 0b56f37c994a..0459a2ad6b56 100644 --- a/keyboards/momokai/tap_trio/rules.mk +++ b/keyboards/momokai/tap_trio/rules.mk @@ -8,7 +8,8 @@ CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output - +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 LTO_ENABLE = yes diff --git a/keyboards/momokai/tap_trio/tap_trio.c b/keyboards/momokai/tap_trio/tap_trio.c index 02bd0d3addc0..69b850e04cc0 100644 --- a/keyboards/momokai/tap_trio/tap_trio.c +++ b/keyboards/momokai/tap_trio/tap_trio.c @@ -16,16 +16,16 @@ #include "tap_trio.h" -// #ifdef RGB_MATRIX_ENABLE -// led_config_t g_led_config = { { -// // Key Matrix to LED Index -// { 0, 1, 2, NO_LED, NO_LED, NO_LED} -// }, { -// // LED Index to Physical Position -// { 56, 0}, { 112, 0}, { 168, 0}, { 0, 64}, { 224, 64} -// }, { -// // LED Index to Flag -// 4,4,4,2,2 -// } }; +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0, 1, 2, NO_LED, NO_LED, NO_LED} +}, { + // LED Index to Physical Position + { 56, 0}, { 112, 0}, { 168, 0}, { 0, 64}, { 224, 64} +}, { + // LED Index to Flag + 4,4,4,2,2 +} }; -// #endif +#endif diff --git a/keyboards/pierce/info.json b/keyboards/pierce/info.json index 503f476c2cc6..b2dd54c57e39 100644 --- a/keyboards/pierce/info.json +++ b/keyboards/pierce/info.json @@ -4,7 +4,7 @@ "url": "https://github.com/durken1/pierce", "maintainer": "durken1", "usb": { - "vid": "0xFEED", + "vid": "0x6431", "pid": "0x6060", "device_version": "0.0.1" }, diff --git a/keyboards/pierce/keymaps/via/keymap.c b/keyboards/pierce/keymaps/via/keymap.c new file mode 100644 index 000000000000..2a65a8b04a07 --- /dev/null +++ b/keyboards/pierce/keymaps/via/keymap.c @@ -0,0 +1,27 @@ +// Copyright 2023 durken +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + * │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ + * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ + * │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ + * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ + * │ Z │ X │ C │ V │ B │ │ N │ M │ , │ . │ / │ + * └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + * ┌───┐ ┌───┐ + * │GUI├───┐ ┌───┤Alt│ + * └───┤Bsp├───┐ ┌───┤Ent├───┘ + * └───┤ │ │ ├───┘ + * └───┘ └───┘ + */ + [0] = LAYOUT_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LGUI, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, KC_RALT + ) +}; diff --git a/keyboards/pierce/keymaps/via/rules.mk b/keyboards/pierce/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/pierce/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/prototypist/pt60/info.json b/keyboards/prototypist/pt60/info.json new file mode 100644 index 000000000000..c902b16f4f5d --- /dev/null +++ b/keyboards/prototypist/pt60/info.json @@ -0,0 +1,238 @@ +{ + "manufacturer": "Proto[Typist]", + "keyboard_name": "PT-60", + "maintainer": "Anjheos", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["B12", "B14", "A8", "A9", "A15", "B3", "B7", "B4", "B5", "B6", "A4", "A5", "A6", "A7" ], + "rows": ["B0", "B1", "B2", "B10", "B11"] + }, + "processor": "STM32F303", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0001", + "vid": "0x4A46" + }, + "community_layouts": ["60_iso", "60_ansi"], + "layouts": { + "LAYOUT_all": { + "layout": [ + { "matrix": [ 0, 0 ], "label": "\u00ac", "x": 0, "y": 0 }, + { "matrix": [ 0, 1 ], "label": "!", "x": 1, "y": 0 }, + { "matrix": [ 0, 2], "label": "\"", "x": 2, "y": 0 }, + { "matrix": [ 0, 3], "label": "\u00a3", "x": 3, "y": 0 }, + { "matrix": [ 0, 4], "label": "$", "x": 4, "y": 0 }, + { "matrix": [ 0, 5], "label": "%", "x": 5, "y": 0 }, + { "matrix": [ 0, 6], "label": "^", "x": 6, "y": 0 }, + { "matrix": [ 0, 7], "label": "&", "x": 7, "y": 0 }, + { "matrix": [ 0, 8], "label": "*", "x": 8, "y": 0 }, + { "matrix": [ 0, 9], "label": "(", "x": 9, "y": 0 }, + { "matrix": [ 0, 10], "label": ")", "x": 10, "y": 0 }, + { "matrix": [ 0, 11], "label": "_", "x": 11, "y": 0 }, + { "matrix": [ 0, 12], "label": "+", "x": 12, "y": 0 }, + { "matrix": [ 0, 13], "label": "Back", "x": 13, "y": 0 }, + { "matrix": [ 2, 13], "label": "Delete", "x": 14, "y": 0 }, + { "matrix": [ 1, 0], "label": "Tab", "w": 1.5, "x": 0, "y": 1 }, + { "matrix": [ 1, 1], "label": "Q", "x": 1.5, "y": 1 }, + { "matrix": [ 1, 2], "label": "W", "x": 2.5, "y": 1 }, + { "matrix": [ 1, 3], "label": "E", "x": 3.5, "y": 1 }, + { "matrix": [ 1, 4], "label": "R", "x": 4.5, "y": 1 }, + { "matrix": [ 1, 5], "label": "T", "x": 5.5, "y": 1 }, + { "matrix": [ 1, 6], "label": "Y", "x": 6.5, "y": 1 }, + { "matrix": [ 1, 7], "label": "U", "x": 7.5, "y": 1 }, + { "matrix": [ 1, 8], "label": "I", "x": 8.5, "y": 1 }, + { "matrix": [ 1, 9], "label": "O", "x": 9.5, "y": 1 }, + { "matrix": [ 1, 10], "label": "P", "x": 10.5, "y": 1 }, + { "matrix": [ 1, 11], "label": "{", "x": 11.5, "y": 1 }, + { "matrix": [ 1, 12], "label": "}", "x": 12.5, "y": 1 }, + { "matrix": [ 1, 13], "h": 2, "label": "Enter", "w": 1.25, "x": 13.75, "y": 1 }, + { "matrix": [ 2, 0], "label": "Caps Lock", "w": 1.75, "x": 0, "y": 2 }, + { "matrix": [ 2, 1], "label": "A", "x": 1.75, "y": 2 }, + { "matrix": [ 2, 2], "label": "S", "x": 2.75, "y": 2 }, + { "matrix": [ 2, 3], "label": "D", "x": 3.75, "y": 2 }, + { "matrix": [ 2, 4], "label": "F", "x": 4.75, "y": 2 }, + { "matrix": [ 2, 5], "label": "G", "x": 5.75, "y": 2 }, + { "matrix": [ 2, 6], "label": "H", "x": 6.75, "y": 2 }, + { "matrix": [ 2, 7], "label": "J", "x": 7.75, "y": 2 }, + { "matrix": [ 2, 8], "label": "K", "x": 8.75, "y": 2 }, + { "matrix": [ 2, 9], "label": "L", "x": 9.75, "y": 2 }, + { "matrix": [ 2, 10], "label": ":", "x": 10.75, "y": 2 }, + { "matrix": [ 2, 11], "label": "@", "x": 11.75, "y": 2 }, + { "matrix": [ 2, 12], "label": "~", "x": 12.75, "y": 2 }, + + { "matrix": [ 3, 0], "label": "Shift", "w": 1.25, "x": 0, "y": 3 }, + { "matrix": [ 3, 1], "label": "|", "x": 1.25, "y": 3 }, + { "matrix": [ 3, 2], "label": "Z", "x": 2.25, "y": 3 }, + { "matrix": [ 3, 3], "label": "X", "x": 3.25, "y": 3 }, + { "matrix": [ 3, 4], "label": "C", "x": 4.25, "y": 3 }, + { "matrix": [ 3, 5], "label": "V", "x": 5.25, "y": 3 }, + { "matrix": [ 3, 6], "label": "B", "x": 6.25, "y": 3 }, + { "matrix": [ 3, 7], "label": "N", "x": 7.25, "y": 3 }, + { "matrix": [ 3, 8], "label": "M", "x": 8.25, "y": 3 }, + { "matrix": [ 3, 9], "label": "<", "x": 9.25, "y": 3 }, + { "matrix": [ 3, 10], "label": ">", "x": 10.25, "y": 3 }, + { "matrix": [ 3, 11], "label": "?", "x": 11.25, "y": 3 }, + { "matrix": [ 3, 12], "label": "Shift", "w": 1.75, "x": 12.25, "y": 3 }, + { "matrix": [ 3, 13], "label": "Fn", "x": 14, "y": 3 }, + { "matrix": [ 4, 0], "label": "Ctrl", "w": 1.25, "x": 0, "y": 4 }, + { "matrix": [ 4, 1], "label": "Win", "w": 1.25, "x": 1.25, "y": 4 }, + { "matrix": [ 4, 2], "label": "Alt", "w": 1.25, "x": 2.5, "y": 4 }, + { "matrix": [ 4, 6], "w": 6.25, "x": 3.75, "y": 4 }, + { "matrix": [ 4, 10], "label": "AltGr", "w": 1.25, "x": 10, "y": 4 }, + { "matrix": [ 4, 11], "label": "Win", "w": 1.25, "x": 11.25, "y": 4 }, + { "matrix": [ 4, 12], "label": "Fn", "w": 1.25, "x": 12.5, "y": 4 }, + { "matrix": [ 4, 13], "label": "Ctrl", "w": 1.25, "x": 13.75, "y": 4 } + ] + }, + + "LAYOUT_60_iso": { + "layout": [ + { "matrix": [ 0, 0 ], "label": "\u00ac", "x": 0, "y": 0 }, + { "matrix": [ 0, 1 ], "label": "!", "x": 1, "y": 0 }, + { "matrix": [ 0, 2], "label": "\"", "x": 2, "y": 0 }, + { "matrix": [ 0, 3], "label": "\u00a3", "x": 3, "y": 0 }, + { "matrix": [ 0, 4], "label": "$", "x": 4, "y": 0 }, + { "matrix": [ 0, 5], "label": "%", "x": 5, "y": 0 }, + { "matrix": [ 0, 6], "label": "^", "x": 6, "y": 0 }, + { "matrix": [ 0, 7], "label": "&", "x": 7, "y": 0 }, + { "matrix": [ 0, 8], "label": "*", "x": 8, "y": 0 }, + { "matrix": [ 0, 9], "label": "(", "x": 9, "y": 0 }, + { "matrix": [ 0, 10], "label": ")", "x": 10, "y": 0 }, + { "matrix": [ 0, 11], "label": "_", "x": 11, "y": 0 }, + { "matrix": [ 0, 12], "label": "+", "x": 12, "y": 0 }, + { "matrix": [ 0, 13], "label": "Back", "w": 2, "x": 13, "y": 0 }, + + { "matrix": [ 1, 0], "label": "Tab", "w": 1.5, "x": 0, "y": 1 }, + { "matrix": [ 1, 1], "label": "Q", "x": 1.5, "y": 1 }, + { "matrix": [ 1, 2], "label": "W", "x": 2.5, "y": 1 }, + { "matrix": [ 1, 3], "label": "E", "x": 3.5, "y": 1 }, + { "matrix": [ 1, 4], "label": "R", "x": 4.5, "y": 1 }, + { "matrix": [ 1, 5], "label": "T", "x": 5.5, "y": 1 }, + { "matrix": [ 1, 6], "label": "Y", "x": 6.5, "y": 1 }, + { "matrix": [ 1, 7], "label": "U", "x": 7.5, "y": 1 }, + { "matrix": [ 1, 8], "label": "I", "x": 8.5, "y": 1 }, + { "matrix": [ 1, 9], "label": "O", "x": 9.5, "y": 1 }, + { "matrix": [ 1, 10], "label": "P", "x": 10.5, "y": 1 }, + { "matrix": [ 1, 11], "label": "{", "x": 11.5, "y": 1 }, + { "matrix": [ 1, 12], "label": "}", "x": 12.5, "y": 1 }, + { "matrix": [ 1, 13], "label": "Enter", "h": 2, "w": 1.25, "x": 13.75, "y": 1 }, + { "matrix": [ 2, 0], "label": "Caps Lock", "w": 1.75, "x": 0, "y": 2 }, + { "matrix": [ 2, 1], "label": "A", "x": 1.75, "y": 2 }, + { "matrix": [ 2, 2], "label": "S", "x": 2.75, "y": 2 }, + { "matrix": [ 2, 3], "label": "D", "x": 3.75, "y": 2 }, + { "matrix": [ 2, 4], "label": "F", "x": 4.75, "y": 2 }, + { "matrix": [ 2, 5], "label": "G", "x": 5.75, "y": 2 }, + { "matrix": [ 2, 6], "label": "H", "x": 6.75, "y": 2 }, + { "matrix": [ 2, 7], "label": "J", "x": 7.75, "y": 2 }, + { "matrix": [ 2, 8], "label": "K", "x": 8.75, "y": 2 }, + { "matrix": [ 2, 9], "label": "L", "x": 9.75, "y": 2 }, + { "matrix": [ 2, 10], "label": ":", "x": 10.75, "y": 2 }, + { "matrix": [ 2, 11], "label": "@", "x": 11.75, "y": 2 }, + { "matrix": [ 2, 12], "label": "~", "x": 12.75, "y": 2 }, + + { "matrix": [ 3, 0], "label": "Shift", "w": 1.25, "x": 0, "y": 3 }, + { "matrix": [ 3, 1], "label": "|", "x": 1.25, "y": 3 }, + { "matrix": [ 3, 2], "label": "Z", "x": 2.25, "y": 3 }, + { "matrix": [ 3, 3], "label": "X", "x": 3.25, "y": 3 }, + { "matrix": [ 3, 4], "label": "C", "x": 4.25, "y": 3 }, + { "matrix": [ 3, 5], "label": "V", "x": 5.25, "y": 3 }, + { "matrix": [ 3, 6], "label": "B", "x": 6.25, "y": 3 }, + { "matrix": [ 3, 7], "label": "N", "x": 7.25, "y": 3 }, + { "matrix": [ 3, 8], "label": "M", "x": 8.25, "y": 3 }, + { "matrix": [ 3, 9], "label": "<", "x": 9.25, "y": 3 }, + { "matrix": [ 3, 10], "label": ">", "x": 10.25, "y": 3 }, + { "matrix": [ 3, 11], "label": "?", "x": 11.25, "y": 3 }, + { "matrix": [ 3, 12], "label": "Shift", "w": 2.75, "x": 12.25, "y": 3 }, + + { "matrix": [ 4, 0], "label": "Ctrl", "w": 1.25, "x": 0, "y": 4 }, + { "matrix": [ 4, 1], "label": "Win", "w": 1.25, "x": 1.25, "y": 4 }, + { "matrix": [ 4, 2], "label": "Alt", "w": 1.25, "x": 2.5, "y": 4 }, + { "matrix": [ 4, 6], "w": 6.25, "x": 3.75, "y": 4 }, + { "matrix": [ 4, 10], "label": "AltGr", "w": 1.25, "x": 10, "y": 4 }, + { "matrix": [ 4, 11], "label": "Win", "w": 1.25, "x": 11.25, "y": 4 }, + { "matrix": [ 4, 12], "label": "Fn", "w": 1.25, "x": 12.5, "y": 4 }, + { "matrix": [ 4, 13], "label": "Ctrl", "w": 1.25, "x": 13.75, "y": 4 } + ] + }, + + "LAYOUT_60_ansi": { + "layout": [ + { "matrix": [ 0, 0 ], "label": "\u00ac", "x": 0, "y": 0 }, + { "matrix": [ 0, 1 ], "label": "!", "x": 1, "y": 0 }, + { "matrix": [ 0, 2], "label": "\"", "x": 2, "y": 0 }, + { "matrix": [ 0, 3], "label": "\u00a3", "x": 3, "y": 0 }, + { "matrix": [ 0, 4], "label": "$", "x": 4, "y": 0 }, + { "matrix": [ 0, 5], "label": "%", "x": 5, "y": 0 }, + { "matrix": [ 0, 6], "label": "^", "x": 6, "y": 0 }, + { "matrix": [ 0, 7], "label": "&", "x": 7, "y": 0 }, + { "matrix": [ 0, 8], "label": "*", "x": 8, "y": 0 }, + { "matrix": [ 0, 9], "label": "(", "x": 9, "y": 0 }, + { "matrix": [ 0, 10], "label": ")", "x": 10, "y": 0 }, + { "matrix": [ 0, 11], "label": "_", "x": 11, "y": 0 }, + { "matrix": [ 0, 12], "label": "+", "x": 12, "y": 0 }, + { "matrix": [ 0, 13], "label": "Back", "w": 2, "x": 13, "y": 0 }, + + { "matrix": [ 1, 0], "label": "Tab", "w": 1.5, "x": 0, "y": 1 }, + { "matrix": [ 1, 1], "label": "Q", "x": 1.5, "y": 1 }, + { "matrix": [ 1, 2], "label": "W", "x": 2.5, "y": 1 }, + { "matrix": [ 1, 3], "label": "E", "x": 3.5, "y": 1 }, + { "matrix": [ 1, 4], "label": "R", "x": 4.5, "y": 1 }, + { "matrix": [ 1, 5], "label": "T", "x": 5.5, "y": 1 }, + { "matrix": [ 1, 6], "label": "Y", "x": 6.5, "y": 1 }, + { "matrix": [ 1, 7], "label": "U", "x": 7.5, "y": 1 }, + { "matrix": [ 1, 8], "label": "I", "x": 8.5, "y": 1 }, + { "matrix": [ 1, 9], "label": "O", "x": 9.5, "y": 1 }, + { "matrix": [ 1, 10], "label": "P", "x": 10.5, "y": 1 }, + { "matrix": [ 1, 11], "label": "{", "x": 11.5, "y": 1 }, + { "matrix": [ 1, 12], "label": "}", "x": 12.5, "y": 1 }, + { "matrix": [ 1, 13], "label": "|", "w": 1.5, "x": 13.5, "y": 1 }, + { "matrix": [ 2, 0], "label": "Caps Lock", "w": 1.75, "x": 0, "y": 2 }, + { "matrix": [ 2, 1], "label": "A", "x": 1.75, "y": 2 }, + { "matrix": [ 2, 2], "label": "S", "x": 2.75, "y": 2 }, + { "matrix": [ 2, 3], "label": "D", "x": 3.75, "y": 2 }, + { "matrix": [ 2, 4], "label": "F", "x": 4.75, "y": 2 }, + { "matrix": [ 2, 5], "label": "G", "x": 5.75, "y": 2 }, + { "matrix": [ 2, 6], "label": "H", "x": 6.75, "y": 2 }, + { "matrix": [ 2, 7], "label": "J", "x": 7.75, "y": 2 }, + { "matrix": [ 2, 8], "label": "K", "x": 8.75, "y": 2 }, + { "matrix": [ 2, 9], "label": "L", "x": 9.75, "y": 2 }, + { "matrix": [ 2, 10], "label": ":", "x": 10.75, "y": 2 }, + { "matrix": [ 2, 11], "label": "'", "x": 11.75, "y": 2 }, + { "matrix": [ 2, 12], "label": "Enter", "w": 2.25, "x": 12.75, "y": 2 }, + + { "matrix": [ 3, 0], "label": "Shift", "w": 2.25, "x": 0, "y": 3 }, + + { "matrix": [ 3, 2], "label": "Z", "x": 2.25, "y": 3 }, + { "matrix": [ 3, 3], "label": "X", "x": 3.25, "y": 3 }, + { "matrix": [ 3, 4], "label": "C", "x": 4.25, "y": 3 }, + { "matrix": [ 3, 5], "label": "V", "x": 5.25, "y": 3 }, + { "matrix": [ 3, 6], "label": "B", "x": 6.25, "y": 3 }, + { "matrix": [ 3, 7], "label": "N", "x": 7.25, "y": 3 }, + { "matrix": [ 3, 8], "label": "M", "x": 8.25, "y": 3 }, + { "matrix": [ 3, 9], "label": "<", "x": 9.25, "y": 3 }, + { "matrix": [ 3, 10], "label": ">", "x": 10.25, "y": 3 }, + { "matrix": [ 3, 11], "label": "?", "x": 11.25, "y": 3 }, + { "matrix": [ 3, 12], "label": "Shift", "w": 2.75, "x": 12.25, "y": 3 }, + + { "matrix": [ 4, 0], "label": "Ctrl", "w": 1.25, "x": 0, "y": 4 }, + { "matrix": [ 4, 1], "label": "Win", "w": 1.25, "x": 1.25, "y": 4 }, + { "matrix": [ 4, 2], "label": "Alt", "w": 1.25, "x": 2.5, "y": 4 }, + { "matrix": [ 4, 6], "w": 6.25, "x": 3.75, "y": 4 }, + { "matrix": [ 4, 10], "label": "AltGr", "w": 1.25, "x": 10, "y": 4 }, + { "matrix": [ 4, 11], "label": "Win", "w": 1.25, "x": 11.25, "y": 4 }, + { "matrix": [ 4, 12], "label": "Fn", "w": 1.25, "x": 12.5, "y": 4 }, + { "matrix": [ 4, 13], "label": "Ctrl", "w": 1.25, "x": 13.75, "y": 4 } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/prototypist/pt60/keymaps/default/keymap.c b/keyboards/prototypist/pt60/keymaps/default/keymap.c new file mode 100644 index 000000000000..24616964751e --- /dev/null +++ b/keyboards/prototypist/pt60/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +// Copyright 2021 Josh (@Anjheos) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_iso( + 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_ENT, + KC_LGUI, 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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + + [1] = LAYOUT_60_iso( + EE_CLR, 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_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, KC_MUTE, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO(2), + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_60_iso( + _______, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_MPRV, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, MO(3) + ), + + [3] = LAYOUT_60_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/prototypist/pt60/keymaps/default_ansi/keymap.c b/keyboards/prototypist/pt60/keymaps/default_ansi/keymap.c new file mode 100644 index 000000000000..a25cd2fae90f --- /dev/null +++ b/keyboards/prototypist/pt60/keymaps/default_ansi/keymap.c @@ -0,0 +1,38 @@ +// Copyright 2021 Josh (@Anjheos) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + 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_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + + [1] = LAYOUT_60_ansi( + EE_CLR, 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_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, KC_MUTE, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO(2), + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_60_ansi( + _______, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_MPRV, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, MO(3) + ), + + [3] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/prototypist/pt60/keymaps/via/keymap.c b/keyboards/prototypist/pt60/keymaps/via/keymap.c new file mode 100644 index 000000000000..d710399a811e --- /dev/null +++ b/keyboards/prototypist/pt60/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +// Copyright 2021 Josh (@Anjheos) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, + KC_LGUI, 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + + [1] = LAYOUT_all( + EE_CLR, 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_VOLU, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, KC_MUTE, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO(2), _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_all( + _______, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_MPRV, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, MO(3) + ), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/prototypist/pt60/keymaps/via/rules.mk b/keyboards/prototypist/pt60/keymaps/via/rules.mk new file mode 100644 index 000000000000..16d33cd89fe4 --- /dev/null +++ b/keyboards/prototypist/pt60/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes + diff --git a/keyboards/prototypist/pt60/readme.md b/keyboards/prototypist/pt60/readme.md new file mode 100644 index 000000000000..a4f396bf4a22 --- /dev/null +++ b/keyboards/prototypist/pt60/readme.md @@ -0,0 +1,35 @@ +# prototypist/pt60 + +![prototypist/pt60](https://i.imgur.com/Iu3QwxRh.png) + +*Proto[Typist] Keyboards' first ever in-house universal 60% PCB designed by Josh (Anjheos). +Features various physical layouts available to fit multiple regional and bottom row layouts. +Default layout is in ISO.* + +* Keyboard Maintainer: [Josh @ Prototypist](https://github.com/Anjheos) +* Hardware Supported: **PT-60J PCB and PT-60C PCB** +* Hardware Availability: [Proto[Typist]](https://prototypist.net) + +Make example for this keyboard (after setting up your build environment): + + make prototypist/pt60:default + make prototypist/pt60:via + make prototypist/pt60:default_ansi + + +Flashing example for this keyboard: + + make prototypist/pt60:default:flash + make prototypist/pt60:via:flash + make prototypist/pt60:default_ansi: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 marked `RESET0`. +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available. diff --git a/keyboards/prototypist/pt60/rules.mk b/keyboards/prototypist/pt60/rules.mk new file mode 100644 index 000000000000..d469a478286d --- /dev/null +++ b/keyboards/prototypist/pt60/rules.mk @@ -0,0 +1,3 @@ +# This file intentionally left blank. + + diff --git a/keyboards/prototypist/pt80/info.json b/keyboards/prototypist/pt80/info.json new file mode 100644 index 000000000000..8751845fc9dd --- /dev/null +++ b/keyboards/prototypist/pt80/info.json @@ -0,0 +1,316 @@ +{ + "manufacturer": "Proto[Typist]", + "keyboard_name": "PT-80", + "maintainer": "Anjheos", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["B7", "B6", "B5", "B4", "B3", "B0", "A7", "B1", "B2", "B10", "A6", "A5", "A4", "A3", "C13", "A2", "C14"], + "rows": ["B14", "A8", "A9", "B13", "B11", "B12"] + }, + "processor": "STM32F303", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0x4A46" + }, + "community_layouts": ["tkl_iso", "tkl_ansi"], + "layouts": { + "LAYOUT_all": { + "layout": [ + { "matrix": [0, 0], "label": "Esc", "x": 0, "y": 0 }, + { "matrix": [0, 1], "label": "F1", "x": 1.25, "y": 0 }, + { "matrix": [0, 2], "label": "F2", "x": 2.25, "y": 0 }, + { "matrix": [0, 3], "label": "F3", "x": 3.25, "y": 0 }, + { "matrix": [0, 4], "label": "F4", "x": 4.25, "y": 0 }, + { "matrix": [0, 5], "label": "F5", "x": 5.5, "y": 0 }, + { "matrix": [0, 6], "label": "F6", "x": 6.5, "y": 0 }, + { "matrix": [0, 7], "label": "F7", "x": 7.5, "y": 0 }, + { "matrix": [0, 8], "label": "F8", "x": 8.5, "y": 0 }, + { "matrix": [0, 9], "label": "F9", "x": 9.75, "y": 0 }, + { "matrix": [0, 10], "label": "F10", "x": 10.75, "y": 0 }, + { "matrix": [0, 11], "label": "F11", "x": 11.75, "y": 0 }, + { "matrix": [0, 12], "label": "F12", "x": 12.75, "y": 0 }, + { "matrix": [0, 13], "label": "F13", "x": 14, "y": 0 }, + { "matrix": [0, 14], "label": "PrtSc", "x": 15.25, "y": 0 }, + { "matrix": [0, 15], "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "matrix": [0, 16], "label": "Pause", "x": 17.25, "y": 0 }, + { "matrix": [1, 0], "label": "\u00ac", "x": 0, "y": 1.25 }, + { "matrix": [1, 1], "label": "!", "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "label": "\"", "x": 2, "y": 1.25 }, + { "matrix": [1, 3], "label": "\u00a3", "x": 3, "y": 1.25 }, + { "matrix": [1, 4], "label": "$", "x": 4, "y": 1.25 }, + { "matrix": [1, 5], "label": "%", "x": 5, "y": 1.25 }, + { "matrix": [1, 6], "label": "^", "x": 6, "y": 1.25 }, + { "matrix": [1, 7], "label": "&", "x": 7, "y": 1.25 }, + { "matrix": [1, 8], "label": "*", "x": 8, "y": 1.25 }, + { "matrix": [1, 9], "label": "(", "x": 9, "y": 1.25 }, + { "matrix": [1, 10], "label": ")", "x": 10, "y": 1.25 }, + { "matrix": [1, 11], "label": "_", "x": 11, "y": 1.25 }, + { "matrix": [1, 12], "label": "+", "x": 12, "y": 1.25 }, + { "matrix": [1, 13], "label": "Backspace", "x": 13, "y": 1.25 }, + { "matrix": [3, 13], "label": "Del", "x": 14, "y": 1.25 }, + { "matrix": [1, 14], "label": "Insert", "x": 15.25, "y": 1.25 }, + { "matrix": [1, 15], "label": "Home", "x": 16.25, "y": 1.25 }, + { "matrix": [1, 16], "label": "PgUp", "x": 17.25, "y": 1.25 }, + { "matrix": [2, 0], "label": "Tab", "w": 1.5, "x": 0, "y": 2.25 }, + { "matrix": [2, 1], "label": "Q", "x": 1.5, "y": 2.25 }, + { "matrix": [2, 2], "label": "W", "x": 2.5, "y": 2.25 }, + { "matrix": [2, 3], "label": "E", "x": 3.5, "y": 2.25 }, + { "matrix": [2, 4], "label": "R", "x": 4.5, "y": 2.25 }, + { "matrix": [2, 5], "label": "T", "x": 5.5, "y": 2.25 }, + { "matrix": [2, 6], "label": "Y", "x": 6.5, "y": 2.25 }, + { "matrix": [2, 7], "label": "U", "x": 7.5, "y": 2.25 }, + { "matrix": [2, 8], "label": "I", "x": 8.5, "y": 2.25 }, + { "matrix": [2, 9], "label": "O", "x": 9.5, "y": 2.25 }, + { "matrix": [2, 10], "label": "P", "x": 10.5, "y": 2.25 }, + { "matrix": [2, 11], "label": "{", "x": 11.5, "y": 2.25 }, + { "matrix": [2, 12], "label": "}", "x": 12.5, "y": 2.25 }, + { "matrix": [2, 13], "h": 2, "label": "Enter", "w": 1.25, "x": 13.75, "y": 2.25 }, + { "matrix": [2, 14], "label": "Delete", "x": 15.25, "y": 2.25 }, + { "matrix": [2, 15], "label": "End", "x": 16.25, "y": 2.25 }, + { "matrix": [2, 16], "label": "PgDn", "x": 17.25, "y": 2.25 }, + { "matrix": [3, 0], "label": "Caps Lock", "w": 1.75, "x": 0, "y": 3.25 }, + { "matrix": [3, 1], "label": "A", "x": 1.75, "y": 3.25 }, + { "matrix": [3, 2], "label": "S", "x": 2.75, "y": 3.25 }, + { "matrix": [3, 3], "label": "D", "x": 3.75, "y": 3.25 }, + { "matrix": [3, 4], "label": "F", "x": 4.75, "y": 3.25 }, + { "matrix": [3, 5], "label": "G", "x": 5.75, "y": 3.25 }, + { "matrix": [3, 6], "label": "H", "x": 6.75, "y": 3.25 }, + { "matrix": [3, 7], "label": "J", "x": 7.75, "y": 3.25 }, + { "matrix": [3, 8], "label": "K", "x": 8.75, "y": 3.25 }, + { "matrix": [3, 9], "label": "L", "x": 9.75, "y": 3.25 }, + { "matrix": [3, 10], "label": ":", "x": 10.75, "y": 3.25 }, + { "matrix": [3, 11], "label": "@", "x": 11.75, "y": 3.25 }, + { "matrix": [3, 12], "label": "~", "x": 12.75, "y": 3.25 }, + { "matrix": [4, 0], "label": "Shift", "w": 1.25, "x": 0, "y": 4.25 }, + { "matrix": [4, 1], "label": "|", "x": 1.25, "y": 4.25 }, + { "matrix": [4, 2], "label": "Z", "x": 2.25, "y": 4.25 }, + { "matrix": [4, 3], "label": "X", "x": 3.25, "y": 4.25 }, + { "matrix": [4, 4], "label": "C", "x": 4.25, "y": 4.25 }, + { "matrix": [4, 5], "label": "V", "x": 5.25, "y": 4.25 }, + { "matrix": [4, 6], "label": "B", "x": 6.25, "y": 4.25 }, + { "matrix": [4, 7], "label": "N", "x": 7.25, "y": 4.25 }, + { "matrix": [4, 8], "label": "M", "x": 8.25, "y": 4.25 }, + { "matrix": [4, 9], "label": "<", "x": 9.25, "y": 4.25 }, + { "matrix": [4, 10], "label": ">", "x": 10.25, "y": 4.25 }, + { "matrix": [4, 11], "label": "?", "x": 11.25, "y": 4.25 }, + { "matrix": [4, 12], "label": "Shift", "w": 1.75, "x": 12.25, "y": 4.25 }, + { "matrix": [4, 13], "label": "Fn", "x": 14, "y": 4.25 }, + { "matrix": [4, 15], "label": "\u2191", "x": 16.25, "y": 4.25 }, + { "matrix": [5, 0], "label": "Ctrl", "w": 1.25, "x": 0, "y": 5.25 }, + { "matrix": [5, 1], "label": "Win", "w": 1.25, "x": 1.25, "y": 5.25 }, + { "matrix": [5, 2], "label": "Alt", "w": 1.25, "x": 2.5, "y": 5.25 }, + { "matrix": [5, 6], "w": 6.25, "x": 3.75, "y": 5.25 }, + { "matrix": [5, 10], "label": "AltGr", "w": 1.25, "x": 10, "y": 5.25 }, + { "matrix": [5, 11], "label": "Win", "w": 1.25, "x": 11.25, "y": 5.25 }, + { "matrix": [5, 12], "label": "Menu", "w": 1.25, "x": 12.5, "y": 5.25 }, + { "matrix": [5, 13], "label": "Ctrl", "w": 1.25, "x": 13.75, "y": 5.25 }, + { "matrix": [5, 14], "label": "\u2190", "x": 15.25, "y": 5.25 }, + { "matrix": [5, 15], "label": "\u2193", "x": 16.25, "y": 5.25 }, + { "matrix": [5, 16], "label": "\u2192", "x": 17.25, "y": 5.25 } + ] + }, + + "LAYOUT_tkl_iso": { + "layout": [ + { "matrix": [0, 0], "label": "Esc", "x": 0, "y": 0 }, + { "matrix": [0, 1], "label": "F1", "x": 2, "y": 0 }, + { "matrix": [0, 2], "label": "F2", "x": 3, "y": 0 }, + { "matrix": [0, 3], "label": "F3", "x": 4, "y": 0 }, + { "matrix": [0, 4], "label": "F4", "x": 5, "y": 0 }, + { "matrix": [0, 5], "label": "F5", "x": 6.5, "y": 0 }, + { "matrix": [0, 6], "label": "F6", "x": 7.5, "y": 0 }, + { "matrix": [0, 7], "label": "F7", "x": 8.5, "y": 0 }, + { "matrix": [0, 8], "label": "F8", "x": 9.5, "y": 0 }, + { "matrix": [0, 9], "label": "F9", "x": 11, "y": 0 }, + { "matrix": [0, 10], "label": "F10", "x": 12, "y": 0 }, + { "matrix": [0, 11], "label": "F11", "x": 13, "y": 0 }, + { "matrix": [0, 12], "label": "F12", "x": 14, "y": 0 }, + + { "matrix": [0, 14], "label": "PrtSc", "x": 15.25, "y": 0 }, + { "matrix": [0, 15], "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "matrix": [0, 16], "label": "Pause", "x": 17.25, "y": 0 }, + { "matrix": [1, 0], "label": "\u00ac", "x": 0, "y": 1.25 }, + { "matrix": [1, 1], "label": "!", "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "label": "\"", "x": 2, "y": 1.25 }, + { "matrix": [1, 3], "label": "\u00a3", "x": 3, "y": 1.25 }, + { "matrix": [1, 4], "label": "$", "x": 4, "y": 1.25 }, + { "matrix": [1, 5], "label": "%", "x": 5, "y": 1.25 }, + { "matrix": [1, 6], "label": "^", "x": 6, "y": 1.25 }, + { "matrix": [1, 7], "label": "&", "x": 7, "y": 1.25 }, + { "matrix": [1, 8], "label": "*", "x": 8, "y": 1.25 }, + { "matrix": [1, 9], "label": "(", "x": 9, "y": 1.25 }, + { "matrix": [1, 10], "label": ")", "x": 10, "y": 1.25 }, + { "matrix": [1, 11], "label": "_", "x": 11, "y": 1.25 }, + { "matrix": [1, 12], "label": "+", "x": 12, "y": 1.25 }, + { "matrix": [1, 13], "label": "Backspace", "w": 2, "x": 13, "y": 1.25 }, + + { "matrix": [1, 14], "label": "Insert", "x": 15.25, "y": 1.25 }, + { "matrix": [1, 15], "label": "Home", "x": 16.25, "y": 1.25 }, + { "matrix": [1, 16], "label": "PgUp", "x": 17.25, "y": 1.25 }, + { "matrix": [2, 0], "label": "Tab", "w": 1.5, "x": 0, "y": 2.25 }, + { "matrix": [2, 1], "label": "Q", "x": 1.5, "y": 2.25 }, + { "matrix": [2, 2], "label": "W", "x": 2.5, "y": 2.25 }, + { "matrix": [2, 3], "label": "E", "x": 3.5, "y": 2.25 }, + { "matrix": [2, 4], "label": "R", "x": 4.5, "y": 2.25 }, + { "matrix": [2, 5], "label": "T", "x": 5.5, "y": 2.25 }, + { "matrix": [2, 6], "label": "Y", "x": 6.5, "y": 2.25 }, + { "matrix": [2, 7], "label": "U", "x": 7.5, "y": 2.25 }, + { "matrix": [2, 8], "label": "I", "x": 8.5, "y": 2.25 }, + { "matrix": [2, 9], "label": "O", "x": 9.5, "y": 2.25 }, + { "matrix": [2, 10], "label": "P", "x": 10.5, "y": 2.25 }, + { "matrix": [2, 11], "label": "{", "x": 11.5, "y": 2.25 }, + { "matrix": [2, 12], "label": "}", "x": 12.5, "y": 2.25 }, + { "matrix": [2, 13], "h": 2, "label": "Enter", "w": 1.25, "x": 13.75, "y": 2.25 }, + { "matrix": [2, 14], "label": "Delete", "x": 15.25, "y": 2.25 }, + { "matrix": [2, 15], "label": "End", "x": 16.25, "y": 2.25 }, + { "matrix": [2, 16], "label": "PgDn", "x": 17.25, "y": 2.25 }, + { "matrix": [3, 0], "label": "Caps Lock", "w": 1.75, "x": 0, "y": 3.25 }, + { "matrix": [3, 1], "label": "A", "x": 1.75, "y": 3.25 }, + { "matrix": [3, 2], "label": "S", "x": 2.75, "y": 3.25 }, + { "matrix": [3, 3], "label": "D", "x": 3.75, "y": 3.25 }, + { "matrix": [3, 4], "label": "F", "x": 4.75, "y": 3.25 }, + { "matrix": [3, 5], "label": "G", "x": 5.75, "y": 3.25 }, + { "matrix": [3, 6], "label": "H", "x": 6.75, "y": 3.25 }, + { "matrix": [3, 7], "label": "J", "x": 7.75, "y": 3.25 }, + { "matrix": [3, 8], "label": "K", "x": 8.75, "y": 3.25 }, + { "matrix": [3, 9], "label": "L", "x": 9.75, "y": 3.25 }, + { "matrix": [3, 10], "label": ":", "x": 10.75, "y": 3.25 }, + { "matrix": [3, 11], "label": "@", "x": 11.75, "y": 3.25 }, + { "matrix": [3, 12], "label": "~", "x": 12.75, "y": 3.25 }, + { "matrix": [4, 0], "label": "Shift", "w": 1.25, "x": 0, "y": 4.25 }, + { "matrix": [4, 1], "label": "|", "x": 1.25, "y": 4.25 }, + { "matrix": [4, 2], "label": "Z", "x": 2.25, "y": 4.25 }, + { "matrix": [4, 3], "label": "X", "x": 3.25, "y": 4.25 }, + { "matrix": [4, 4], "label": "C", "x": 4.25, "y": 4.25 }, + { "matrix": [4, 5], "label": "V", "x": 5.25, "y": 4.25 }, + { "matrix": [4, 6], "label": "B", "x": 6.25, "y": 4.25 }, + { "matrix": [4, 7], "label": "N", "x": 7.25, "y": 4.25 }, + { "matrix": [4, 8], "label": "M", "x": 8.25, "y": 4.25 }, + { "matrix": [4, 9], "label": "<", "x": 9.25, "y": 4.25 }, + { "matrix": [4, 10], "label": ">", "x": 10.25, "y": 4.25 }, + { "matrix": [4, 11], "label": "?", "x": 11.25, "y": 4.25 }, + { "matrix": [4, 12], "label": "Shift", "w": 2.75, "x": 12.25, "y": 4.25 }, + + { "matrix": [4, 15], "label": "\u2191", "x": 16.25, "y": 4.25 }, + { "matrix": [5, 0], "label": "Ctrl", "w": 1.25, "x": 0, "y": 5.25 }, + { "matrix": [5, 1], "label": "Win", "w": 1.25, "x": 1.25, "y": 5.25 }, + { "matrix": [5, 2], "label": "Alt", "w": 1.25, "x": 2.5, "y": 5.25 }, + { "matrix": [5, 6], "w": 6.25, "x": 3.75, "y": 5.25 }, + { "matrix": [5, 10], "label": "AltGr", "w": 1.25, "x": 10, "y": 5.25 }, + { "matrix": [5, 11], "label": "Win", "w": 1.25, "x": 11.25, "y": 5.25 }, + { "matrix": [5, 12], "label": "Menu", "w": 1.25, "x": 12.5, "y": 5.25 }, + { "matrix": [5, 13], "label": "Ctrl", "w": 1.25, "x": 13.75, "y": 5.25 }, + { "matrix": [5, 14], "label": "\u2190", "x": 15.25, "y": 5.25 }, + { "matrix": [5, 15], "label": "\u2193", "x": 16.25, "y": 5.25 }, + { "matrix": [5, 16], "label": "\u2192", "x": 17.25, "y": 5.25 } + ] + }, + + "LAYOUT_tkl_ansi": { + "layout": [ + { "matrix": [0, 0], "label": "Esc", "x": 0, "y": 0 }, + { "matrix": [0, 1], "label": "F1", "x": 2, "y": 0 }, + { "matrix": [0, 2], "label": "F2", "x": 3, "y": 0 }, + { "matrix": [0, 3], "label": "F3", "x": 4, "y": 0 }, + { "matrix": [0, 4], "label": "F4", "x": 5, "y": 0 }, + { "matrix": [0, 5], "label": "F5", "x": 6.5, "y": 0 }, + { "matrix": [0, 6], "label": "F6", "x": 7.5, "y": 0 }, + { "matrix": [0, 7], "label": "F7", "x": 8.5, "y": 0 }, + { "matrix": [0, 8], "label": "F8", "x": 9.5, "y": 0 }, + { "matrix": [0, 9], "label": "F9", "x": 11, "y": 0 }, + { "matrix": [0, 10], "label": "F10", "x": 12, "y": 0 }, + { "matrix": [0, 11], "label": "F11", "x": 13, "y": 0 }, + { "matrix": [0, 12], "label": "F12", "x": 14, "y": 0 }, + + { "matrix": [0, 14], "label": "PrtSc", "x": 15.25, "y": 0 }, + { "matrix": [0, 15], "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "matrix": [0, 16], "label": "Pause", "x": 17.25, "y": 0 }, + { "matrix": [1, 0], "label": "\u00ac", "x": 0, "y": 1.25 }, + { "matrix": [1, 1], "label": "!", "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "label": "\"", "x": 2, "y": 1.25 }, + { "matrix": [1, 3], "label": "\u00a3", "x": 3, "y": 1.25 }, + { "matrix": [1, 4], "label": "$", "x": 4, "y": 1.25 }, + { "matrix": [1, 5], "label": "%", "x": 5, "y": 1.25 }, + { "matrix": [1, 6], "label": "^", "x": 6, "y": 1.25 }, + { "matrix": [1, 7], "label": "&", "x": 7, "y": 1.25 }, + { "matrix": [1, 8], "label": "*", "x": 8, "y": 1.25 }, + { "matrix": [1, 9], "label": "(", "x": 9, "y": 1.25 }, + { "matrix": [1, 10], "label": ")", "x": 10, "y": 1.25 }, + { "matrix": [1, 11], "label": "_", "x": 11, "y": 1.25 }, + { "matrix": [1, 12], "label": "+", "x": 12, "y": 1.25 }, + { "matrix": [1, 13], "label": "Backspace", "w": 2, "x": 13, "y": 1.25 }, + + { "matrix": [1, 14], "label": "Insert", "x": 15.25, "y": 1.25 }, + { "matrix": [1, 15], "label": "Home", "x": 16.25, "y": 1.25 }, + { "matrix": [1, 16], "label": "PgUp", "x": 17.25, "y": 1.25 }, + { "matrix": [2, 0], "label": "Tab", "w": 1.5, "x": 0, "y": 2.25 }, + { "matrix": [2, 1], "label": "Q", "x": 1.5, "y": 2.25 }, + { "matrix": [2, 2], "label": "W", "x": 2.5, "y": 2.25 }, + { "matrix": [2, 3], "label": "E", "x": 3.5, "y": 2.25 }, + { "matrix": [2, 4], "label": "R", "x": 4.5, "y": 2.25 }, + { "matrix": [2, 5], "label": "T", "x": 5.5, "y": 2.25 }, + { "matrix": [2, 6], "label": "Y", "x": 6.5, "y": 2.25 }, + { "matrix": [2, 7], "label": "U", "x": 7.5, "y": 2.25 }, + { "matrix": [2, 8], "label": "I", "x": 8.5, "y": 2.25 }, + { "matrix": [2, 9], "label": "O", "x": 9.5, "y": 2.25 }, + { "matrix": [2, 10], "label": "P", "x": 10.5, "y": 2.25 }, + { "matrix": [2, 11], "label": "{", "x": 11.5, "y": 2.25 }, + { "matrix": [2, 12], "label": "}", "x": 12.5, "y": 2.25 }, + { "matrix": [2, 13], "label": "|", "w": 1.5, "x": 13.5, "y": 2.25 }, + { "matrix": [2, 14], "label": "Delete", "x": 15.25, "y": 2.25 }, + { "matrix": [2, 15], "label": "End", "x": 16.25, "y": 2.25 }, + { "matrix": [2, 16], "label": "PgDn", "x": 17.25, "y": 2.25 }, + { "matrix": [3, 0], "label": "Caps Lock", "w": 1.75, "x": 0, "y": 3.25 }, + { "matrix": [3, 1], "label": "A", "x": 1.75, "y": 3.25 }, + { "matrix": [3, 2], "label": "S", "x": 2.75, "y": 3.25 }, + { "matrix": [3, 3], "label": "D", "x": 3.75, "y": 3.25 }, + { "matrix": [3, 4], "label": "F", "x": 4.75, "y": 3.25 }, + { "matrix": [3, 5], "label": "G", "x": 5.75, "y": 3.25 }, + { "matrix": [3, 6], "label": "H", "x": 6.75, "y": 3.25 }, + { "matrix": [3, 7], "label": "J", "x": 7.75, "y": 3.25 }, + { "matrix": [3, 8], "label": "K", "x": 8.75, "y": 3.25 }, + { "matrix": [3, 9], "label": "L", "x": 9.75, "y": 3.25 }, + { "matrix": [3, 10], "label": ":", "x": 10.75, "y": 3.25 }, + { "matrix": [3, 11], "label": "@", "x": 11.75, "y": 3.25 }, + { "matrix": [3, 12], "label": "Enter", "w": 2.25, "x": 12.75, "y": 3.25 }, + { "matrix": [4, 0], "label": "Shift", "w": 2.25, "x": 0, "y": 4.25 }, + + { "matrix": [4, 2], "label": "Z", "x": 2.25, "y": 4.25 }, + { "matrix": [4, 3], "label": "X", "x": 3.25, "y": 4.25 }, + { "matrix": [4, 4], "label": "C", "x": 4.25, "y": 4.25 }, + { "matrix": [4, 5], "label": "V", "x": 5.25, "y": 4.25 }, + { "matrix": [4, 6], "label": "B", "x": 6.25, "y": 4.25 }, + { "matrix": [4, 7], "label": "N", "x": 7.25, "y": 4.25 }, + { "matrix": [4, 8], "label": "M", "x": 8.25, "y": 4.25 }, + { "matrix": [4, 9], "label": "<", "x": 9.25, "y": 4.25 }, + { "matrix": [4, 10], "label": ">", "x": 10.25, "y": 4.25 }, + { "matrix": [4, 11], "label": "?", "x": 11.25, "y": 4.25 }, + { "matrix": [4, 12], "label": "Shift", "w": 2.75, "x": 12.25, "y": 4.25 }, + + { "matrix": [4, 15], "label": "\u2191", "x": 16.25, "y": 4.25 }, + { "matrix": [5, 0], "label": "Ctrl", "w": 1.25, "x": 0, "y": 5.25 }, + { "matrix": [5, 1], "label": "Win", "w": 1.25, "x": 1.25, "y": 5.25 }, + { "matrix": [5, 2], "label": "Alt", "w": 1.25, "x": 2.5, "y": 5.25 }, + { "matrix": [5, 6], "w": 6.25, "x": 3.75, "y": 5.25 }, + { "matrix": [5, 10], "label": "AltGr", "w": 1.25, "x": 10, "y": 5.25 }, + { "matrix": [5, 11], "label": "Win", "w": 1.25, "x": 11.25, "y": 5.25 }, + { "matrix": [5, 12], "label": "Menu", "w": 1.25, "x": 12.5, "y": 5.25 }, + { "matrix": [5, 13], "label": "Ctrl", "w": 1.25, "x": 13.75, "y": 5.25 }, + { "matrix": [5, 14], "label": "\u2190", "x": 15.25, "y": 5.25 }, + { "matrix": [5, 15], "label": "\u2193", "x": 16.25, "y": 5.25 }, + { "matrix": [5, 16], "label": "\u2192", "x": 17.25, "y": 5.25 } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/prototypist/pt80/keymaps/default/keymap.c b/keyboards/prototypist/pt80/keymaps/default/keymap.c new file mode 100644 index 000000000000..5c5776b271db --- /dev/null +++ b/keyboards/prototypist/pt80/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +// Copyright 2021 Josh (@Anjheos) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_iso( + 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_ENT, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_tkl_iso( + QK_BOOT, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_MUTE, _______, KC_MPLY, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO(2), KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + + [2] = LAYOUT_tkl_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, MO(3), _______, _______, _______ + ), + + [3] = LAYOUT_tkl_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/prototypist/pt80/keymaps/default_ansi/keymap.c b/keyboards/prototypist/pt80/keymaps/default_ansi/keymap.c new file mode 100644 index 000000000000..d4d974464ae0 --- /dev/null +++ b/keyboards/prototypist/pt80/keymaps/default_ansi/keymap.c @@ -0,0 +1,47 @@ +// Copyright 2021 Josh (@Anjheos) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, + + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_tkl_ansi( + QK_BOOT, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_MUTE, _______, KC_MPLY, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO(2), KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + + [2] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, MO(3), _______, _______, _______ + ), + + [3] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/prototypist/pt80/keymaps/via/keymap.c b/keyboards/prototypist/pt80/keymaps/via/keymap.c new file mode 100644 index 000000000000..0529547ba712 --- /dev/null +++ b/keyboards/prototypist/pt80/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +// Copyright 2021 Josh (@Anjheos) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PSCR, KC_SCRL, KC_PAUS, + + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, + 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, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_all( + QK_BOOT, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, KC_MUTE, _______, KC_MPLY, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO(2), _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, MO(3), _______, _______, _______ + ), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/prototypist/pt80/keymaps/via/rules.mk b/keyboards/prototypist/pt80/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/prototypist/pt80/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/prototypist/pt80/readme.md b/keyboards/prototypist/pt80/readme.md new file mode 100644 index 000000000000..a102d9d6db30 --- /dev/null +++ b/keyboards/prototypist/pt80/readme.md @@ -0,0 +1,35 @@ +# prototypist/pt80 + +![prototypist/pt80](https://i.imgur.com/voa3ivJh.png) + +*Proto[Typist] Keyboards' first ever in-house universal TKL PCB designed by Josh (Anjheos). +Features various physical layouts available to fit multiple regional, F-row and bottom row layouts. +Default layout is in ISO.* + +* Keyboard Maintainer: [Josh @ Prototypist](https://github.com/Anjheos) +* Hardware Supported: **PT-80J PCB and PT-80C PCB** +* Hardware Availability: [Proto[Typist]](https://prototypist.net) + +Make example for this keyboard (after setting up your build environment): + + make prototypist/pt80:default + make prototypist/pt80:via + make prototypist/pt80:default_ansi + + +Flashing example for this keyboard: + + make prototypist/pt80:default:flash + make prototypist/pt80:via:flash + make prototypist/pt80:default_ansi: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 marked `RESET0`. +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available. \ No newline at end of file diff --git a/keyboards/prototypist/pt80/rules.mk b/keyboards/prototypist/pt80/rules.mk new file mode 100644 index 000000000000..6e7633bfe015 --- /dev/null +++ b/keyboards/prototypist/pt80/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/skme/zeno/config.h b/keyboards/skme/zeno/config.h index 11eea11605b3..6c8ce4c0eaf5 100644 --- a/keyboards/skme/zeno/config.h +++ b/keyboards/skme/zeno/config.h @@ -17,12 +17,6 @@ along with this program. If not, see . #pragma once - -/* Keyboard Matrix Assignments */ -#define MATRIX_ROW_PINS { B1, B2, B3, B7, C7 } -#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B0, C6, B6, B5, D5, D3, D2, D1, D0 } -/* COL2ROW, ROW2COL */ -#define DIODE_DIRECTION COL2ROW /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/skme/zeno/info.json b/keyboards/skme/zeno/info.json index 4129cd6869ab..c701f0b7959d 100644 --- a/keyboards/skme/zeno/info.json +++ b/keyboards/skme/zeno/info.json @@ -1,18 +1,98 @@ + { "keyboard_name": "Zeno", + "url": "https://sandkeys.me", + "maintainer": "paulgali", "manufacturer": "SKME", - "url": "https://baul.xyz", - "maintainer": "qmk", "usb": { "vid": "0x4048", "pid": "0x0001", - "device_version": "0.0.1" + "device_version": "0.0.4" }, "processor": "atmega32u4", "bootloader": "atmel-dfu", + "matrix_pins": { + "cols": ["F0", "F1", "F4", "F5", "F6", "F7", "B0", "C6", "B6", "B5", "D5", "D3", "D2", "D1", "D0"], + "rows": ["B1", "B2", "B3", "B7", "C7"] + }, + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "console": false, + "command": false, + "nkro": true + }, "layouts": { "LAYOUT_default": { - "layout": [{"x":0.25, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.25, "y":0}, {"x":6.25, "y":0}, {"x":9.25, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":0.25, "y":1, "w":1.5}, {"x":1.75, "y":1}, {"x":2.75, "y":1}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":8.75, "y":1}, {"x":9.75, "y":1}, {"x":10.75, "y":1}, {"x":11.75, "y":1}, {"x":12.75, "y":1}, {"x":13.75, "y":1}, {"x":14.75, "y":1}, {"x":15.75, "y":1, "w":1.5}, {"x":0.15, "y":2, "w":1.75}, {"x":1.9, "y":2}, {"x":2.9, "y":2}, {"x":3.9, "y":2}, {"x":4.9, "y":2}, {"x":5.9, "y":2}, {"x":9.05, "y":2}, {"x":10.05, "y":2}, {"x":11.05, "y":2}, {"x":12.05, "y":2}, {"x":13.05, "y":2}, {"x":14.05, "y":2}, {"x":15.05, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":8.55, "y":3}, {"x":9.55, "y":3}, {"x":10.55, "y":3}, {"x":11.55, "y":3}, {"x":12.55, "y":3}, {"x":13.55, "y":3}, {"x":14.55, "y":3, "w":1.75}, {"x":16.3, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":3.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":2.25}, {"x":8.55, "y":4, "w":2.75}, {"x":11.3, "y":4, "w":1.5}, {"x":15.8, "y":4, "w":1.5}] + "layout": [ + {"matrix":[0,0], "x":0.6, "y":0.25}, + {"matrix":[0,1], "x":1.6, "y":0.25}, + {"matrix":[0,2], "x":2.6, "y":0.235}, + {"matrix":[0,3], "x":0, "y":1.3001}, + {"matrix":[0,4], "x":1, "y":1.3001}, + {"matrix":[0,5], "x":2, "y":1.3001}, + {"matrix":[0,6], "x":3, "y":1.3001}, + {"matrix":[0,7], "x":-3.75, "y":3.3}, + {"matrix":[0,8], "x":-2.75, "y":3.3}, + {"matrix":[0,9], "x":-1.75, "y":3.3}, + {"matrix":[0,10], "x":-0.75, "y":3.3}, + {"matrix":[0,11], "x":12.75, "y":0.28}, + {"matrix":[0,12], "x":13.75, "y":0.3001}, + {"matrix":[0,13], "x":14.75, "y":0.3001}, + {"matrix":[1,14], "x":15.75, "y":0.3001}, + {"matrix":[1,0], "x":0.5, "y":1.25, "w":1.5}, + {"matrix":[1,1], "x":2, "y":1.25}, + {"matrix":[1,2], "x":-0.5, "y":2.3001}, + {"matrix":[1,3], "x":0.5, "y":2.3001}, + {"matrix":[1,4], "x":1.5, "y":2.3001}, + {"matrix":[1,5], "x":2.5, "y":2.3001}, + {"matrix":[1,6], "x":-4.25, "y":4.3}, + {"matrix":[1,7], "x":-3.25, "y":4.3}, + {"matrix":[1,8], "x":-2.25, "y":4.3}, + {"matrix":[1,9], "x":-1.25, "y":4.3}, + {"matrix":[1,10], "x":12.4, "y":1.28}, + {"matrix":[1,11], "x":13.4, "y":1.3}, + {"matrix":[1,12], "x":14.4, "y":1.3}, + {"matrix":[1,13], "x":15.4, "y":1.3, "w":1.5}, + {"matrix":[2,0], "x":0.4, "y":2.25, "w":1.75}, + {"matrix":[2,1], "x":2.15, "y":2.25}, + {"matrix":[2,2], "x":-0.25, "y":3.3001}, + {"matrix":[2,3], "x":0.75, "y":3.3001}, + {"matrix":[2,4], "x":1.75, "y":3.3001}, + {"matrix":[2,5], "x":2.75, "y":3.3001}, + {"matrix":[2,6], "x":-3.95, "y":5.3}, + {"matrix":[2,7], "x":-2.95, "y":5.3}, + {"matrix":[2,8], "x":-1.9501, "y":5.3}, + {"matrix":[2,9], "x":-0.9501, "y":5.3}, + {"matrix":[2,10], "x":12.8, "y":2.3001}, + {"matrix":[2,11], "x":13.8, "y":2.3001}, + {"matrix":[2,12], "x":14.8, "y":2.3001, "w":2.25}, + {"matrix":[3,0], "x":0.25, "y":3.25, "w":2.25}, + {"matrix":[3,1], "x":2.5, "y":3.25}, + {"matrix":[3,2], "x":0.25, "y":4.3}, + {"matrix":[3,3], "x":1.25, "y":4.3}, + {"matrix":[3,4], "x":2.25, "y":4.3}, + {"matrix":[3,5], "x":3.25, "y":4.3}, + {"matrix":[3,6], "x":-4.45, "y":6.3}, + {"matrix":[3,7], "x":-3.45, "y":6.3}, + {"matrix":[3,8], "x":-2.45, "y":6.3}, + {"matrix":[3,9], "x":-1.4501, "y":6.3}, + {"matrix":[3,10], "x":12.4, "y":3.3001}, + {"matrix":[3,11], "x":13.4, "y":3.3001}, + {"matrix":[3,12], "x":14.4, "y":3.3001, "w":1.75}, + {"matrix":[3,14], "x":16.15, "y":3.3001}, + {"matrix":[4,0], "x":0.25, "y":4.3, "w":1.25}, + {"matrix":[4,1], "x":1.5, "y":4.3, "w":1.25}, + {"matrix":[4,3], "x":0.5, "y":5.3}, + {"matrix":[4,5], "x":-7.8, "y":8.45, "w":2.75}, + {"matrix":[4,7], "x":-4.45, "y":7.3, "w":2}, + {"matrix":[4,8], "x":-2.45, "y":7.3}, + {"matrix":[4,9], "x":-1.4501, "y":7.3, "w":1.25}, + {"matrix":[4,12], "x":14.65, "y":4.3, "w":1.25}, + {"matrix":[4,14], "x":15.9, "y":4.3, "w":1.25} + ] } } } diff --git a/keyboards/skme/zeno/keymaps/default/keymap.c b/keyboards/skme/zeno/keymaps/default/keymap.c index f9c951b0478e..8fa42df724ad 100644 --- a/keyboards/skme/zeno/keymaps/default/keymap.c +++ b/keyboards/skme/zeno/keymaps/default/keymap.c @@ -17,19 +17,21 @@ along with this program. If not, see . #include QMK_KEYBOARD_H + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_default( 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_BSLS, KC_DEL, 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_BSPC, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(1,KC_SPC), KC_RALT, KC_RCTL + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(1,KC_SPC), KC_RALT, KC_RALT, MO(1), KC_RCTL ), [1] = LAYOUT_default( - QK_BOOT, 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_TRNS, KC_TRNS, - CL_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - CL_CTRL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_TRNS, QK_BOOT, + CL_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + CL_CTRL, KC_TRNS, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; diff --git a/keyboards/skme/zeno/keymaps/paulgali/keymap.c b/keyboards/skme/zeno/keymaps/paulgali/keymap.c new file mode 100644 index 000000000000..abd141b91209 --- /dev/null +++ b/keyboards/skme/zeno/keymaps/paulgali/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2020 Holten Campbell + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_default( + 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_BSLS, KC_DEL, + 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_BSPC, + 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(1,KC_SPC), KC_RALT, KC_RALT, MO(1), KC_RCTL + ), + [1] = LAYOUT_default( + 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_TRNS, QK_BOOT, + CL_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + CL_CTRL, KC_TRNS, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/skme/zeno/keymaps/via/keymap.c b/keyboards/skme/zeno/keymaps/via/keymap.c index 251057028523..3197c1aac0e1 100644 --- a/keyboards/skme/zeno/keymaps/via/keymap.c +++ b/keyboards/skme/zeno/keymaps/via/keymap.c @@ -23,27 +23,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSPC, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(1,KC_SPC), KC_RALT, KC_RCTL + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(1,KC_SPC), KC_RALT, KC_RALT, MO(1), KC_RCTL ), [1] = LAYOUT_default( - QK_BOOT, 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_TRNS, KC_TRNS, - CL_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - CL_CTRL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_TRNS, QK_BOOT, + CL_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + CL_CTRL, KC_TRNS, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [2] = LAYOUT_default( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [3] = LAYOUT_default( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; diff --git a/keyboards/skme/zeno/readme.md b/keyboards/skme/zeno/readme.md index 0e71533a896f..2e0719561997 100644 --- a/keyboards/skme/zeno/readme.md +++ b/keyboards/skme/zeno/readme.md @@ -11,7 +11,7 @@ The PCB features: --- * Keyboard Maintainer: [paulgali](https://github.com/paulgali) -* Hardware Supported: ZenoPCB for the Zeno Ergo 60% +* Hardware Supported: ZenoPCB for the Zeno Ergo 60%, atmega32u4 * Hardware Availability: https://sandkeys.me Make example for this keyboard (after setting up your build environment): @@ -28,4 +28,4 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to ## Bootloader Enter the bootloader in 3 ways: * **Bootmagic reset**: Hold down the key ESC key and plug in the keyboard (Top Left most switch) * **Physical reset button**: Briefly press the button on the back of the PCB -* **Keycode in layout**: Press the B key on layer 1 which is mapped to `QK_BOOT` +* **Keycode in layout**: Press the Top Right (delete/grv) key on layer 1 which is mapped to `QK_BOOT` diff --git a/keyboards/skme/zeno/rules.mk b/keyboards/skme/zeno/rules.mk index fa0aeb021f32..aa06a6088fc3 100644 --- a/keyboards/skme/zeno/rules.mk +++ b/keyboards/skme/zeno/rules.mk @@ -1,14 +1 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -LTO_ENABLE = yes - +# left blank intentionally, moved to info.json diff --git a/keyboards/skme/zeno/zeno.h b/keyboards/skme/zeno/zeno.h deleted file mode 100644 index 42795d407ebc..000000000000 --- a/keyboards/skme/zeno/zeno.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2019 Holten Campbell - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - - -#pragma once -#include "quantum.h" -#define K_NO KC_NO - -#define LAYOUT_default( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K114, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, \ - K400, K401, K403, K405, K407, K409, K414 \ -) \ -{ \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K_NO }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K_NO, K_NO }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K_NO, K314 }, \ - { K400, K401, K_NO, K403, K_NO, K405, K_NO, K407, K_NO, K409, K_NO, K_NO, K_NO, K_NO, K414 } \ -} - diff --git a/keyboards/sofle/keymaps/helltm/config.h b/keyboards/sofle/keymaps/helltm/config.h index 61ffb70fb8bb..a7950a4b1837 100644 --- a/keyboards/sofle/keymaps/helltm/config.h +++ b/keyboards/sofle/keymaps/helltm/config.h @@ -19,3 +19,4 @@ #define OLED_TIMEOUT 120000 #define OLED_BRIGHTNESS 120 +#define SPLIT_WPM_ENABLE diff --git a/keyboards/spleeb/config.h b/keyboards/spleeb/config.h new file mode 100644 index 000000000000..72a09e89c99a --- /dev/null +++ b/keyboards/spleeb/config.h @@ -0,0 +1,36 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Auto mouse layer makes use of the Cirque touchdown indicator which requires +// the touch sensor to be on the master side +#define MASTER_RIGHT + +// Sync later, led, and mod state for use on OLED on slave side +#define SPLIT_LAYER_STATE_ENABLE +#define SPLIT_LED_STATE_ENABLE +#define SPLIT_MODS_ENABLE +// Transport dpi and enc mode for display on oled +#define SPLIT_TRANSACTION_IDS_KB RPC_ID_KB_CONFIG_SYNC + +#ifdef POINTING_DEVICE_ENABLE +# define POINTING_DEVICE_AUTO_MOUSE_ENABLE +// Absolute mode allows for z/touchdown triggering of auto mouse layer with out +// moving finger +# define CIRQUE_PINNACLE_POSITION_MODE CIRQUE_PINNACLE_ABSOLUTE_MODE +# define POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE +#endif // POINTING_DEVICE_ENABLE + +#define I2C_DRIVER I2CD1 +#define I2C1_SDA_PIN GP16 +#define I2C1_SCL_PIN GP17 + +#ifdef OLED_ENABLE +# define OLED_DISPLAY_128X64 +# define OLED_FONT_H "./lib/glcdfont.c" +#endif // OLED_ENABLE + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U diff --git a/keyboards/spleeb/info.json b/keyboards/spleeb/info.json new file mode 100644 index 000000000000..0af488135df4 --- /dev/null +++ b/keyboards/spleeb/info.json @@ -0,0 +1,124 @@ +{ + "manufacturer": "Chris Hoage", + "keyboard_name": "spleeb", + "maintainer": "chrishoage", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "encoder": { + "enabled": true, + "rotary": [ + { + "pin_a": "GP4", + "pin_b": "GP21", + "resolution": 2 + } + ] + }, + "features": { + "nkro": true + }, + "matrix_pins": { + "cols": ["GP23", "GP20", "GP22", "GP26", "GP27", "GP28", "GP29"], + "rows": ["GP5", "GP6", "GP7", "GP8", "GP9"] + }, + "processor": "RP2040", + "board": "QMK_PM2040", + "secure": { + "idle_timeout": 60000, + "unlock_sequence": [ + [5, 0], + [5, 1] + ], + "unlock_timeout": 5000 + }, + "split": { + "enabled": true, + "soft_serial_pin": "GP1", + "encoder": { + "right": { + "rotary": [ + { + "pin_a": "GP21", + "pin_b": "GP4" + } + ] + } + } + }, + "url": "https://github.com/chrishoage/spleeb", + "usb": { + "device_version": "0.0.1", + "pid": "0x4242", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0.6 }, + { "matrix": [0, 1], "x": 1, "y": 0.6 }, + { "matrix": [0, 2], "x": 2, "y": 0.2 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0.2 }, + { "matrix": [0, 5], "x": 5, "y": 0.4 }, + { "matrix": [0, 6], "x": 6, "y": 0.9 }, + { "matrix": [5, 6], "x": 9.75, "y": 0.9 }, + { "matrix": [5, 5], "x": 10.75, "y": 0.4 }, + { "matrix": [5, 4], "x": 11.75, "y": 0.2 }, + { "matrix": [5, 3], "x": 12.75, "y": 0 }, + { "matrix": [5, 2], "x": 13.75, "y": 0.2 }, + { "matrix": [5, 1], "x": 14.75, "y": 0.6 }, + { "matrix": [5, 0], "x": 15.75, "y": 0.6 }, + { "matrix": [1, 0], "x": 0, "y": 1.6 }, + { "matrix": [1, 1], "x": 1, "y": 1.6 }, + { "matrix": [1, 2], "x": 2, "y": 1.2 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [1, 4], "x": 4, "y": 1.2 }, + { "matrix": [1, 5], "x": 5, "y": 1.4 }, + { "matrix": [1, 6], "x": 6, "y": 1.9 }, + { "matrix": [6, 6], "x": 9.75, "y": 1.9 }, + { "matrix": [6, 5], "x": 10.75, "y": 1.4 }, + { "matrix": [6, 4], "x": 11.75, "y": 1.2 }, + { "matrix": [6, 3], "x": 12.75, "y": 1 }, + { "matrix": [6, 2], "x": 13.75, "y": 1.2 }, + { "matrix": [6, 1], "x": 14.75, "y": 1.6 }, + { "matrix": [6, 0], "x": 15.75, "y": 1.6 }, + { "matrix": [2, 0], "x": 0, "y": 2.6 }, + { "matrix": [2, 1], "x": 1, "y": 2.6 }, + { "matrix": [2, 2], "x": 2, "y": 2.2 }, + { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [2, 4], "x": 4, "y": 2.2 }, + { "matrix": [2, 5], "x": 5, "y": 2.4 }, + { "matrix": [2, 6], "x": 6, "y": 2.9 }, + { "matrix": [7, 6], "x": 9.75, "y": 2.9 }, + { "matrix": [7, 5], "x": 10.75, "y": 2.4 }, + { "matrix": [7, 4], "x": 11.75, "y": 2.2 }, + { "matrix": [7, 3], "x": 12.75, "y": 2 }, + { "matrix": [7, 2], "x": 13.75, "y": 2.2 }, + { "matrix": [7, 1], "x": 14.75, "y": 2.6 }, + { "matrix": [7, 0], "x": 15.75, "y": 2.6 }, + { "matrix": [3, 1], "x": 1, "y": 3.6 }, + { "matrix": [3, 2], "x": 2, "y": 3.2 }, + { "matrix": [3, 3], "x": 3, "y": 3 }, + { "matrix": [3, 4], "x": 4, "y": 3.2 }, + { "matrix": [3, 5], "x": 5, "y": 3.4 }, + { "matrix": [3, 6], "x": 7.2, "y": 3.15 }, + { "matrix": [8, 6], "x": 8.6, "y": 3.15 }, + { "matrix": [8, 5], "x": 10.75, "y": 3.4 }, + { "matrix": [8, 4], "x": 11.75, "y": 3.2 }, + { "matrix": [8, 3], "x": 12.75, "y": 3 }, + { "matrix": [8, 2], "x": 13.75, "y": 3.2 }, + { "matrix": [8, 1], "x": 14.75, "y": 3.6 }, + { "matrix": [4, 2], "x": 3, "y": 4.45 }, + { "matrix": [4, 3], "x": 4, "y": 4.45 }, + { "matrix": [4, 4], "x": -0.15, "y": 4.65 }, + { "h": 1.25, "matrix": [4, 5], "x": 0.85, "y": 4.4 }, + { "h": 1.25, "matrix": [4, 6], "x": 1.85, "y": 4.4 }, + { "h": 1.25, "matrix": [9, 6], "x": -3.1, "y": 4.6 }, + { "h": 1.25, "matrix": [9, 5], "x": -2.1, "y": 4.6 }, + { "matrix": [9, 4], "x": -1.1, "y": 4.85 }, + { "matrix": [9, 3], "x": 11.75, "y": 4.45 }, + { "matrix": [9, 2], "x": 12.75, "y": 4.45 } + ] + } + } +} diff --git a/keyboards/spleeb/keymaps/chrishoage/config.h b/keyboards/spleeb/keymaps/chrishoage/config.h new file mode 100644 index 000000000000..0ac75d3041e2 --- /dev/null +++ b/keyboards/spleeb/keymaps/chrishoage/config.h @@ -0,0 +1,15 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define AUTO_MOUSE_TIME 250 + +#define CIRQUE_PINNACLE_DIAMETER_MM 35 +#define POINTING_DEVICE_ROTATION_180 + +#define SPLEEB_DRAGSCROLL_REVERSE_X +#define SPLEEB_ENCODER_MODE_MAP_ENABLE + +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 6 diff --git a/keyboards/spleeb/keymaps/chrishoage/keymap.c b/keyboards/spleeb/keymaps/chrishoage/keymap.c new file mode 100644 index 000000000000..2650c1aebf0a --- /dev/null +++ b/keyboards/spleeb/keymaps/chrishoage/keymap.c @@ -0,0 +1,127 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// Double tap TD(0) to enter bootloader +static void enter_qk_boot(qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 2) { + reset_keyboard(); + reset_tap_dance(state); + } +} + +enum SpleebLayer { _BASE = 0, _FN, _MOUSE }; + +qk_tap_dance_action_t tap_dance_actions[] = {[0] = ACTION_TAP_DANCE_FN(enter_qk_boot)}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RSFT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, ENC_STR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_LALT, KC_LGUI, KC_ENT, MO(1), MO(1), KC_SPC, KC_RGUI, KC_RALT, KC_RCTL + ), + + [_FN] = LAYOUT( + KC_PAUS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_ESC, KC_DEL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, QK_RBT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ENC_STL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TD(0), + KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_ENT, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_MOUSE] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + DRGSCRL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, SNIPING, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; +// clang-format on + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (get_mods() & MOD_MASK_GUI) { + // When GUI is held trigger [ ] to move workspaces + tap_code(clockwise ? KC_RBRC : KC_LBRC); + return false; + } + + if (get_mods() & MOD_MASK_CTRL) { + // When CTRL is hled trigger page up/down to move tabs (Firefox, VSCode) + tap_code(clockwise ? KC_PGDN : KC_PGUP); + return false; + } + + if (get_mods() & MOD_MASK_ALT) { + // When ALT is held trigger up/down to move line up/down + tap_code(clockwise ? KC_DOWN : KC_UP); + return false; + } + + // Defer to encoder_update_kb to trigger spleeb_encoder_mode_trigger + return true; +} + +enum spleeb_enc_mode { + DEF_DPI, + SNP_DPI, + VOL, + SEL, +}; + +void spleeb_encoder_mode_trigger(uint8_t mode, bool clockwise) { + dprintf("spleeb_encoder_mode_trigger m: %u, c: %u\n", mode, clockwise); + switch (mode) { + case DEF_DPI: + spleeb_cycle_pointer_default_dpi(clockwise); + break; + case SNP_DPI: + spleeb_cycle_pointer_sniping_dpi(clockwise); + break; + case VOL: + tap_code(clockwise ? KC_VOLU : KC_VOLD); + break; + case SEL: { + bool is_shift = get_mods() & MOD_MASK_SHIFT; + uint16_t dir = clockwise ? KC_RIGHT : KC_LEFT; + if (is_shift) { + tap_code(dir); + } else { + tap_code16(LSFT(LCTL(dir))); + } + break; + } + + default: + break; + } +} + +const char *spleeb_encoder_mode_string(uint8_t mode) { + switch (mode) { + case DEF_DPI: + return "df dpi"; + case SNP_DPI: + return "sn dpi"; + case VOL: + return "volume"; + case SEL: + return "select"; + } + + return get_u8_str(mode, ' '); +} + +void pointing_device_init_user(void) { + set_auto_mouse_layer(_MOUSE); +} + +const spleeb_enc_mode_t spleeb_encoder_mode_map[NUM_ENCODERS][SPLEEB_ENCODER_MODE_COUNT] = { + [0] = {SPLEEB_ENC_MODE(VOL), SPLEEB_ENC_MODE(SEL)}, + [1] = {SPLEEB_ENC_MODE(DEF_DPI), SPLEEB_ENC_MODE(SNP_DPI), SPLEEB_ENC_MODE(SEL)}, +}; diff --git a/keyboards/spleeb/keymaps/chrishoage/rules.mk b/keyboards/spleeb/keymaps/chrishoage/rules.mk new file mode 100644 index 000000000000..117c55fd8b83 --- /dev/null +++ b/keyboards/spleeb/keymaps/chrishoage/rules.mk @@ -0,0 +1,11 @@ +TAP_DANCE_ENABLE = yes +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +ENCODER_ENABLE = yes + +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c + +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/spleeb/keymaps/default/keymap.c b/keyboards/spleeb/keymaps/default/keymap.c new file mode 100644 index 000000000000..dca49efd3446 --- /dev/null +++ b/keyboards/spleeb/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RSFT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_LALT, KC_LGUI, KC_ENT, MO(1), MO(1), KC_SPC, KC_RGUI, KC_RALT, KC_RCTL + ), + + [1] = LAYOUT( + KC_PAUS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_ESC, KC_DEL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PSCR, + KC_LCAP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_ENT, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; +// clang-format on diff --git a/keyboards/spleeb/lib/glcdfont.c b/keyboards/spleeb/lib/glcdfont.c new file mode 100644 index 000000000000..5a7fcdaee27a --- /dev/null +++ b/keyboards/spleeb/lib/glcdfont.c @@ -0,0 +1,233 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "progmem.h" + +// clang-format off +static const unsigned char PROGMEM font[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x20, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, + 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x04, 0xFA, 0xA1, + 0xFA, 0x04, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, + 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0xFC, 0x87, 0x95, + 0xB5, 0x87, 0xFC, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x81, + 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x9B, 0xAD, 0xAD, + 0xAD, 0xB3, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xDD, 0xBD, 0xB5, + 0xB5, 0xC9, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xE1, 0xEF, 0xEF, + 0x81, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x91, 0xB5, 0xB5, + 0xB5, 0x85, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x81, 0xB5, 0xB5, + 0xB5, 0x85, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x08, 0x74, 0x42, + 0x74, 0x08, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x18, 0x0C, 0x06, + 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x04, 0x08, 0x10, + 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, + 0x00, 0x00, 0xE7, 0xA5, 0xFF, 0x24, + 0x24, 0xFF, 0xA5, 0xE7, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +// clang-format on diff --git a/keyboards/spleeb/mcuconf.h b/keyboards/spleeb/mcuconf.h new file mode 100644 index 000000000000..30b20fdcbda2 --- /dev/null +++ b/keyboards/spleeb/mcuconf.h @@ -0,0 +1,9 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef RP_I2C_USE_I2C0 +#define RP_I2C_USE_I2C0 TRUE diff --git a/keyboards/spleeb/readme.md b/keyboards/spleeb/readme.md new file mode 100644 index 000000000000..0b42352e29df --- /dev/null +++ b/keyboards/spleeb/readme.md @@ -0,0 +1,109 @@ +# spleeb + +![spleeb](https://i.imgur.com/2rmZa6Mh.jpg) + +A 5x7 split keyboard that has support for rotary encoders, an oled and a Ciruqe touchpad + +* Keyboard Maintainer: [Chris Hoage](https://github.com/chrishoage) +* Hardware Supported: Spleeb PCB with a rp2040 MCU (Blok, Elite Pi, etc) +* Hardware Availability: [https://github.com/chrishoage/spleeb](https://github.com/chrishoage/spleeb) + +Make example for this keyboard (after setting up your build environment): + + make spleeb:default + +Flashing example for this keyboard: + + make spleeb: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). + +## Encoder Mode Map + +Spleeb firmware has support for an encoder mode map similar to the native encoder map in QMK. The difference is the encoder mode map allows one to change behavior or the encoders independently of the layers. In your keymap.c file you can include something the following: + +```c +enum spleeb_enc_mode { + DEF_DPI, + SNP_DPI, + VOL, + SEL, +}; + +void spleeb_encoder_mode_trigger(uint8_t mode, bool clockwise) { + dprintf("spleeb_encoder_mode_trigger m: %u, c: %u\n", mode, clockwise); + switch (mode) { + case DEF_DPI: + spleeb_cycle_pointer_default_dpi(clockwise); + break; + case SNP_DPI: + spleeb_cycle_pointer_sniping_dpi(clockwise); + break; + case VOL: + tap_code(clockwise ? KC_VOLU : KC_VOLD); + break; + case SEL: + bool is_shift = get_mods() & MOD_MASK_SHIFT; + uint16_t dir = clockwise ? KC_RIGHT : KC_LEFT; + if (is_shift) { + tap_code(dir); + } else { + tap_code16(LSFT(LCTL(dir))); + } + + default: + break; + } +} + +const char *spleeb_encoder_mode_string(uint8_t mode) { + switch (mode) { + case DEF_DPI: + return "df dpi"; + case SNP_DPI: + return "sn dpi"; + case VOL: + return "volume"; + case SEL: + return "select"; + } + + return get_u8_str(mode, ' '); +} + +void pointing_device_init_user(void) { + set_auto_mouse_layer(_MOUSE); +} + +const spleeb_enc_mode_t spleeb_encoder_mode_map[NUM_ENCODERS][SPLEEB_ENCODER_MODE_COUNT] = { + [0] = {SPLEEB_ENC_MODE(VOL), SPLEEB_ENC_MODE(SEL)}, + [1] = {SPLEEB_ENC_MODE(DEF_DPI), SPLEEB_ENC_MODE(SNP_DPI), SPLEEB_ENC_MODE(SEL)}, +}; +``` + +This will enable 4 encoder modes. On the left side there will be modes for volume control and text selection. On the right side there will be three modes to allow controlling the DPI of the Cirque trackpad and also text selection. + +## Custom Keycodes + +This firmware defines the following custom keycodes for use in keymap.c. Depending on your defines the pointing or encoder specific keymaps will not be included. + +```c +#define DF_MOD POINTER_DEFAULT_DPI_FORWARD +#define DF_RMOD POINTER_DEFAULT_DPI_REVERSE +#define SP_MOD POINTER_SNIPING_DPI_FORWARD +#define SP_RMOD POINTER_SNIPING_DPI_REVERSE +#define SNIPING SNIPING_MODE +#define SNP_TOG SNIPING_MODE_TOGGLE +#define DRGSCRL DRAGSCROLL_MODE +#define DRG_TOG DRAGSCROLL_MODE_TOGGLE +#define ENC_STL ENC_MODE_STEP_LEFT +#define ENC_STR ENC_MODE_STEP_RIGHT +``` + +## 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/spleeb/rules.mk b/keyboards/spleeb/rules.mk new file mode 100644 index 000000000000..161ec22b16e2 --- /dev/null +++ b/keyboards/spleeb/rules.mk @@ -0,0 +1 @@ +SERIAL_DRIVER = vendor diff --git a/keyboards/spleeb/spleeb.c b/keyboards/spleeb/spleeb.c new file mode 100644 index 000000000000..658f30df7552 --- /dev/null +++ b/keyboards/spleeb/spleeb.c @@ -0,0 +1,544 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "spleeb.h" +#include "transactions.h" + +#ifdef CONSOLE_ENABLE +# include "print.h" +#endif // CONSOLE_ENABLE + +#if defined(POINTING_DEVICE_ENABLE) || defined(SPLEEB_ENCODER_MODE_MAP_ENABLE) +typedef union { + uint16_t raw; + struct { + uint8_t pointer_default_dpi : 4; // 16 steps available. + uint8_t pointer_sniping_dpi : 2; // 4 steps available. + uint8_t enc_modes[NUM_ENCODERS]; + bool is_dragscroll_enabled : 1; + bool is_sniping_enabled : 1; + } __attribute__((packed)); +} spleeb_config_t; + +static spleeb_config_t g_spleeb_config = {0}; + +/** + * \brief Set the value of `config` from EEPROM. + * + * Note that `is_dragscroll_enabled` and `is_sniping_enabled` are purposefully + * ignored since we do not want to persist this state to memory. In practice, + * this state is always written to maximize write-performances. Therefore, we + * explicitly set them to `false` in this function. + */ +static void read_spleeb_config_from_eeprom(spleeb_config_t* config) { + config->raw = eeconfig_read_kb() & 0xffff; + config->is_dragscroll_enabled = false; + config->is_sniping_enabled = false; +} + +/** + * \brief Save the value of `config` to eeprom. + * + * Note that all values are written verbatim, including whether drag-scroll + * and/or sniper mode are enabled. `read_spleeb_config_from_eeprom(…)` + * resets these 2 values to `false` since it does not make sense to persist + * these across reboots of the board. + */ +static void write_spleeb_config_to_eeprom(spleeb_config_t* config) { + eeconfig_update_kb(config->raw); +} + +void eeconfig_init_kb(void) { + g_spleeb_config.raw = 0; + g_spleeb_config.pointer_default_dpi = 4; + +# ifdef SPLEEB_ENCODER_MODE_MAP_ENABLE + for (size_t i = 0; i < NUM_ENCODERS; i++) { + if (spleeb_encoder_mode_map[i][0].initalized) { + spleeb_enc_mode_t* first_enc_mode = &spleeb_encoder_mode_map[i][0]; + g_spleeb_config.enc_modes[i] = first_enc_mode->mode; + } + } +# endif // SPLEEB_ENCODER_MODE_MAP_ENABLE + + write_spleeb_config_to_eeprom(&g_spleeb_config); + eeconfig_init_user(); +} + +void matrix_init_kb(void) { + read_spleeb_config_from_eeprom(&g_spleeb_config); + matrix_init_user(); +} + +void spleeb_config_sync_handler(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + if (initiator2target_buffer_size == sizeof(g_spleeb_config)) { + memcpy(&g_spleeb_config, initiator2target_buffer, sizeof(g_spleeb_config)); + } +} + +void keyboard_post_init_kb(void) { + transaction_register_rpc(RPC_ID_KB_CONFIG_SYNC, spleeb_config_sync_handler); + keyboard_post_init_user(); +} + +void housekeeping_task_kb(void) { + if (is_keyboard_master()) { + // Keep track of the last state, so that we can tell if we need to propagate to slave. + static spleeb_config_t last_spleeb_config = {0}; + static uint32_t last_sync = 0; + bool needs_sync = false; + + // Check if the state values are different. + if (memcmp(&g_spleeb_config, &last_spleeb_config, sizeof(g_spleeb_config))) { + needs_sync = true; + memcpy(&last_spleeb_config, &g_spleeb_config, sizeof(g_spleeb_config)); + } + // Send to slave every 500ms regardless of state change. + if (timer_elapsed32(last_sync) > 500) { + needs_sync = true; + } + + // Perform the sync if requested. + if (needs_sync) { + if (transaction_rpc_send(RPC_ID_KB_CONFIG_SYNC, sizeof(g_spleeb_config), &g_spleeb_config)) { + last_sync = timer_read32(); + } + } + } + // No need to invoke the user-specific callback, as it's been called + // already. +} +#endif // defined(POINTING_DEVICE_ENABLE) || defined(SPLEEB_ENCODER_MODE_MAP_ENABLE) + +#ifdef SPLEEB_ENCODER_MODE_MAP_ENABLE + +/** + * \brief Handle the encoder mode action when triggered by encoder_update_kb + * + * Weakly defined fuction intended to be overridden in a users keymap + */ +__attribute__((weak)) void spleeb_encoder_mode_trigger(uint8_t mode, bool clockwise) {} + +typedef struct { + uint8_t index; + spleeb_enc_mode_t* enc_mode; +} spleeb_found_enc_mode_t; + +static spleeb_found_enc_mode_t spleeb_get_found_encoder_mode(spleeb_config_t* config, uint8_t index) { + spleeb_found_enc_mode_t found_enc_mode; + + for (size_t i = 0; i < SPLEEB_ENCODER_MODE_COUNT; i++) { + spleeb_enc_mode_t* cur_enc_mode = &spleeb_encoder_mode_map[index][i]; + if (cur_enc_mode->mode == config->enc_modes[index]) { + found_enc_mode.index = i; + found_enc_mode.enc_mode = cur_enc_mode; + break; + } + } + + return found_enc_mode; +} + +/** + * \brief Step through the defined encoder modes for the encoder at the given + * index + * + * Step though the modes defined in spleeb_encoder_mode_map at the users keymap. + * Use a null terminator at the first character on the name property for the + * enc_mode struct to determine if we've reached the end of the defined encoder + * modes. When this happens loop back to the beginning. + */ +static void spleeb_step_encoder_mode(spleeb_config_t* config, uint8_t index) { + spleeb_found_enc_mode_t cur_enc_mode = spleeb_get_found_encoder_mode(config, index); + spleeb_enc_mode_t* next_enc_mode = &spleeb_encoder_mode_map[index][(cur_enc_mode.index + 1) % SPLEEB_ENCODER_MODE_COUNT]; + + if (!next_enc_mode->initalized) { + next_enc_mode = &spleeb_encoder_mode_map[index][0]; + } + + if (next_enc_mode->initalized) { + config->enc_modes[index] = next_enc_mode->mode; + write_spleeb_config_to_eeprom(config); + } +} + +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { + return false; + } + + spleeb_encoder_mode_trigger(g_spleeb_config.enc_modes[index], clockwise); + + return true; +} +#endif // SPLEEB_ENCODER_MODE_MAP_ENABLE + +#ifdef POINTING_DEVICE_ENABLE + +/** \brief Return the current value of the pointer's default DPI. */ +static uint16_t get_pointer_default_dpi(spleeb_config_t* config) { + return (uint16_t)config->pointer_default_dpi * SPLEEB_DEFAULT_DPI_CONFIG_STEP + SPLEEB_MINIMUM_DEFAULT_DPI; +} + +/** \brief Return the current value of the pointer's sniper-mode DPI. */ +static uint16_t get_pointer_sniping_dpi(spleeb_config_t* config) { + return (uint16_t)config->pointer_sniping_dpi * SPLEEB_SNIPING_DPI_CONFIG_STEP + SPLEEB_MINIMUM_SNIPING_DPI; +} + +/** \brief Return the current value of the pointer's default DPI. */ +static uint16_t get_pointer_current_dpi(spleeb_config_t* config) { + if (config->is_sniping_enabled) { + return get_pointer_sniping_dpi(config); + } else { + return get_pointer_default_dpi(config); + } +} + +/** \brief Set the appropriate DPI for the input config. */ +static void maybe_update_pointing_device_cpi(spleeb_config_t* config) { + if (config->is_sniping_enabled) { + pointing_device_set_cpi(get_pointer_sniping_dpi(config)); + } else { + pointing_device_set_cpi(get_pointer_default_dpi(config)); + } +} + +/** + * \brief Update the pointer's default DPI to the next or previous step. + * + * Increases the DPI value if `forward` is `true`, decreases it otherwise. + * The increment/decrement steps are equal to SPLEEB_DEFAULT_DPI_CONFIG_STEP. + */ +static void step_pointer_default_dpi(spleeb_config_t* config, bool forward) { + config->pointer_default_dpi += forward ? 1 : -1; + maybe_update_pointing_device_cpi(config); +} + +/** + * \brief Update the pointer's sniper-mode DPI to the next or previous step. + * + * Increases the DPI value if `forward` is `true`, decreases it otherwise. + * The increment/decrement steps are equal to SPLEEB_SNIPING_DPI_CONFIG_STEP. + */ +static void step_pointer_sniping_dpi(spleeb_config_t* config, bool forward) { + config->pointer_sniping_dpi += forward ? 1 : -1; + maybe_update_pointing_device_cpi(config); +} + +uint16_t spleeb_get_pointer_default_dpi(void) { + return get_pointer_default_dpi(&g_spleeb_config); +} + +uint16_t spleeb_get_pointer_sniping_dpi(void) { + return get_pointer_sniping_dpi(&g_spleeb_config); +} + +void spleeb_cycle_pointer_default_dpi_noeeprom(bool forward) { + step_pointer_default_dpi(&g_spleeb_config, forward); +} + +void spleeb_cycle_pointer_default_dpi(bool forward) { + step_pointer_default_dpi(&g_spleeb_config, forward); + write_spleeb_config_to_eeprom(&g_spleeb_config); +} + +void spleeb_cycle_pointer_sniping_dpi_noeeprom(bool forward) { + step_pointer_sniping_dpi(&g_spleeb_config, forward); +} + +void spleeb_cycle_pointer_sniping_dpi(bool forward) { + step_pointer_sniping_dpi(&g_spleeb_config, forward); + write_spleeb_config_to_eeprom(&g_spleeb_config); +} + +bool spleeb_get_pointer_sniping_enabled(void) { + return g_spleeb_config.is_sniping_enabled; +} + +void spleeb_set_pointer_sniping_enabled(bool enable) { + g_spleeb_config.is_sniping_enabled = enable; + maybe_update_pointing_device_cpi(&g_spleeb_config); +} + +bool spleeb_get_pointer_dragscroll_enabled(void) { + return g_spleeb_config.is_dragscroll_enabled; +} + +void spleeb_set_pointer_dragscroll_enabled(bool enable) { + g_spleeb_config.is_dragscroll_enabled = enable; + cirque_pinnacle_enable_cursor_glide(enable); + maybe_update_pointing_device_cpi(&g_spleeb_config); +} +#endif // POINTING_DEVICE_ENABLE + +#ifdef POINTING_DEVICE_ENABLE +void pointing_device_init_kb(void) { + maybe_update_pointing_device_cpi(&g_spleeb_config); + + // only glide on drag scroll + cirque_pinnacle_enable_cursor_glide(false); + + set_auto_mouse_enable(true); + pointing_device_init_user(); +} + +/** + * \brief Augment the pointing device behavior. + * + * Drag-scroll implementation borrowed from https://github.com/qmk/qmk_firmware/pull/18218 + */ +static void pointing_device_task_spleeb(report_mouse_t* mouse_report) { + static int16_t scroll_x = 0; + static int16_t scroll_y = 0; + if (g_spleeb_config.is_dragscroll_enabled) { + scroll_x -= mouse_report->x; + scroll_y += mouse_report->y; + mouse_report->h = scroll_x / SPLEEB_DRAGSCROLL_DIVISOR; + mouse_report->v = scroll_y / SPLEEB_DRAGSCROLL_DIVISOR; + mouse_report->x = 0; + mouse_report->y = 0; + scroll_x -= (int16_t)mouse_report->h * SPLEEB_DRAGSCROLL_DIVISOR; + scroll_y -= (int16_t)mouse_report->v * SPLEEB_DRAGSCROLL_DIVISOR; + } +} + +report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { + if (is_keyboard_master()) { + pointing_device_task_spleeb(&mouse_report); + + mouse_report = pointing_device_task_user(mouse_report); + } + + return mouse_report; +} + +/** + * \brief Outputs the Spleeb configuration to console. + * + * Prints the in-memory configuration structure to console, for debugging. + * Includes: + * - raw value + * - drag-scroll: on/off + * - sniping: on/off + * - default DPI: internal table index/actual DPI + * - sniping DPI: internal table index/actual DPI + */ +static void debug_spleeb_config_to_console(spleeb_config_t* config) { +# ifdef CONSOLE_ENABLE + pd_dprintf("(spleeb) process_record_kb: config = {\n" + "\traw = 0x%u,\n" + "\t{\n" + "\t\tis_dragscroll_enabled=%u\n" + "\t\tis_sniping_enabled=%u\n" + "\t\tdefault_dpi=0x%X (%u)\n" + "\t\tsniping_dpi=0x%X (%u)\n" + "\t}\n" + "}\n", + config->raw, config->is_dragscroll_enabled, config->is_sniping_enabled, config->pointer_default_dpi, get_pointer_default_dpi(config), config->pointer_sniping_dpi, get_pointer_sniping_dpi(config)); +# endif // CONSOLE_ENABLE +} +#endif // POINTING_DEVICE_ENABLE + +bool process_record_kb(uint16_t keycode, keyrecord_t* record) { + if (!process_record_user(keycode, record)) { +#ifdef POINTING_DEVICE_ENABLE + + debug_spleeb_config_to_console(&g_spleeb_config); +#endif // POINTING_DEVICE_ENABLE + return false; + } +#ifdef POINTING_DEVICE_ENABLE + switch (keycode) { + case POINTER_DEFAULT_DPI_FORWARD: + if (record->event.pressed) { + spleeb_cycle_pointer_default_dpi(true); + } + break; + case POINTER_DEFAULT_DPI_REVERSE: + if (record->event.pressed) { + spleeb_cycle_pointer_default_dpi(false); + } + break; + case POINTER_SNIPING_DPI_FORWARD: + if (record->event.pressed) { + spleeb_cycle_pointer_sniping_dpi(true); + } + break; + case POINTER_SNIPING_DPI_REVERSE: + if (record->event.pressed) { + spleeb_cycle_pointer_sniping_dpi(false); + } + break; + case SNIPING_MODE: + spleeb_set_pointer_sniping_enabled(record->event.pressed); + break; + case SNIPING_MODE_TOGGLE: + if (record->event.pressed) { + spleeb_set_pointer_sniping_enabled(!spleeb_get_pointer_sniping_enabled()); + } + break; + case DRAGSCROLL_MODE: + spleeb_set_pointer_dragscroll_enabled(record->event.pressed); + break; + case DRAGSCROLL_MODE_TOGGLE: + if (record->event.pressed) { + spleeb_set_pointer_dragscroll_enabled(!spleeb_get_pointer_dragscroll_enabled()); + } + break; + } +#endif // POINTING_DEVICE_ENABLE + +#ifdef SPLEEB_ENCODER_MODE_MAP_ENABLE + switch (keycode) { + case ENC_MODE_STEP_LEFT: + if (record->event.pressed) { + spleeb_step_encoder_mode(&g_spleeb_config, 0); + } + break; + case ENC_MODE_STEP_RIGHT: + if (record->event.pressed) { + spleeb_step_encoder_mode(&g_spleeb_config, 1); + } + break; + } +#endif // SPLEEB_ENCODER_MODE_MAP_ENABLE + +#ifdef POINTING_DEVICE_ENABLE + if ((keycode >= POINTER_DEFAULT_DPI_FORWARD && keycode <= ENC_MODE_STEP_RIGHT) || IS_MOUSEKEY(keycode)) { + debug_spleeb_config_to_console(&g_spleeb_config); + } +#endif // POINTING_DEVICE_ENABLE + + return true; +} + +#ifdef POINTING_DEVICE_ENABLE + +bool is_mouse_record_kb(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case DRAGSCROLL_MODE: + case SNIPING_MODE: + return true; + default: + return false; + } + + return is_mouse_record_user(keycode, record); +} + +#endif // POINTING_DEVICE_ENABLE + +#ifdef OLED_ENABLE + +static void render_layer(void) { + oled_write_P(PSTR("LAYER: "), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_ln_P(PSTR("\xC0\xC1"), false); + break; + case 1: + oled_write_ln_P(PSTR("\xC2\xC3"), false); + break; + case 2: + oled_write_ln_P(PSTR("\xC4\xC5"), false); + break; + case 3: + oled_write_ln_P(PSTR("\xC6\xC7"), false); + break; + case 4: + oled_write_ln_P(PSTR("\xC8\xC9"), false); + break; + case 5: + oled_write_ln_P(PSTR("\xCA\xCB"), false); + break; + default: + oled_write_ln_P(get_u8_str(get_highest_layer(layer_state) + 0x30, ' '), true); + } + + oled_write_ln_P("", false); +} + +static void render_mods(void) { + uint8_t modifiers = get_mods(); + + oled_write_ln_P(PSTR("MODS:"), false); + oled_write_ln_P("", false); + oled_write_P(PSTR("\325\326"), (modifiers & MOD_MASK_SHIFT)); + oled_write_P(PSTR("\327\330"), (modifiers & MOD_MASK_CTRL)); + oled_write_P(PSTR("\331\332"), (modifiers & MOD_MASK_ALT)); + oled_write_ln_P(PSTR("\333\334"), (modifiers & MOD_MASK_GUI)); + oled_write_ln_P("", false); +} + +static void render_lock(void) { + led_t led_state = host_keyboard_led_state(); + + oled_write_P(PSTR("LOCK: "), false); + oled_write_P(PSTR("\235\236"), led_state.caps_lock); + oled_write_ln_P(PSTR("\275\276"), led_state.num_lock); +} + +static void render_pointer(void) { +# ifdef POINTING_DEVICE_ENABLE + oled_write_ln_P(PSTR("POINTER:"), false); + oled_write_ln_P("", false); + oled_write_P(PSTR("dpi:"), false); + oled_write_ln_P(get_u16_str(get_pointer_current_dpi(&g_spleeb_config), ' '), false); + oled_write_ln_P("", false); +# endif // POINTING_DEVICE_ENABLE +} + +# ifdef SPLEEB_ENCODER_MODE_MAP_ENABLE +static uint8_t spleeb_get_encoder_mode(spleeb_config_t* config, uint8_t index) { + spleeb_found_enc_mode_t found_enc_mode = spleeb_get_found_encoder_mode(config, index); + return found_enc_mode.enc_mode->mode; +} + +/** + * \brief Map an encoder mode to a string to be displayed on the OLED + * + * Weakly defined fuction intended to be overridden in a users keymap. My be + * omitted if no OLED is used. + */ +__attribute__((weak)) const char* spleeb_encoder_mode_string(uint8_t mode) { + return get_u8_str(mode, ' '); +} +# endif // SPLEEB_ENCODER_MODE_MAP_ENABLE + +static void render_encoder(void) { +# ifdef SPLEEB_ENCODER_MODE_MAP_ENABLE + oled_write_ln_P(PSTR("ENCODER:"), false); + oled_write_ln_P("", false); + oled_write_P(PSTR("R: "), false); + oled_write_ln_P(spleeb_encoder_mode_string(spleeb_get_encoder_mode(&g_spleeb_config, 1)), false); + oled_write_P(PSTR("L: "), false); + oled_write_ln_P(spleeb_encoder_mode_string(spleeb_get_encoder_mode(&g_spleeb_config, 0)), false); +# endif // SPLEEB_ENCODER_MODE_MAP_ENABLE +} + +static void render_status(void) { + render_layer(); + render_mods(); + render_lock(); + render_pointer(); + render_encoder(); +} + +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_90; +} + +bool oled_task_kb(void) { + if (is_keyboard_master()) { + return false; + } + + if (!oled_task_user()) { + return false; + } + + render_status(); + return false; +} +#endif // OLED_ENABLE diff --git a/keyboards/spleeb/spleeb.h b/keyboards/spleeb/spleeb.h new file mode 100644 index 000000000000..67d01cdf3557 --- /dev/null +++ b/keyboards/spleeb/spleeb.h @@ -0,0 +1,149 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "quantum.h" + +#if defined(SPLEEB_ENCODER_MODE_MAP_ENABLE) && !defined(ENCODER_ENABLE) +# error "Encoder must be enabled to use encoder mode map" +#endif + +#if defined(SPLEEB_ENCODER_MODE_MAP_ENABLE) && defined(ENCODER_MAP_ENABLE) +# error "Encoder mode map can not be used with encoder map" +#endif + +enum spleeb_keycodes { + POINTER_DEFAULT_DPI_FORWARD = QK_KB, + POINTER_DEFAULT_DPI_REVERSE, + POINTER_SNIPING_DPI_FORWARD, + POINTER_SNIPING_DPI_REVERSE, + SNIPING_MODE, + SNIPING_MODE_TOGGLE, + DRAGSCROLL_MODE, + DRAGSCROLL_MODE_TOGGLE, + ENC_MODE_STEP_LEFT, + ENC_MODE_STEP_RIGHT, +}; + +#define DF_MOD POINTER_DEFAULT_DPI_FORWARD +#define DF_RMOD POINTER_DEFAULT_DPI_REVERSE +#define SP_MOD POINTER_SNIPING_DPI_FORWARD +#define SP_RMOD POINTER_SNIPING_DPI_REVERSE +#define SNIPING SNIPING_MODE +#define SNP_TOG SNIPING_MODE_TOGGLE +#define DRGSCRL DRAGSCROLL_MODE +#define DRG_TOG DRAGSCROLL_MODE_TOGGLE +#define ENC_STL ENC_MODE_STEP_LEFT +#define ENC_STR ENC_MODE_STEP_RIGHT + +#ifdef POINTING_DEVICE_ENABLE +# ifndef SPLEEB_MINIMUM_DEFAULT_DPI +# define SPLEEB_MINIMUM_DEFAULT_DPI 300 +# endif // SPLEEB_MINIMUM_DEFAULT_DPI + +# ifndef SPLEEB_DEFAULT_DPI_CONFIG_STEP +# define SPLEEB_DEFAULT_DPI_CONFIG_STEP 100 +# endif // SPLEEB_DEFAULT_DPI_CONFIG_STEP + +# ifndef SPLEEB_MINIMUM_SNIPING_DPI +# define SPLEEB_MINIMUM_SNIPING_DPI 100 +# endif // SPLEEB_MINIMUM_SNIPING_DPI + +# ifndef SPLEEB_SNIPING_DPI_CONFIG_STEP +# define SPLEEB_SNIPING_DPI_CONFIG_STEP 100 +# endif // SPLEEB_SNIPING_DPI_CONFIG_STEP + +# ifndef SPLEEB_DRAGSCROLL_DIVISOR +# define SPLEEB_DRAGSCROLL_DIVISOR 64 +# endif // !SPLEEB_DRAGSCROLL_DIVISOR +#endif // POINTING_DEVICE_ENABLE + +#ifdef SPLEEB_ENCODER_MODE_MAP_ENABLE +# ifndef SPLEEB_ENCODER_MODE_COUNT +# define SPLEEB_ENCODER_MODE_COUNT 4 +# endif + +typedef struct { + uint8_t mode; + // Discriminate between array members which are (un)initialized + bool initalized; +} const spleeb_enc_mode_t; + +const spleeb_enc_mode_t spleeb_encoder_mode_map[NUM_ENCODERS][SPLEEB_ENCODER_MODE_COUNT]; + +// SPLEEB_ENC_MODE initializes the spleeb_enc_mode_t struct such that +// uninitialized mode_map members can be discriminated against when looking up +// mapped encoder modes. +# define SPLEEB_ENC_MODE(mode) \ + { mode, true } +#endif // SPLEEB_ENCODER_MODE_MAP_ENABLE + +#ifdef POINTING_DEVICE_ENABLE + +/** \brief Return the current DPI value for the pointer's default mode. */ +uint16_t spleeb_get_pointer_default_dpi(void); + +/** + * \brief Update the pointer's default DPI to the next or previous step. + * + * Increases the DPI value if `forward` is `true`, decreases it otherwise. + * The increment/decrement steps are equal to SPLEEB_DEFAULT_DPI_CONFIG_STEP. + * + * The new value is persisted in EEPROM. + */ +void spleeb_cycle_pointer_default_dpi(bool forward); + +/** + * \brief Same as `spleeb_cycle_pointer_default_dpi`, but do not write to + * EEPROM. + * + * This means that reseting the board will revert the value to the last + * persisted one. + */ +void spleeb_cycle_pointer_default_dpi_noeeprom(bool forward); + +/** \brief Return the current DPI value for the pointer's sniper-mode. */ +uint16_t spleeb_get_pointer_sniping_dpi(void); + +/** + * \brief Update the pointer's sniper-mode DPI to the next or previous step. + * + * Increases the DPI value if `forward` is `true`, decreases it otherwise. + * The increment/decrement steps are equal to SPLEEB_SNIPING_DPI_CONFIG_STEP. + * + * The new value is persisted in EEPROM. + */ +void spleeb_cycle_pointer_sniping_dpi(bool forward); + +/** + * \brief Same as `spleeb_cycle_pointer_sniping_dpi`, but do not write to + * EEPROM. + * + * This means that reseting the board will revert the value to the last + * persisted one. + */ +void spleeb_cycle_pointer_sniping_dpi_noeeprom(bool forward); + +/** \brief Whether sniper-mode is enabled. */ +bool spleeb_get_pointer_sniping_enabled(void); + +/** + * \brief Enable/disable sniper mode. + * + * When sniper mode is enabled the dpi is reduced to slow down the pointer for + * more accurate movements. + */ +void spleeb_set_pointer_sniping_enabled(bool enable); + +/** \brief Whether drag-scroll is enabled. */ +bool spleeb_get_pointer_dragscroll_enabled(void); + +/** + * \brief Enable/disable drag-scroll mode. + * + * When drag-scroll mode is enabled, horizontal and vertical pointer movements + * are translated into horizontal and vertical scroll movements. + */ +void spleeb_set_pointer_dragscroll_enabled(bool enable); +#endif // POINTING_DEVICE_ENABLE diff --git a/keyboards/teahouse/ayleen/config.h b/keyboards/teahouse/ayleen/config.h new file mode 100644 index 000000000000..e172b87ae278 --- /dev/null +++ b/keyboards/teahouse/ayleen/config.h @@ -0,0 +1,21 @@ +// Copyright 2022 Freather +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + + + +#define RGB_DI_PIN C7 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 2 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_LAYERS 2 + #define RGBLIGHT_LAYER_BLINK + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +#endif + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/teahouse/ayleen/info.json b/keyboards/teahouse/ayleen/info.json new file mode 100644 index 000000000000..03ce63beaf2b --- /dev/null +++ b/keyboards/teahouse/ayleen/info.json @@ -0,0 +1,135 @@ +{ + "keyboard_name": "Ayleen", + "manufacturer": "Teahouse" + "url": "https://keyspensory.store/products/fcfs-ayleen-tkl-by-teahouse-extra-parts?_pos=1&_sid=e33d5f339&_ss=r", + "maintainer": "Freather", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "diode_direction":"COL2ROW", + "features": { + "rgblight": true, + "bootmagic": false, + "command":false, + "console":false, + "extrakey": true, + "mousekey":true, + "nkro":true + }, + "matrix_pins":{ + "rows":["F0", "F1", "F4", "F5", "D4", "B0", "B1", "B2", "F7","D5", "D3"], + "cols":[ + "F6", + "D0", + "D1", + "D2", + "D6", + "D7", + "B4", + "B5", + "B6" + ] + }, + "usb":{ + "vid": "0x5448", + "pid": "0x4141", + "device_version": "0.0.1" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "matrix":[0,0],"x": 0, "y": 0 }, + { "label": "F1", "matrix":[0,1],"x": 1.25, "y": 0 }, + { "label": "F2", "matrix":[0,2],"x": 2.25, "y": 0 }, + { "label": "F3", "matrix":[0,3],"x": 3.25, "y": 0 }, + { "label": "F4", "matrix":[0,4],"x": 4.25, "y": 0 }, + { "label": "F5", "matrix":[0,5],"x": 5.5, "y": 0 }, + { "label": "F6", "matrix":[0,6],"x": 6.5, "y": 0 }, + { "label": "F7", "matrix":[0,7],"x": 7.5, "y": 0 }, + { "label": "F8", "matrix":[0,8],"x": 8.5, "y": 0 }, + { "label": "F9", "matrix":[5,8],"x": 9.5, "y": 0 }, + { "label": "F10", "matrix":[5,7],"x": 10.75, "y": 0 }, + { "label": "F11", "matrix":[5,6],"x": 11.75, "y": 0 }, + { "label": "F12", "matrix":[5,5],"x": 12.75, "y": 0 }, + { "label": "F13", "matrix":[5,4],"x": 13.75, "y": 0 }, + { "label": "Prtsc", "matrix":[5,3],"x": 15.25, "y": 0 }, + { "label": "Scrlk", "matrix":[5,2],"x": 16.25, "y": 0 }, + { "label": "Pause", "matrix":[5,1],"x": 17.25, "y": 0 }, + + { "label": "~", "matrix":[1,0],"x": 0, "y": 1.5 }, + { "label": "1", "matrix":[1,1],"x": 1, "y": 1.5 }, + { "label": "2", "matrix":[1,2],"x": 2, "y": 1.5 }, + { "label": "3", "matrix":[1,3],"x": 3, "y": 1.5 }, + { "label": "4", "matrix":[1,4],"x": 4, "y": 1.5 }, + { "label": "5", "matrix":[1,5],"x": 5, "y": 1.5 }, + { "label": "6", "matrix":[1,6],"x": 6, "y": 1.5 }, + { "label": "7", "matrix":[1,7],"x": 7, "y": 1.5 }, + { "label": "8", "matrix":[1,8],"x": 8, "y": 1.5 }, + { "label": "9", "matrix":[6,8],"x": 9, "y": 1.5 }, + { "label": "0", "matrix":[6,7],"x": 10, "y": 1.5 }, + { "label": "-", "matrix":[6,6],"x": 11, "y": 1.5 }, + { "label": "=", "matrix":[6,5],"x": 12, "y": 1.5 }, + { "label": "backspace", "matrix":[6,4],"x": 13, "y": 1.5, "w": 2 }, + { "label": "insert", "matrix":[6,3],"x": 15.25, "y": 1.5 }, + { "label": "home", "matrix":[6,2],"x": 16.25, "y": 1.5 }, + { "label": "pg up", "matrix":[6,1],"x": 17.25, "y": 1.5 }, + + { "label": "tab", "matrix":[2,0],"x": 0, "y": 2.5, "w": 1.5 }, + { "label": "q", "matrix":[2,1],"x": 1.5, "y": 2.5 }, + { "label": "w", "matrix":[2,2],"x": 2.5, "y": 2.5 }, + { "label": "e", "matrix":[2,3],"x": 3.5, "y": 2.5 }, + { "label": "r", "matrix":[2,4],"x": 4.5, "y": 2.5 }, + { "label": "t", "matrix":[2,5],"x": 5.5, "y": 2.5 }, + { "label": "y", "matrix":[2,6],"x": 6.5, "y": 2.5 }, + { "label": "u", "matrix":[2,7],"x": 7.5, "y": 2.5 }, + { "label": "i", "matrix":[2,8],"x": 8.5, "y": 2.5 }, + { "label": "o", "matrix":[7,8],"x": 9.5, "y": 2.5 }, + { "label": "p", "matrix":[7,7],"x": 10.5, "y": 2.5 }, + { "label": "{", "matrix":[7,6],"x": 11.5, "y": 2.5 }, + { "label": "}", "matrix":[7,5],"x": 12.5, "y": 2.5 }, + { "label": "|", "matrix":[7,4],"x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "delete", "matrix":[7,3],"x": 15.25, "y": 2.5 }, + { "label": "end", "matrix":[7,2],"x": 16.25, "y": 2.5 }, + { "label": "pg dn", "matrix":[7,1],"x": 17.25, "y": 2.5 }, + + { "label": "capslock", "matrix":[3,0],"x": 0, "y": 3.5, "w": 1.75 }, + { "label": "a", "matrix":[3,1],"x": 1.75, "y": 3.5 }, + { "label": "s", "matrix":[3,2],"x": 2.75, "y": 3.5 }, + { "label": "d", "matrix":[3,3],"x": 3.75, "y": 3.5 }, + { "label": "f", "matrix":[3,4],"x": 4.75, "y": 3.5 }, + { "label": "g", "matrix":[3,5],"x": 5.75, "y": 3.5 }, + { "label": "h", "matrix":[3,6],"x": 6.75, "y": 3.5 }, + { "label": "j", "matrix":[3,7],"x": 7.75, "y": 3.5 }, + { "label": "k", "matrix":[3,8],"x": 8.75, "y": 3.5 }, + { "label": "l", "matrix":[8,8],"x": 9.75, "y": 3.5 }, + { "label": ";", "matrix":[8,7],"x": 10.75, "y": 3.5 }, + { "label": "'", "matrix":[8,6],"x": 11.75, "y": 3.5 }, + { "label": "enter", "matrix":[8,5],"x": 12.75, "y": 3.5, "w": 2.25 }, + + { "label": "leftshift", "matrix":[4,0],"x": 0, "y": 4.5, "w": 2.25 }, + { "label": "z", "matrix":[4,1],"x": 3.25, "y": 4.5 }, + { "label": "x", "matrix":[4,2],"x": 4.25, "y": 4.5 }, + { "label": "c", "matrix":[4,3],"x": 5.25, "y": 4.5 }, + { "label": "v", "matrix":[4,4],"x": 6.25, "y": 4.5 }, + { "label": "b", "matrix":[4,5],"x": 7.25, "y": 4.5 }, + { "label": "n", "matrix":[4,6],"x": 8.25, "y": 4.5 }, + { "label": "m", "matrix":[4,7],"x": 9.25, "y": 4.5 }, + { "label": ",", "matrix":[4,8],"x": 10.25, "y": 0 }, + { "label": ".", "matrix":[9,8],"x": 11.25, "y": 4.5 }, + { "label": "/", "matrix":[9,7],"x": 12.25, "y": 4.5 }, + { "label": "rightshift", "matrix":[9,6],"x": 13.25, "y": 4.5, "w": 2.75 }, + { "label": "up", "matrix":[8,2],"x": 18.25, "y": 4.5 }, + + { "label": "lctrl", "matrix":[10,0],"x": 0, "y": 5.5, "w": 1.5 }, + { "label": "lwin", "matrix":[10,1],"x": 1.5, "y": 5.5 }, + { "label": "lalt", "matrix":[10,2],"x": 2.5, "y": 5.5, "w": 1.5 }, + { "label": "space", "matrix":[10,3],"x": 4, "y": 5.5, "w": 7 }, + { "label": "ralt", "matrix":[10,4],"x": 11, "y": 5.5, "w": 1.5 }, + { "label": "rwin", "matrix":[10,5],"x": 12.5, "y": 5.5, "w": 1 }, + { "label": "rctrl", "matrix":[10,8],"x": 13.5, "y": 5.5, "w":1.5}, + { "label": "left", "matrix":[9,3],"x": 15.25, "y": 5.5 }, + { "label": "down", "matrix":[9,2],"x": 16.25, "y": 5.5 }, + { "label": "right", "matrix":[9,1],"x": 17.25, "y": 5.5 } + ] + } + } +} diff --git a/keyboards/teahouse/ayleen/keymaps/default/keymap.c b/keyboards/teahouse/ayleen/keymaps/default/keymap.c new file mode 100644 index 000000000000..5a99e2955d7d --- /dev/null +++ b/keyboards/teahouse/ayleen/keymaps/default/keymap.c @@ -0,0 +1,16 @@ +// Copyright 2022 Freather +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PSCR, KC_SCRL, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; diff --git a/keyboards/teahouse/ayleen/keymaps/via/keymap.c b/keyboards/teahouse/ayleen/keymaps/via/keymap.c new file mode 100644 index 000000000000..36f864fafcc7 --- /dev/null +++ b/keyboards/teahouse/ayleen/keymaps/via/keymap.c @@ -0,0 +1,68 @@ +// Copyright 2022 Freather +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PSCR, KC_SCRL, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + KC_SPC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( + KC_SPC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + KC_SPC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS ( + {0,1,HSV_BLUE} +); +const rgblight_segment_t PROGMEM my_scrolllock_layer[] = RGBLIGHT_LAYER_SEGMENTS ( + {1,1,HSV_PURPLE} +); + +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + my_capslock_layer, + my_scrolllock_layer +); + +void keyboard_post_init_user(void){ + //enable th led my_rgb_layers + rgblight_sethsv_at(0,0,0,0); + rgblight_layers = my_rgb_layers; +} + + +bool led_update_user(led_t led_state) { + + rgblight_set_layer_state(0, led_state.caps_lock); + rgblight_sethsv_at(0,0,0,0); + return true; +} diff --git a/keyboards/teahouse/ayleen/keymaps/via/rules.mk b/keyboards/teahouse/ayleen/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/teahouse/ayleen/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/teahouse/ayleen/keymaps/via_blink/keymap.c b/keyboards/teahouse/ayleen/keymaps/via_blink/keymap.c new file mode 100644 index 000000000000..7b72ccbf6173 --- /dev/null +++ b/keyboards/teahouse/ayleen/keymaps/via_blink/keymap.c @@ -0,0 +1,73 @@ +// Copyright 2022 Freather +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PSCR, KC_SCRL, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + KC_SPC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( + KC_SPC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + KC_SPC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + + + + +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS ( + {0,1,HSV_WHITE} +); + +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + my_capslock_layer +); + +void keyboard_post_init_user(void){ + //enable th led my_rgb_layers + rgblight_layers = my_rgb_layers; +} + +void post_process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + default: + if (record->event.pressed) { + rgblight_blink_layer(0, 100); + } + } +} + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(0, led_state.caps_lock); + rgblight_sethsv_at(0,0,0,0); + return true; +} diff --git a/keyboards/teahouse/ayleen/keymaps/via_blink/rules.mk b/keyboards/teahouse/ayleen/keymaps/via_blink/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/teahouse/ayleen/keymaps/via_blink/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/teahouse/ayleen/readme.md b/keyboards/teahouse/ayleen/readme.md new file mode 100644 index 000000000000..9d5cafdb5e3a --- /dev/null +++ b/keyboards/teahouse/ayleen/readme.md @@ -0,0 +1,20 @@ +# Teahouse Ayleen + +![Teahouse Ayleen](https://i.imgur.com/rOotAjTh.png) + + +* Keyboard Maintainer: [Freather](https://github.com/CMMS-Freather) +* Hardware Supported: PCB, Atmega32u4 + +Make example for this keyboard (after setting up your build environment): + + make teahouse/ayleen:default + +Flashing example for this keyboard: + + make teahouse/ayleen:default:flash + + +For reset instruction, use the physical reset button on the back of the keyboard to enter bootloader mode + +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). diff --git a/keyboards/teahouse/ayleen/rules.mk b/keyboards/teahouse/ayleen/rules.mk new file mode 100644 index 000000000000..6e7633bfe015 --- /dev/null +++ b/keyboards/teahouse/ayleen/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/teleport/native/info.json b/keyboards/teleport/native/info.json index 9cd26aa6903c..16c0603e4383 100644 --- a/keyboards/teleport/native/info.json +++ b/keyboards/teleport/native/info.json @@ -15,7 +15,7 @@ "command": false, "console": false, "extrakey": true, - "mousekey": false, + "mousekey": true, "nkro": true }, "diode_direction": "ROW2COL", diff --git a/keyboards/teleport/native/rules.mk b/keyboards/teleport/native/rules.mk index cac6a5346fb8..f60d3a26fbeb 100644 --- a/keyboards/teleport/native/rules.mk +++ b/keyboards/teleport/native/rules.mk @@ -2,4 +2,8 @@ RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3733 RGB_MATRIX_CUSTOM_KB = yes -DEFAULT_FOLDER = teleport/native/iso \ No newline at end of file +DEFAULT_FOLDER = teleport/native/iso + +# Temporary workaround while waiting fixes of F411xC flash size definitions +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = legacy \ No newline at end of file diff --git a/keyboards/trashman/ketch/ketch.h b/keyboards/trashman/ketch/ketch.h index 9a20ecf1f1ff..25be7cf8f9d9 100644 --- a/keyboards/trashman/ketch/ketch.h +++ b/keyboards/trashman/ketch/ketch.h @@ -1,4 +1,4 @@ -/* +/* Copyright 2021 Evan Sailer, Jetpacktuxedo, & QMK Firmware Permission is hereby granted, free of charge, to any person obtaining a copy @@ -32,7 +32,7 @@ SOFTWARE. { K0, K1, K2, K3, K4, K5, K6, K7 },\ { K8, K9, K10, K11, K12, K13, K14, K15 },\ { K16, K17, K18, K19, K20, K21, K22, K23 },\ - { K24, KC_NO, K26, K27, K28, K29, KC_NO, K31 },\ + { KC_NO, K24, K26, K27, K28, K29, KC_NO, K31 },\ { K32, K33, K34, K35, K36, K37, K38, KC_NO },\ { K39, K40, K41, K42, K43, K44, K45, KC_NO }\ } diff --git a/keyboards/tzarc/djinn/keymaps/via/config.h b/keyboards/tzarc/djinn/keymaps/via/config.h new file mode 100644 index 000000000000..b40936ff9343 --- /dev/null +++ b/keyboards/tzarc/djinn/keymaps/via/config.h @@ -0,0 +1,63 @@ +// Copyright 2018-2022 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +// Uncomment the following if your board uses 1.5A and 3.0A hold current fuses. +//#define DJINN_SUPPORTS_3A_FUSE + +// Encoder settings +#define ENCODER_RESOLUTION 2 + +// LCD blanking period +#define LCD_ACTIVITY_TIMEOUT 30000 + +// RGB settings +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS + +// Allow for an extra sync command over the split +#define SPLIT_TRANSACTION_IDS_USER THEME_DATA_SYNC + +// RGB Effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH \ No newline at end of file diff --git a/keyboards/tzarc/djinn/keymaps/via/keymap.c b/keyboards/tzarc/djinn/keymaps/via/keymap.c new file mode 100644 index 000000000000..65b494cf3200 --- /dev/null +++ b/keyboards/tzarc/djinn/keymaps/via/keymap.c @@ -0,0 +1,107 @@ +// Copyright 2018-2022 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H +#include "theme_djinn_default.h" + +// Layer definitions +enum { _QWERTY, _LOWER, _RAISE, _ADJUST }; + +//---------------------------------------------------------- +// Key map + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_DEL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LGUI, MO(_LOWER),KC_SPC, KC_NO, KC_NO, KC_SPC, MO(_RAISE),KC_LALT, + RGB_RMOD, RGB_MOD, + KC_UP, KC_UP, + KC_LEFT, _______, KC_RIGHT, KC_LEFT, _______, KC_RIGHT, + KC_DOWN, KC_DOWN + ), + [_LOWER] = LAYOUT_all( + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + BL_DOWN, BL_UP, + _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______ + ), + [_RAISE] = LAYOUT_all( + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______,_______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______,KC_LEFT, KC_DOWN, KC_RIGHT,_______, KC_UNDS, KC_NO, KC_NO, KC_EQL, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MINS, KC_NO, KC_NO, KC_PLUS, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______ + ), + [_ADJUST] = LAYOUT_all( + _______, KC_CAPS, KC_NUM, KC_SCRL, _______, _______, _______, _______, _______, _______, _______, DB_TOGG, EE_CLR, QK_BOOT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______ + ) +}; +// clang-format on + +//---------------------------------------------------------- +// Encoder map + +// clang-format off +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_QWERTY] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_LOWER] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, + [_RAISE] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) }, + [_ADJUST] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) }, +}; +// clang-format on + +//---------------------------------------------------------- +// Layer naming + +const char *current_layer_name(void) { + switch (get_highest_layer(layer_state)) { + case _QWERTY: + return "qwerty"; + case _LOWER: + return "lower"; + case _RAISE: + return "raise"; + case _ADJUST: + return "adjust"; + } + return "unknown"; +} + +//---------------------------------------------------------- +// Overrides + +void keyboard_post_init_user(void) { + // Initialise the theme + theme_init(); + + void keyboard_post_init_display(void); + keyboard_post_init_display(); +} + +void housekeeping_task_user(void) { + // Update kb_state so we can send to slave + theme_state_update(); + + // Data sync from master to slave + theme_state_sync(); +} diff --git a/keyboards/tzarc/djinn/keymaps/via/rules.mk b/keyboards/tzarc/djinn/keymaps/via/rules.mk new file mode 100644 index 000000000000..2b0bca2a80b7 --- /dev/null +++ b/keyboards/tzarc/djinn/keymaps/via/rules.mk @@ -0,0 +1,17 @@ +DEBUG_MATRIX_SCAN_RATE_ENABLE ?= api +ENCODER_MAP_ENABLE = yes +SWAP_HANDS_ENABLE = no + +VPATH += keyboards/tzarc/djinn/graphics +SRC += \ + theme_djinn_default.c \ + djinn.qgf.c \ + lock-caps-ON.qgf.c \ + lock-scrl-ON.qgf.c \ + lock-num-ON.qgf.c \ + lock-caps-OFF.qgf.c \ + lock-scrl-OFF.qgf.c \ + lock-num-OFF.qgf.c \ + thintel15.qff.c + +VIA_ENABLE = yes diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 152e6ce7b6d0..b7ee055eef44 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -71,6 +71,16 @@ def _validate(keyboard, info_data): if len(layouts) == 0 or all(not layout.get('json_layout', False) for layout in layouts.values()): _log_error(info_data, 'No LAYOUTs defined! Need at least one layout defined in info.json.') + # Warn if physical positions are offset (at least one key should be at x=0, and at least one key at y=0) + for layout_name, layout_data in layouts.items(): + offset_x = min([k['x'] for k in layout_data['layout']]) + if offset_x > 0: + _log_warning(info_data, f'Layout "{layout_name}" is offset on X axis by {offset_x}') + + offset_y = min([k['y'] for k in layout_data['layout']]) + if offset_y > 0: + _log_warning(info_data, f'Layout "{layout_name}" is offset on Y axis by {offset_y}') + # Providing only LAYOUT_all "because I define my layouts in a 3rd party tool" if len(layouts) == 1 and 'LAYOUT_all' in layouts: _log_warning(info_data, '"LAYOUT_all" should be "LAYOUT" unless additional layouts are provided.') diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 7b863af3b52a..6fcebc3242f9 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -61,7 +61,7 @@ action_t action_for_keycode(uint16_t keycode) { case KC_SYSTEM_POWER ... KC_SYSTEM_WAKE: action.code = ACTION_USAGE_SYSTEM(KEYCODE2SYSTEM(keycode)); break; - case KC_AUDIO_MUTE ... KC_ASSISTANT: + case KC_AUDIO_MUTE ... KC_LAUNCHPAD: action.code = ACTION_USAGE_CONSUMER(KEYCODE2CONSUMER(keycode)); break; #endif