diff --git a/.github/workflows/auto_tag.yml b/.github/workflows/auto_tag.yml index 07490a046456..c3dc7f7d4551 100644 --- a/.github/workflows/auto_tag.yml +++ b/.github/workflows/auto_tag.yml @@ -31,7 +31,7 @@ jobs: fetch-depth: 0 - name: Bump version and push tag - uses: anothrNick/github-tag-action@1.61.0 + uses: anothrNick/github-tag-action@1.62.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DEFAULT_BUMP: 'patch' diff --git a/.github/workflows/ci_builds.yml b/.github/workflows/ci_builds.yml index ce2d0b509e7b..372dcb8dd7c5 100644 --- a/.github/workflows/ci_builds.yml +++ b/.github/workflows/ci_builds.yml @@ -4,22 +4,27 @@ permissions: contents: read on: + push: + branches: [master, develop] workflow_dispatch: - schedule: - - cron: '0 0,12 * * *' + inputs: + branch: + type: choice + description: 'Branch to build' + options: [master, develop] + +concurrency: ci_build-${{ github.event.inputs.branch || github.ref_name }} jobs: ci_builds: + if: github.repository == 'qmk/qmk_firmware' name: "CI Build" runs-on: self-hosted timeout-minutes: 1380 - if: github.repository == 'qmk/qmk_firmware' - strategy: fail-fast: false matrix: - branch: [master, develop] keymap: [default, via] container: qmkfm/qmk_cli @@ -31,7 +36,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - ref: ${{ matrix.branch }} + ref: ${{ github.event.inputs.branch || github.ref }} - name: Install dependencies run: pip3 install -r requirements.txt @@ -51,10 +56,19 @@ jobs: uses: actions/upload-artifact@v3 if: always() with: - name: artifacts-${{ matrix.branch }}-${{ matrix.keymap }} + name: artifacts-${{ github.event.inputs.branch || github.ref_name }}-${{ matrix.keymap }} if-no-files-found: ignore path: | *.bin *.hex *.uf2 .build/failed.* + + - name: 'CI Discord Notification' + if: always() + working-directory: util/ci/ + env: + DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }} + run: | + python3 -m pip install -r requirements.txt + python3 ./discord-results.py --branch ${{ github.event.inputs.branch || github.ref_name }} --keymap ${{ matrix.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/format_push.yml b/.github/workflows/format_push.yml index 26e9f4edfb02..0a34245ac0dd 100644 --- a/.github/workflows/format_push.yml +++ b/.github/workflows/format_push.yml @@ -47,7 +47,7 @@ jobs: git config user.email 'hello@qmk.fm' - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v5 if: ${{ github.repository == 'qmk/qmk_firmware'}} with: token: ${{ secrets.QMK_BOT_TOKEN }} diff --git a/.github/workflows/regen_push.yml b/.github/workflows/regen_push.yml index c56bc48a690c..2d77f6fdf2da 100644 --- a/.github/workflows/regen_push.yml +++ b/.github/workflows/regen_push.yml @@ -34,7 +34,7 @@ jobs: git config user.email 'hello@qmk.fm' - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v5 if: ${{ github.repository == 'qmk/qmk_firmware'}} with: token: ${{ secrets.QMK_BOT_TOKEN }} diff --git a/.gitignore b/.gitignore index e36b9ae1307d..5fdf770d31cb 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,9 @@ quantum/version.h *.qmk *.uf2 +# DD config at wrong location +/keyboards/**/keymaps/*/info.json + # Old-style QMK Makefiles /keyboards/**/Makefile diff --git a/docs/feature_converters.md b/docs/feature_converters.md index 9baac14e973e..ec1f3915ee6a 100644 --- a/docs/feature_converters.md +++ b/docs/feature_converters.md @@ -17,7 +17,6 @@ Currently the following converters are available: | `promicro` | `bit_c_pro` | | `promicro` | `stemcell` | | `promicro` | `bonsai_c4` | -| `promicro` | `elite_pi` | | `promicro` | `rp2040_ce` | | `promicro` | `elite_pi` | | `promicro` | `helios` | diff --git a/keyboards/40percentclub/gherkin/kb2040/readme.md b/keyboards/40percentclub/gherkin/kb2040/readme.md new file mode 100644 index 000000000000..1fc9e8b18e19 --- /dev/null +++ b/keyboards/40percentclub/gherkin/kb2040/readme.md @@ -0,0 +1,22 @@ +# Gherkin + +![Gherkin](https://i.imgur.com/XrqqtTq.jpg) +![KB2040](https://cdn-shop.adafruit.com/640x480/5302-12.jpg) + +=== + +A 30 key keyboard with Adafruit's KB2040 as microcontroller. + +* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gherkin) + +Keyboard Maintainer: QMK Community +Hardware Supported: Gherkin PCB & Adafruit KB2040 +Hardware Availability: [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html) and [Adafruit KB2040](https://www.adafruit.com/product/5302) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/gherkin/kb2040: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). + +Use the KB2040 microcontroller as a drop-in replacement for the Pro Micro in this cute 30% keyboard. diff --git a/keyboards/40percentclub/gherkin/kb2040/rules.mk b/keyboards/40percentclub/gherkin/kb2040/rules.mk new file mode 100644 index 000000000000..982c58170255 --- /dev/null +++ b/keyboards/40percentclub/gherkin/kb2040/rules.mk @@ -0,0 +1 @@ +CONVERT_TO = kb2040 diff --git a/keyboards/40percentclub/gherkin/readme.md b/keyboards/40percentclub/gherkin/readme.md index a6680d72057c..7404f198193a 100644 --- a/keyboards/40percentclub/gherkin/readme.md +++ b/keyboards/40percentclub/gherkin/readme.md @@ -1,6 +1,6 @@ # Gherkin -![Gherkin](https://4.bp.blogspot.com/-sQ18-lNZXOc/WCzlTde-4PI/AAAAAAAB_JQ/qQrehAMG6DMKf3i4oj4mkmLGOfTUvb3KgCLcB/s640/IMG_20161116_122926.jpg) +![Gherkin](https://i.imgur.com/XrqqtTq.jpg) === A 30 key keyboard. diff --git a/keyboards/4pplet/aekiso60/info.json b/keyboards/4pplet/aekiso60/info.json new file mode 100644 index 000000000000..c402031c992f --- /dev/null +++ b/keyboards/4pplet/aekiso60/info.json @@ -0,0 +1,155 @@ +{ + "manufacturer": "4pplet", + "url": "", + "maintainer": "4pplet", + "usb": { + "vid": "0x4444" + }, + "community_layouts": [ + "60_iso_tsangan" + ], + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0, "w": 1.25}, + {"label": "1", "matrix": [0, 1], "x": 1.25, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2.25, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3.25, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4.25, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5.25, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6.25, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7.25, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8.25, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9.25, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10.25, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11.25, "y": 0}, + {"label": "=", "matrix": [0, 12], "x": 12.25, "y": 0}, + {"label": "Backspace", "matrix": [0, 13], "x": 13.25, "y": 0, "w": 1.75}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.75}, + {"label": "Q", "matrix": [1, 1], "x": 1.75, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.75, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.75, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.75, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.75, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.75, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.75, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.75, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.75, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.75, "y": 1}, + {"label": "[", "matrix": [1, 11], "x": 11.75, "y": 1}, + {"label": "]", "matrix": [1, 12], "x": 12.75, "y": 1}, + + {"label": "Ctrl", "matrix": [2, 0], "x": 0, "y": 2, "w": 2}, + {"label": "A", "matrix": [2, 1], "x": 2, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 3, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 4, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 5, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 6, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 7, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 8, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 9, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 10, "y": 2}, + {"label": ";", "matrix": [2, 10], "x": 11, "y": 2}, + {"label": "'", "matrix": [2, 11], "x": 12, "y": 2}, + {"label": "#", "matrix": [2, 12], "x": 13, "y": 2}, + {"label": "Enter", "matrix": [1, 13], "x": 14, "y": 1, "h": 2}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.5}, + {"label": "\\", "matrix": [3, 1], "x": 1.5, "y": 3}, + {"label": "Z", "matrix": [3, 2], "x": 2.5, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.5, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.5, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.5, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.5, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.5, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.5, "y": 3}, + {"label": ",", "matrix": [3, 9], "x": 9.5, "y": 3}, + {"label": ".", "matrix": [3, 10], "x": 10.5, "y": 3}, + {"label": "/", "matrix": [3, 11], "x": 11.5, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.5, "y": 3, "w": 1.5}, + {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3}, + + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "GUI", "matrix": [4, 1], "x": 1.5, "y": 4, "w": 1.25}, + {"label": "Alt", "matrix": [4, 3], "x": 2.75, "y": 4, "w": 1.5}, + {"label": "\u25bd", "matrix": [4, 4], "x": 4.25, "y": 4, "w": 2.75}, + {"label": "Space", "matrix": [4, 5], "x": 7, "y": 4}, + {"label": "\u25bd", "matrix": [4, 6], "x": 8, "y": 4, "w": 2.75}, + {"label": "Alt", "matrix": [4, 8], "x": 10.75, "y": 4, "w": 1.5}, + {"label": "GUI", "matrix": [4, 10], "x": 12.25, "y": 4, "w": 1.25}, + {"label": "Ctrl", "matrix": [4, 11], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + + "LAYOUT_60_iso_tsangan": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0, "w": 1.25}, + {"label": "1", "matrix": [0, 1], "x": 1.25, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2.25, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3.25, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4.25, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5.25, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6.25, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7.25, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8.25, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9.25, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10.25, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11.25, "y": 0}, + {"label": "=", "matrix": [0, 12], "x": 12.25, "y": 0}, + {"label": "Backspace", "matrix": [0, 13], "x": 13.25, "y": 0, "w": 1.75}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.75}, + {"label": "Q", "matrix": [1, 1], "x": 1.75, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.75, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.75, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.75, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.75, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.75, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.75, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.75, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.75, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.75, "y": 1}, + {"label": "[", "matrix": [1, 11], "x": 11.75, "y": 1}, + {"label": "]", "matrix": [1, 12], "x": 12.75, "y": 1}, + + {"label": "Ctrl", "matrix": [2, 0], "x": 0, "y": 2, "w": 2}, + {"label": "A", "matrix": [2, 1], "x": 2, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 3, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 4, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 5, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 6, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 7, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 8, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 9, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 10, "y": 2}, + {"label": ";", "matrix": [2, 10], "x": 11, "y": 2}, + {"label": "'", "matrix": [2, 11], "x": 12, "y": 2}, + {"label": "#", "matrix": [2, 12], "x": 13, "y": 2}, + {"label": "Enter", "matrix": [1, 13], "x": 14, "y": 1, "h": 2}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.5}, + {"label": "\\", "matrix": [3, 1], "x": 1.5, "y": 3}, + {"label": "Z", "matrix": [3, 2], "x": 2.5, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.5, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.5, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.5, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.5, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.5, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.5, "y": 3}, + {"label": ",", "matrix": [3, 9], "x": 9.5, "y": 3}, + {"label": ".", "matrix": [3, 10], "x": 10.5, "y": 3}, + {"label": "/", "matrix": [3, 11], "x": 11.5, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.5, "y": 3, "w": 2.5}, + + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "GUI", "matrix": [4, 1], "x": 1.5, "y": 4, "w": 1.25}, + {"label": "Alt", "matrix": [4, 3], "x": 2.75, "y": 4, "w": 1.5}, + {"label": "Space", "matrix": [4, 5], "x": 4.25, "y": 4, "w": 6.5}, + {"label": "Alt", "matrix": [4, 8], "x": 10.75, "y": 4, "w": 1.5}, + {"label": "GUI", "matrix": [4, 10], "x": 12.25, "y": 4, "w": 1.25}, + {"label": "Ctrl", "matrix": [4, 11], "x": 13.5, "y": 4, "w": 1.5} + ] + } + } +} diff --git a/keyboards/4pplet/aekiso60/matrix_diagram.md b/keyboards/4pplet/aekiso60/matrix_diagram.md new file mode 100644 index 000000000000..31fc9777c1ce --- /dev/null +++ b/keyboards/4pplet/aekiso60/matrix_diagram.md @@ -0,0 +1,33 @@ +# Matrix Diagram for 4pplet AEKISO60 (Revs. A and B) + +``` +┌────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────┐ +│00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │ +├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ +│10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │ │ +├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐1d │ +│20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │ │ +├─────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ ┌─────────┐ +│30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │3d │ │3c │ 2.75u RShift +├─────┼───┴┬──┴──┬┴───┴───┴─┬─┴─┬─┴───┴───┴┬──┴──┬┴───┬─┴───┤ └─────────┘ +│40 │41 │43 │44 │45 │46 │48 │4a │4b │ +└─────┴────┴─────┴──────────┴───┴──────────┴─────┴────┴─────┘ +┌─────┬────┬─────┬─────────────────────────┬─────┬────┬─────┐ ─┐ +│40 │41 │43 │45 │48 │4a │4b │ ├─ Tsangan +└─────┴────┴─────┴─────────────────────────┴─────┴────┴─────┘ │ +┌─────┬───┬─────┬───────────────────────────┬─────┬───┬─────┐ │ +│40 │41 │43 │45 │48 │4a │4b │ │ +└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ ─┘ +┌─────┬───┬─────┬───────────────────────────┬─────┬───┬─────┐ +│40 │ │43 │45 │48 │ │4b │ WKL +└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘ +┌─────┬────┬─────┬─────────┬─────┬─────────┬─────┬────┬─────┐ ─┐ +│40 │41 │43 │44 │45 │46 │48 │4a │4b │ ├─ same matrix as LAYOUT_all +└─────┴────┴─────┴─────────┴─────┴─────────┴─────┴────┴─────┘ │ +┌─────┬────┬─────┬────────┬─────┬──────────┬─────┬────┬─────┐ │ +│40 │41 │43 │44 │45 │46 │48 │4a │4b │ │ +└─────┴────┴─────┴────────┴─────┴──────────┴─────┴────┴─────┘ │ +┌─────┬────┬─────┬─────────┬────┬──────────┬─────┬────┬─────┐ │ +│40 │41 │43 │44 │45 │46 │48 │4a │4b │ │ +└─────┴────┴─────┴─────────┴────┴──────────┴─────┴────┴─────┘ ─┘ +``` diff --git a/keyboards/4pplet/aekiso60/rev_a/info.json b/keyboards/4pplet/aekiso60/rev_a/info.json index 9932b6ec55e3..18d86678d0e6 100644 --- a/keyboards/4pplet/aekiso60/rev_a/info.json +++ b/keyboards/4pplet/aekiso60/rev_a/info.json @@ -1,10 +1,6 @@ { "keyboard_name": "AEKISO60 Rev A", - "manufacturer": "4pplet", - "url": "", - "maintainer": "4pplet", "usb": { - "vid": "0x4444", "pid": "0x0001", "device_version": "0.0.1" }, @@ -13,79 +9,5 @@ "esc_output": "C4" }, "processor": "atmega32u2", - "bootloader": "atmel-dfu", - "layouts": { - "LAYOUT_all": { - "layout": [ - {"x":0, "y":0, "w":1.25}, - {"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":7.25, "y":0}, - {"x":8.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, "w":1.75}, - - {"x":0, "y":1, "w":1.75}, - {"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":6.75, "y":1}, - {"x":7.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":0, "y":2, "w":2}, - {"x":2, "y":2}, - {"x":3, "y":2}, - {"x":4, "y":2}, - {"x":5, "y":2}, - {"x":6, "y":2}, - {"x":7, "y":2}, - {"x":8, "y":2}, - {"x":9, "y":2}, - {"x":10, "y":2}, - {"x":11, "y":2}, - {"x":12, "y":2}, - {"x":13, "y":2}, - {"x":14, "y":1, "h":2}, - - {"x":0, "y":3, "w":1.5}, - {"x":1.5, "y":3}, - {"x":2.5, "y":3}, - {"x":3.5, "y":3}, - {"x":4.5, "y":3}, - {"x":5.5, "y":3}, - {"x":6.5, "y":3}, - {"x":7.5, "y":3}, - {"x":8.5, "y":3}, - {"x":9.5, "y":3}, - {"x":10.5, "y":3}, - {"x":11.5, "y":3}, - {"x":12.5, "y":3, "w":1.5}, - {"x":14, "y":3}, - - {"x":0, "y":4, "w":1.5}, - {"x":1.5, "y":4, "w":1.25}, - {"x":2.75, "y":4, "w":1.5}, - {"x":4.25, "y":4, "w":2.75}, - {"x":7, "y":4}, - {"x":8, "y":4, "w":2.75}, - {"x":10.75, "y":4, "w":1.5}, - {"x":12.25, "y":4, "w":1.25}, - {"x":13.5, "y":4, "w":1.5} - ] - } - } + "bootloader": "atmel-dfu" } diff --git a/keyboards/4pplet/aekiso60/rev_a/rev_a.c b/keyboards/4pplet/aekiso60/rev_a/rev_a.c deleted file mode 100644 index d3db08ad193b..000000000000 --- a/keyboards/4pplet/aekiso60/rev_a/rev_a.c +++ /dev/null @@ -1 +0,0 @@ -#include "rev_a.h" diff --git a/keyboards/4pplet/aekiso60/rev_a/rev_a.h b/keyboards/4pplet/aekiso60/rev_a/rev_a.h deleted file mode 100644 index 16acf01c2097..000000000000 --- a/keyboards/4pplet/aekiso60/rev_a/rev_a.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "quantum.h" - -/* LAYOUT_all - * ┌────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────┐ - * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │ - * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ - * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │ │ - * ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐1d │ - * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │ │ - * ├─────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ - * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │3d │ - * ├─────┼───┴┬──┴──┬┴───┴───┴─┬─┴─┬─┴───┴───┴┬──┴──┬┴───┬─┴───┤ - * │40 │41 │43 │44 │45 │46 │48 │4a │4b │ - * └─────┴────┴─────┴──────────┴───┴──────────┴─────┴────┴─────┘ - */ -#define LAYOUT_all( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1d, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ - k40, k41, k43, k44, k45, k46, k48, k4a, k4b \ -) \ -{ \ - {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ - {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \ - {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO},\ - {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ - {k40, k41, KC_NO, k43, k44, k45, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO, KC_NO} \ -} diff --git a/keyboards/4pplet/aekiso60/rev_b/info.json b/keyboards/4pplet/aekiso60/rev_b/info.json index fe2e424999ee..9f9f8bba8ef4 100644 --- a/keyboards/4pplet/aekiso60/rev_b/info.json +++ b/keyboards/4pplet/aekiso60/rev_b/info.json @@ -1,10 +1,6 @@ { "keyboard_name": "AEKISO60 Rev B", - "manufacturer": "4pplet", - "url": "", - "maintainer": "4pplet", "usb": { - "vid": "0x4444", "pid": "0x0011", "device_version": "0.0.2" }, @@ -12,79 +8,5 @@ "caps_lock": "A10" }, "processor": "STM32F072", - "bootloader": "stm32-dfu", - "layouts": { - "LAYOUT_all": { - "layout": [ - {"x":0, "y":0, "w":1.25}, - {"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":7.25, "y":0}, - {"x":8.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, "w":1.75}, - - {"x":0, "y":1, "w":1.75}, - {"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":6.75, "y":1}, - {"x":7.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":0, "y":2, "w":2}, - {"x":2, "y":2}, - {"x":3, "y":2}, - {"x":4, "y":2}, - {"x":5, "y":2}, - {"x":6, "y":2}, - {"x":7, "y":2}, - {"x":8, "y":2}, - {"x":9, "y":2}, - {"x":10, "y":2}, - {"x":11, "y":2}, - {"x":12, "y":2}, - {"x":13, "y":2}, - {"x":14, "y":1, "h":2}, - - {"x":0, "y":3, "w":1.5}, - {"x":1.5, "y":3}, - {"x":2.5, "y":3}, - {"x":3.5, "y":3}, - {"x":4.5, "y":3}, - {"x":5.5, "y":3}, - {"x":6.5, "y":3}, - {"x":7.5, "y":3}, - {"x":8.5, "y":3}, - {"x":9.5, "y":3}, - {"x":10.5, "y":3}, - {"x":11.5, "y":3}, - {"x":12.5, "y":3, "w":1.5}, - {"x":14, "y":3}, - - {"x":0, "y":4, "w":1.5}, - {"x":1.5, "y":4, "w":1.25}, - {"x":2.75, "y":4, "w":1.5}, - {"x":4.25, "y":4, "w":2.75}, - {"x":7, "y":4}, - {"x":8, "y":4, "w":2.75}, - {"x":10.75, "y":4, "w":1.5}, - {"x":12.25, "y":4, "w":1.25}, - {"x":13.5, "y":4, "w":1.5} - ] - } - } + "bootloader": "stm32-dfu" } diff --git a/keyboards/4pplet/aekiso60/rev_b/rev_b.h b/keyboards/4pplet/aekiso60/rev_b/rev_b.h deleted file mode 100644 index 64320025e3d8..000000000000 --- a/keyboards/4pplet/aekiso60/rev_b/rev_b.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2022 Stefan Sundin "4pplet" <4pplet@protonmail.com> - -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" - -/* LAYOUT_all - * ┌────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────┐ - * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │ - * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ - * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │ │ - * ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐1d │ - * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │ │ - * ├─────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ - * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │3d │ - * ├─────┼───┴┬──┴──┬┴───┴───┴─┬─┴─┬─┴───┴───┴┬──┴──┬┴───┬─┴───┤ - * │40 │41 │43 │44 │45 │46 │48 │4a │4b │ - * └─────┴────┴─────┴──────────┴───┴──────────┴─────┴────┴─────┘ - */ -#define LAYOUT_all( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1d, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ - k40, k41, k43, k44, k45, k46, k48, k4a, k4b \ -) \ -{ \ - {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ - {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \ - {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO},\ - {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ - {k40, k41, KC_NO, k43, k44, k45, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO, KC_NO} \ -} diff --git a/keyboards/4pplet/bootleg/rev_a/info.json b/keyboards/4pplet/bootleg/rev_a/info.json index 8f3b5eb2bfa6..4f3893229098 100644 --- a/keyboards/4pplet/bootleg/rev_a/info.json +++ b/keyboards/4pplet/bootleg/rev_a/info.json @@ -17,72 +17,148 @@ "layouts": { "LAYOUT_all": { "layout": [ - { "label": "Esc", "x": 0, "y": 0 }, - { "label": "!", "x": 1, "y": 0 }, - { "label": "@", "x": 2, "y": 0 }, - { "label": "#", "x": 3, "y": 0 }, - { "label": "$", "x": 4, "y": 0 }, - { "label": "%", "x": 5, "y": 0 }, - { "label": "^", "x": 6, "y": 0 }, - { "label": "&", "x": 7, "y": 0 }, - { "label": "*", "x": 8, "y": 0 }, - { "label": "(", "x": 9, "y": 0 }, - { "label": ")", "x": 10, "y": 0 }, - { "label": "_", "x": 11, "y": 0 }, - { "label": "+", "x": 12, "y": 0 }, - { "label": "|", "x": 13, "y": 0 }, - { "label": "~", "x": 14, "y": 0 }, - { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 1 }, - { "label": "W", "x": 2.5, "y": 1 }, - { "label": "E", "x": 3.5, "y": 1 }, - { "label": "R", "x": 4.5, "y": 1 }, - { "label": "T", "x": 5.5, "y": 1 }, - { "label": "Y", "x": 6.5, "y": 1 }, - { "label": "U", "x": 7.5, "y": 1 }, - { "label": "I", "x": 8.5, "y": 1 }, - { "label": "O", "x": 9.5, "y": 1 }, - { "label": "P", "x": 10.5, "y": 1 }, - { "label": "{", "x": 11.5, "y": 1 }, - { "label": "}", "x": 12.5, "y": 1 }, - { "label": "Backsp.", "x": 13.5, "y": 1, "w": 1.5 }, - { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 2 }, - { "label": "S", "x": 2.75, "y": 2 }, - { "label": "D", "x": 3.75, "y": 2 }, - { "label": "F", "x": 4.75, "y": 2 }, - { "label": "G", "x": 5.75, "y": 2 }, - { "label": "H", "x": 6.75, "y": 2 }, - { "label": "J", "x": 7.75, "y": 2 }, - { "label": "K", "x": 8.75, "y": 2 }, - { "label": "L", "x": 9.75, "y": 2 }, - { "label": ":", "x": 10.75, "y": 2 }, - { "label": "\"", "x": 11.75, "y": 2 }, - { "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 }, - { "label": "Shift", "x": 0, "y": 3, "w": 1.25 }, - { "label": "|", "x": 1.25, "y": 3 }, - { "label": "Z", "x": 2.25, "y": 3 }, - { "label": "X", "x": 3.25, "y": 3 }, - { "label": "C", "x": 4.25, "y": 3 }, - { "label": "V", "x": 5.25, "y": 3 }, - { "label": "B", "x": 6.25, "y": 3 }, - { "label": "N", "x": 7.25, "y": 3 }, - { "label": "M", "x": 8.25, "y": 3 }, - { "label": "<", "x": 9.25, "y": 3 }, - { "label": ">", "x": 10.25, "y": 3 }, - { "label": "?", "x": 11.25, "y": 3 }, - { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, - { "label": "Fn", "x": 14, "y": 3, "w": 1 }, - { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, - { "label": "Win", "x": 1.25, "y": 4, "w": 1.25 }, - { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, - { "label": "Space1", "x": 3.75, "y": 4, "w": 2.25 }, - { "label": "Space2", "x": 6, "y": 4, "w": 1.25 }, - { "label": "Space3", "x": 7.25, "y": 4, "w": 2.75 }, - { "label": "Alt", "x": 10, "y": 4, "w": 1.25 }, - { "label": "Menu", "x": 11.25, "y": 4, "w": 1.25 }, - { "label": "Win", "x": 12.5, "y": 4, "w": 1.25 }, - { "label": "Ctrl", "x": 13.75, "y": 4, "w": 1.25 } + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "!", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "@", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "#", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "$", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "%", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "^", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "&", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "*", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "(", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": ")", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "_", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "+", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "|", "matrix": [0, 13], "x": 13, "y": 0}, + {"label": "~", "matrix": [0, 14], "x": 14, "y": 0}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "Backsp.", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, + {"label": "|", "matrix": [3, 1], "x": 1.25, "y": 3}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3}, + + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"label": "Space1", "matrix": [4, 3], "x": 3.75, "y": 4, "w": 2.25}, + {"label": "Space2", "matrix": [4, 4], "x": 6, "y": 4, "w": 1.25}, + {"label": "Space3", "matrix": [4, 5], "x": 7.25, "y": 4, "w": 2.75}, + {"label": "Alt", "matrix": [4, 6], "x": 10, "y": 4, "w": 1.25}, + {"label": "Menu", "matrix": [4, 7], "x": 11.25, "y": 4, "w": 1.25}, + {"label": "Win", "matrix": [4, 8], "x": 12.5, "y": 4, "w": 1.25}, + {"label": "Ctrl", "matrix": [4, 9], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "!", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "@", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "#", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "$", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "%", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "^", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "&", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "*", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "(", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": ")", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "_", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "+", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "|", "matrix": [0, 13], "x": 13, "y": 0}, + {"label": "~", "matrix": [0, 14], "x": 14, "y": 0}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "Backsp.", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3}, + + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"label": "Space2", "matrix": [4, 4], "x": 3.75, "y": 4, "w": 6.25}, + {"label": "Alt", "matrix": [4, 6], "x": 10, "y": 4, "w": 1.25}, + {"label": "Menu", "matrix": [4, 7], "x": 11.25, "y": 4, "w": 1.25}, + {"label": "Win", "matrix": [4, 8], "x": 12.5, "y": 4, "w": 1.25}, + {"label": "Ctrl", "matrix": [4, 9], "x": 13.75, "y": 4, "w": 1.25} ] } } diff --git a/keyboards/4pplet/bootleg/rev_a/rev_a.h b/keyboards/4pplet/bootleg/rev_a/rev_a.h deleted file mode 100644 index f9bbb445cb5d..000000000000 --- a/keyboards/4pplet/bootleg/rev_a/rev_a.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> - -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_all( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1d, k1e, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ - k40, k41, k43, k45, k47, k48, k4a, k4b, k4d, k4e \ -) \ -{ \ - {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ - {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1d, k1e}, \ - {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d}, \ - {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e}, \ - {k40, k41, k43, k45, k47, k48, k4a, k4b, k4d, k4e } \ -} diff --git a/keyboards/4pplet/eagle_viper_rep/rev_a/info.json b/keyboards/4pplet/eagle_viper_rep/rev_a/info.json index 8748b3248008..57f7e3469ee9 100644 --- a/keyboards/4pplet/eagle_viper_rep/rev_a/info.json +++ b/keyboards/4pplet/eagle_viper_rep/rev_a/info.json @@ -18,71 +18,287 @@ "layouts": { "LAYOUT_all": { "layout": [ - { "label": "Esc", "x": 0, "y": 0 }, - { "label": "!", "x": 1, "y": 0 }, - { "label": "@", "x": 2, "y": 0 }, - { "label": "#", "x": 3, "y": 0 }, - { "label": "$", "x": 4, "y": 0 }, - { "label": "%", "x": 5, "y": 0 }, - { "label": "^", "x": 6, "y": 0 }, - { "label": "&", "x": 7, "y": 0 }, - { "label": "*", "x": 8, "y": 0 }, - { "label": "(", "x": 9, "y": 0 }, - { "label": ")", "x": 10, "y": 0 }, - { "label": "_", "x": 11, "y": 0 }, - { "label": "+", "x": 12, "y": 0 }, - { "label": "|", "x": 13, "y": 0 }, - { "label": "~", "x": 14, "y": 0 }, - { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 1 }, - { "label": "W", "x": 2.5, "y": 1 }, - { "label": "E", "x": 3.5, "y": 1 }, - { "label": "R", "x": 4.5, "y": 1 }, - { "label": "T", "x": 5.5, "y": 1 }, - { "label": "Y", "x": 6.5, "y": 1 }, - { "label": "U", "x": 7.5, "y": 1 }, - { "label": "I", "x": 8.5, "y": 1 }, - { "label": "O", "x": 9.5, "y": 1 }, - { "label": "P", "x": 10.5, "y": 1 }, - { "label": "{", "x": 11.5, "y": 1 }, - { "label": "}", "x": 12.5, "y": 1 }, - { "label": "Backsp.", "x": 13.5, "y": 1, "w": 1.5 }, - { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 2 }, - { "label": "S", "x": 2.75, "y": 2 }, - { "label": "D", "x": 3.75, "y": 2 }, - { "label": "F", "x": 4.75, "y": 2 }, - { "label": "G", "x": 5.75, "y": 2 }, - { "label": "H", "x": 6.75, "y": 2 }, - { "label": "J", "x": 7.75, "y": 2 }, - { "label": "K", "x": 8.75, "y": 2 }, - { "label": "L", "x": 9.75, "y": 2 }, - { "label": ":", "x": 10.75, "y": 2 }, - { "label": "\"", "x": 11.75, "y": 2 }, - { "label": "~", "x": 12.75, "y": 2}, - { "label": "Enter", "x": 13.75, "y": 2, "w": 1.25 }, - { "label": "Shift", "x": 0, "y": 3, "w": 1.25 }, - { "label": "|", "x": 1.25, "y": 3 }, - { "label": "Z", "x": 2.25, "y": 3 }, - { "label": "X", "x": 3.25, "y": 3 }, - { "label": "C", "x": 4.25, "y": 3 }, - { "label": "V", "x": 5.25, "y": 3 }, - { "label": "B", "x": 6.25, "y": 3 }, - { "label": "N", "x": 7.25, "y": 3 }, - { "label": "M", "x": 8.25, "y": 3 }, - { "label": "<", "x": 9.25, "y": 3 }, - { "label": ">", "x": 10.25, "y": 3 }, - { "label": "?", "x": 11.25, "y": 3 }, - { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, - { "label": "Fn", "x": 14, "y": 3, "w": 1 }, - { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, - { "label": "Win", "x": 1.25, "y": 4, "w": 1.25 }, - { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, - { "label": "Space", "x": 3.75, "y": 4, "w": 6.25 }, - { "label": "Alt", "x": 10, "y": 4, "w": 1.25 }, - { "label": "Menu", "x": 11.25, "y": 4, "w": 1.25 }, - { "label": "Win", "x": 12.5, "y": 4, "w": 1.25 }, - { "label": "Ctrl", "x": 13.75, "y": 4, "w": 1.25 } + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "!", "matrix": [1, 0], "x": 1, "y": 0}, + {"label": "@", "matrix": [0, 1], "x": 2, "y": 0}, + {"label": "#", "matrix": [1, 1], "x": 3, "y": 0}, + {"label": "$", "matrix": [0, 2], "x": 4, "y": 0}, + {"label": "%", "matrix": [1, 2], "x": 5, "y": 0}, + {"label": "^", "matrix": [0, 3], "x": 6, "y": 0}, + {"label": "&", "matrix": [1, 3], "x": 7, "y": 0}, + {"label": "*", "matrix": [0, 4], "x": 8, "y": 0}, + {"label": "(", "matrix": [1, 4], "x": 9, "y": 0}, + {"label": ")", "matrix": [0, 5], "x": 10, "y": 0}, + {"label": "_", "matrix": [1, 5], "x": 11, "y": 0}, + {"label": "+", "matrix": [0, 6], "x": 12, "y": 0}, + {"label": "|", "matrix": [1, 6], "x": 13, "y": 0}, + {"label": "~", "matrix": [3, 6], "x": 14, "y": 0}, + + {"label": "Tab", "matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [3, 0], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [2, 1], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [3, 1], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [2, 2], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [3, 2], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [2, 3], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [3, 3], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [2, 4], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [3, 4], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [2, 5], "x": 10.5, "y": 1}, + {"label": "{", "matrix": [3, 5], "x": 11.5, "y": 1}, + {"label": "}", "matrix": [2, 6], "x": 12.5, "y": 1}, + {"label": "Backsp.", "matrix": [5, 6], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [5, 0], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [4, 1], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [5, 1], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [4, 2], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [5, 2], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [4, 3], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [5, 3], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [4, 4], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [5, 4], "x": 9.75, "y": 2}, + {"label": ":", "matrix": [4, 5], "x": 10.75, "y": 2}, + {"label": "\"", "matrix": [5, 5], "x": 11.75, "y": 2}, + {"label": "~", "matrix": [4, 6], "x": 12.75, "y": 2}, + {"label": "Enter", "matrix": [7, 6], "x": 13.75, "y": 2, "w": 1.25}, + + {"label": "Shift", "matrix": [6, 0], "x": 0, "y": 3, "w": 1.25}, + {"label": "|", "matrix": [7, 0], "x": 1.25, "y": 3}, + {"label": "Z", "matrix": [6, 1], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [7, 1], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [6, 2], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [7, 2], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [6, 3], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [7, 3], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [6, 4], "x": 8.25, "y": 3}, + {"label": "<", "matrix": [7, 4], "x": 9.25, "y": 3}, + {"label": ">", "matrix": [6, 5], "x": 10.25, "y": 3}, + {"label": "?", "matrix": [7, 5], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Fn", "matrix": [9, 6], "x": 14, "y": 3}, + + {"label": "Ctrl", "matrix": [8, 0], "x": 0, "y": 4, "w": 1.25}, + {"label": "Win", "matrix": [9, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"label": "Alt", "matrix": [9, 1], "x": 2.5, "y": 4, "w": 1.25}, + {"label": "Space", "matrix": [9, 3], "x": 3.75, "y": 4, "w": 6.25}, + {"label": "Alt", "matrix": [9, 4], "x": 10, "y": 4, "w": 1.25}, + {"label": "Menu", "matrix": [8, 5], "x": 11.25, "y": 4, "w": 1.25}, + {"label": "Win", "matrix": [9, 5], "x": 12.5, "y": 4, "w": 1.25}, + {"label": "Ctrl", "matrix": [8, 6], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "!", "matrix": [1, 0], "x": 1, "y": 0}, + {"label": "@", "matrix": [0, 1], "x": 2, "y": 0}, + {"label": "#", "matrix": [1, 1], "x": 3, "y": 0}, + {"label": "$", "matrix": [0, 2], "x": 4, "y": 0}, + {"label": "%", "matrix": [1, 2], "x": 5, "y": 0}, + {"label": "^", "matrix": [0, 3], "x": 6, "y": 0}, + {"label": "&", "matrix": [1, 3], "x": 7, "y": 0}, + {"label": "*", "matrix": [0, 4], "x": 8, "y": 0}, + {"label": "(", "matrix": [1, 4], "x": 9, "y": 0}, + {"label": ")", "matrix": [0, 5], "x": 10, "y": 0}, + {"label": "_", "matrix": [1, 5], "x": 11, "y": 0}, + {"label": "+", "matrix": [0, 6], "x": 12, "y": 0}, + {"label": "|", "matrix": [1, 6], "x": 13, "y": 0}, + {"label": "~", "matrix": [3, 6], "x": 14, "y": 0}, + + {"label": "Tab", "matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [3, 0], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [2, 1], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [3, 1], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [2, 2], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [3, 2], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [2, 3], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [3, 3], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [2, 4], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [3, 4], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [2, 5], "x": 10.5, "y": 1}, + {"label": "{", "matrix": [3, 5], "x": 11.5, "y": 1}, + {"label": "}", "matrix": [2, 6], "x": 12.5, "y": 1}, + {"label": "Backsp.", "matrix": [5, 6], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [5, 0], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [4, 1], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [5, 1], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [4, 2], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [5, 2], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [4, 3], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [5, 3], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [4, 4], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [5, 4], "x": 9.75, "y": 2}, + {"label": ":", "matrix": [4, 5], "x": 10.75, "y": 2}, + {"label": "\"", "matrix": [5, 5], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [7, 6], "x": 12.75, "y": 2, "w": 2.25}, + + {"label": "Shift", "matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z", "matrix": [6, 1], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [7, 1], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [6, 2], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [7, 2], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [6, 3], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [7, 3], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [6, 4], "x": 8.25, "y": 3}, + {"label": "<", "matrix": [7, 4], "x": 9.25, "y": 3}, + {"label": ">", "matrix": [6, 5], "x": 10.25, "y": 3}, + {"label": "?", "matrix": [7, 5], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Fn", "matrix": [9, 6], "x": 14, "y": 3}, + + {"label": "Ctrl", "matrix": [8, 0], "x": 0, "y": 4, "w": 1.25}, + {"label": "Win", "matrix": [9, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"label": "Alt", "matrix": [9, 1], "x": 2.5, "y": 4, "w": 1.25}, + {"label": "Space", "matrix": [9, 3], "x": 3.75, "y": 4, "w": 6.25}, + {"label": "Alt", "matrix": [9, 4], "x": 10, "y": 4, "w": 1.25}, + {"label": "Menu", "matrix": [8, 5], "x": 11.25, "y": 4, "w": 1.25}, + {"label": "Win", "matrix": [9, 5], "x": 12.5, "y": 4, "w": 1.25}, + {"label": "Ctrl", "matrix": [8, 6], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + + "LAYOUT_60_tsangan_hhkb": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "!", "matrix": [1, 0], "x": 1, "y": 0}, + {"label": "@", "matrix": [0, 1], "x": 2, "y": 0}, + {"label": "#", "matrix": [1, 1], "x": 3, "y": 0}, + {"label": "$", "matrix": [0, 2], "x": 4, "y": 0}, + {"label": "%", "matrix": [1, 2], "x": 5, "y": 0}, + {"label": "^", "matrix": [0, 3], "x": 6, "y": 0}, + {"label": "&", "matrix": [1, 3], "x": 7, "y": 0}, + {"label": "*", "matrix": [0, 4], "x": 8, "y": 0}, + {"label": "(", "matrix": [1, 4], "x": 9, "y": 0}, + {"label": ")", "matrix": [0, 5], "x": 10, "y": 0}, + {"label": "_", "matrix": [1, 5], "x": 11, "y": 0}, + {"label": "+", "matrix": [0, 6], "x": 12, "y": 0}, + {"label": "|", "matrix": [1, 6], "x": 13, "y": 0}, + {"label": "~", "matrix": [3, 6], "x": 14, "y": 0}, + + {"label": "Tab", "matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [3, 0], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [2, 1], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [3, 1], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [2, 2], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [3, 2], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [2, 3], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [3, 3], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [2, 4], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [3, 4], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [2, 5], "x": 10.5, "y": 1}, + {"label": "{", "matrix": [3, 5], "x": 11.5, "y": 1}, + {"label": "}", "matrix": [2, 6], "x": 12.5, "y": 1}, + {"label": "Backsp.", "matrix": [5, 6], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [5, 0], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [4, 1], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [5, 1], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [4, 2], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [5, 2], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [4, 3], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [5, 3], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [4, 4], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [5, 4], "x": 9.75, "y": 2}, + {"label": ":", "matrix": [4, 5], "x": 10.75, "y": 2}, + {"label": "\"", "matrix": [5, 5], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [7, 6], "x": 12.75, "y": 2, "w": 2.25}, + + {"label": "Shift", "matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z", "matrix": [6, 1], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [7, 1], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [6, 2], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [7, 2], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [6, 3], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [7, 3], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [6, 4], "x": 8.25, "y": 3}, + {"label": "<", "matrix": [7, 4], "x": 9.25, "y": 3}, + {"label": ">", "matrix": [6, 5], "x": 10.25, "y": 3}, + {"label": "?", "matrix": [7, 5], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Fn", "matrix": [9, 6], "x": 14, "y": 3}, + + {"label": "Ctrl", "matrix": [8, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "Win", "matrix": [9, 0], "x": 1.5, "y": 4}, + {"label": "Alt", "matrix": [9, 1], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "Space", "matrix": [9, 3], "x": 4, "y": 4, "w": 7}, + {"label": "Alt", "matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"label": "Win", "matrix": [9, 5], "x": 12.5, "y": 4}, + {"label": "Ctrl", "matrix": [8, 6], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + + "LAYOUT_60_hhkb": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "!", "matrix": [1, 0], "x": 1, "y": 0}, + {"label": "@", "matrix": [0, 1], "x": 2, "y": 0}, + {"label": "#", "matrix": [1, 1], "x": 3, "y": 0}, + {"label": "$", "matrix": [0, 2], "x": 4, "y": 0}, + {"label": "%", "matrix": [1, 2], "x": 5, "y": 0}, + {"label": "^", "matrix": [0, 3], "x": 6, "y": 0}, + {"label": "&", "matrix": [1, 3], "x": 7, "y": 0}, + {"label": "*", "matrix": [0, 4], "x": 8, "y": 0}, + {"label": "(", "matrix": [1, 4], "x": 9, "y": 0}, + {"label": ")", "matrix": [0, 5], "x": 10, "y": 0}, + {"label": "_", "matrix": [1, 5], "x": 11, "y": 0}, + {"label": "+", "matrix": [0, 6], "x": 12, "y": 0}, + {"label": "|", "matrix": [1, 6], "x": 13, "y": 0}, + {"label": "~", "matrix": [3, 6], "x": 14, "y": 0}, + + {"label": "Tab", "matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [3, 0], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [2, 1], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [3, 1], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [2, 2], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [3, 2], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [2, 3], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [3, 3], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [2, 4], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [3, 4], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [2, 5], "x": 10.5, "y": 1}, + {"label": "{", "matrix": [3, 5], "x": 11.5, "y": 1}, + {"label": "}", "matrix": [2, 6], "x": 12.5, "y": 1}, + {"label": "Backsp.", "matrix": [5, 6], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [5, 0], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [4, 1], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [5, 1], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [4, 2], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [5, 2], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [4, 3], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [5, 3], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [4, 4], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [5, 4], "x": 9.75, "y": 2}, + {"label": ":", "matrix": [4, 5], "x": 10.75, "y": 2}, + {"label": "\"", "matrix": [5, 5], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [7, 6], "x": 12.75, "y": 2, "w": 2.25}, + + {"label": "Shift", "matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z", "matrix": [6, 1], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [7, 1], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [6, 2], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [7, 2], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [6, 3], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [7, 3], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [6, 4], "x": 8.25, "y": 3}, + {"label": "<", "matrix": [7, 4], "x": 9.25, "y": 3}, + {"label": ">", "matrix": [6, 5], "x": 10.25, "y": 3}, + {"label": "?", "matrix": [7, 5], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Fn", "matrix": [9, 6], "x": 14, "y": 3}, + + {"label": "Alt", "matrix": [9, 0], "x": 1.5, "y": 4}, + {"label": "GUI", "matrix": [9, 1], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "Space", "matrix": [9, 3], "x": 4, "y": 4, "w": 7}, + {"label": "GUI", "matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"label": "Alt", "matrix": [9, 5], "x": 12.5, "y": 4} ] } } diff --git a/keyboards/4pplet/eagle_viper_rep/rev_a/matrix_diagram.md b/keyboards/4pplet/eagle_viper_rep/rev_a/matrix_diagram.md new file mode 100644 index 000000000000..6a51e0447ea4 --- /dev/null +++ b/keyboards/4pplet/eagle_viper_rep/rev_a/matrix_diagram.md @@ -0,0 +1,24 @@ +# Matrix Diagram for 4pplet Eagle Viper REP Rev A + +``` + ┌───────┐ + 2u Backspace │36? │ + └───────┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│00 │10 │01 │11 │02 │12 │03 │13 │04 │14 │05 │15 │06 │16 │36 │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ ┌─────┐ +│20 │30 │21 │31 │22 │32 │23 │33 │24 │34 │25 │35 │26 │56 │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ ┌──┴┐76 │ ISO Enter +│40 │50 │41 │51 │42 │52 │43 │53 │44 │54 │45 │55 │76 │ │46 │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ └───┴────┘ +│60 │70 │61 │71 │62 │72 │63 │73 │64 │74 │65 │75 │66 │96 │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ +│80 │90 │91 │93 │94 │85 │95 │86 │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +┌────────┐ ┌──────────┐ +│60 │ 2.25u LShift 2.75u RShift │66 │ +└────────┘ └──────────┘ +┌─────┬───┬─────┬───────────────────────────┬─────┬───┬─────┐ +│80 │90 │91 │93 │85 │95 │86 │ Tsangan/WKL/HHKB +└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ +``` diff --git a/keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.h b/keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.h index 5dac41f92105..35ce50a02a20 100644 --- a/keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.h +++ b/keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.h @@ -19,23 +19,3 @@ along with this program. If not, see . #include "quantum.h" void setLayerLed(layer_state_t state); - -#define LAYOUT_all( \ - k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k36, \ - k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k56,\ - k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k76,\ - k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k96,\ - k80, k90, k91, k93, k94, k85, k95, k86 \ -) \ -{ \ - {k00, k01, k02, k03, k04, k05, k06}, \ - {k10, k11, k12, k13, k14, k15, k16}, \ - {k20, k21, k22, k23, k24, k25, k26}, \ - {k30, k31, k32, k33, k34, k35, k36}, \ - {k40, k41, k42, k43, k44, k45, k46}, \ - {k50, k51, k52, k53, k54, k55, k56}, \ - {k60, k61, k62, k63, k64, k65, k66}, \ - {k70, k71, k72, k73, k74, k75, k76}, \ - {k80, KC_NO, KC_NO, KC_NO, KC_NO, k85, k86}, \ - {k90, k91, KC_NO, k93, k94, k95, k96} \ -} diff --git a/keyboards/a_dux/a_dux.c b/keyboards/a_dux/a_dux.c index 16c3406f4878..e4d831f91417 100644 --- a/keyboards/a_dux/a_dux.c +++ b/keyboards/a_dux/a_dux.c @@ -1,22 +1,9 @@ -/* Copyright 2018-2020 - * ENDO Katsuhiro - * David Philip Barr <@davidphilipbarr> - * Pierre Chevalier - * @filterpaper - * - * 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/a_dux/config.h b/keyboards/a_dux/config.h index b929e02b8f2b..35cf8d41514d 100644 --- a/keyboards/a_dux/config.h +++ b/keyboards/a_dux/config.h @@ -1,25 +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+ #pragma once -/* 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 EE_HANDS diff --git a/keyboards/a_dux/info.json b/keyboards/a_dux/info.json index 29259a180c13..7392adda0b98 100644 --- a/keyboards/a_dux/info.json +++ b/keyboards/a_dux/info.json @@ -8,8 +8,13 @@ "pid": "0x3939", "device_version": "0.0.1" }, - "processor": "atmega32u4", - "bootloader": "atmel-dfu", + "development_board": "promicro", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "unicode": true + }, "matrix_pins": { "direct": [ ["C6", "D2", "F7", "B2", "F4"], @@ -19,6 +24,7 @@ ] }, "split": { + "enabled": true, "soft_serial_pin": "D1", "bootmagic": { "matrix": [4, 4] @@ -41,47 +47,43 @@ "layouts": { "LAYOUT_split_3x5_2": { "layout": [ - {"x": 0, "y": 1.33, "matrix": [0, 0]}, - {"x": 1, "y": 0.31, "matrix": [0, 1]}, - {"x": 2, "y": 0, "matrix": [0, 2]}, - {"x": 3, "y": 0.28, "matrix": [0, 3]}, - {"x": 4, "y": 0.42, "matrix": [0, 4]}, - - {"x": 8, "y": 0.42, "matrix": [4, 0]}, - {"x": 9, "y": 0.28, "matrix": [4, 1]}, - {"x": 10, "y": 0, "matrix": [4, 2]}, - {"x": 11, "y": 0.31, "matrix": [4, 3]}, - {"x": 12, "y": 1.33, "matrix": [4, 4]}, - - {"x": 0, "y": 2.33, "matrix": [1, 0]}, - {"x": 1, "y": 1.31, "matrix": [1, 1]}, - {"x": 2, "y": 1, "matrix": [1, 2]}, - {"x": 3, "y": 1.28, "matrix": [1, 3]}, - {"x": 4, "y": 1.42, "matrix": [1, 4]}, - - {"x": 8, "y": 1.42, "matrix": [5, 0]}, - {"x": 9, "y": 1.28, "matrix": [5, 1]}, - {"x": 10, "y": 1, "matrix": [5, 2]}, - {"x": 11, "y": 1.31, "matrix": [5, 3]}, - {"x": 12, "y": 2.33, "matrix": [5, 4]}, - - {"x": 0, "y": 3.33, "matrix": [2, 0]}, - {"x": 1, "y": 2.31, "matrix": [2, 1]}, - {"x": 2, "y": 2, "matrix": [2, 2]}, - {"x": 3, "y": 2.28, "matrix": [2, 3]}, - {"x": 4, "y": 2.42, "matrix": [2, 4]}, + { "label": "L01", "matrix": [0, 0], "x": 0, "y": 1.33 }, + { "label": "L02", "matrix": [0, 1], "x": 1, "y": 0.31 }, + { "label": "L03", "matrix": [0, 2], "x": 2, "y": 0 }, + { "label": "L04", "matrix": [0, 3], "x": 3, "y": 0.28 }, + { "label": "L05", "matrix": [0, 4], "x": 4, "y": 0.42 }, + { "label": "R01", "matrix": [4, 0], "x": 8, "y": 0.42 }, + { "label": "R02", "matrix": [4, 1], "x": 9, "y": 0.28 }, + { "label": "R03", "matrix": [4, 2], "x": 10, "y": 0 }, + { "label": "R04", "matrix": [4, 3], "x": 11, "y": 0.31 }, + { "label": "R05", "matrix": [4, 4], "x": 12, "y": 1.33 }, - {"x": 8, "y": 2.42, "matrix": [6, 0]}, - {"x": 9, "y": 2.28, "matrix": [6, 1]}, - {"x": 10, "y": 2, "matrix": [6, 2]}, - {"x": 11, "y": 2.31, "matrix": [6, 3]}, - {"x": 12, "y": 3.33, "matrix": [6, 4]}, + { "label": "L06", "matrix": [1, 0], "x": 0, "y": 2.33 }, + { "label": "L07", "matrix": [1, 1], "x": 1, "y": 1.31 }, + { "label": "L08", "matrix": [1, 2], "x": 2, "y": 1 }, + { "label": "L09", "matrix": [1, 3], "x": 3, "y": 1.28 }, + { "label": "L10", "matrix": [1, 4], "x": 4, "y": 1.42 }, + { "label": "R06", "matrix": [5, 0], "x": 8, "y": 1.42 }, + { "label": "R07", "matrix": [5, 1], "x": 9, "y": 1.28 }, + { "label": "R08", "matrix": [5, 2], "x": 10, "y": 1 }, + { "label": "R09", "matrix": [5, 3], "x": 11, "y": 1.31 }, + { "label": "R10", "matrix": [5, 4], "x": 12, "y": 2.33 }, - {"x": 4, "y": 3.75, "matrix": [3, 0]}, - {"x": 5, "y": 4, "matrix": [3, 1]}, + { "label": "L11", "matrix": [2, 0], "x": 0, "y": 3.33 }, + { "label": "L12", "matrix": [2, 1], "x": 1, "y": 2.31 }, + { "label": "L13", "matrix": [2, 2], "x": 2, "y": 2 }, + { "label": "L14", "matrix": [2, 3], "x": 3, "y": 2.28 }, + { "label": "L15", "matrix": [2, 4], "x": 4, "y": 2.42 }, + { "label": "R11", "matrix": [6, 0], "x": 8, "y": 2.42 }, + { "label": "R12", "matrix": [6, 1], "x": 9, "y": 2.28 }, + { "label": "R13", "matrix": [6, 2], "x": 10, "y": 2 }, + { "label": "R14", "matrix": [6, 3], "x": 11, "y": 2.31 }, + { "label": "R15", "matrix": [6, 4], "x": 12, "y": 3.33 }, - {"x": 7, "y": 4, "matrix": [7, 0]}, - {"x": 8, "y": 3.75, "matrix": [7, 1]} + { "label": "L16", "matrix": [3, 0], "x": 4, "y": 3.75 }, + { "label": "L17", "matrix": [3, 1], "x": 5, "y": 4 }, + { "label": "R16", "matrix": [7, 0], "x": 7, "y": 4 }, + { "label": "R17", "matrix": [7, 1], "x": 8, "y": 3.75 } ] } } diff --git a/keyboards/a_dux/rules.mk b/keyboards/a_dux/rules.mk index 935483d83925..6e7633bfe015 100644 --- a/keyboards/a_dux/rules.mk +++ b/keyboards/a_dux/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 = yes # 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/adafruit/macropad/config.h b/keyboards/adafruit/macropad/config.h index c493c487e385..af72251dac02 100644 --- a/keyboards/adafruit/macropad/config.h +++ b/keyboards/adafruit/macropad/config.h @@ -42,9 +42,14 @@ #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP13 #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U -/* Audio (Unsupported for now)*/ -// #define AUDIO_PIN GP16 -// #define SPEAKER_SHUTDOWN GP14 +/* Audio */ +#define AUDIO_PIN GP16 +#define AUDIO_PWM_DRIVER PWMD0 +#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_A +#define AUDIO_INIT_DELAY +#define AUDIO_CLICKY + +#define SPEAKER_SHUTDOWN GP14 #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/adafruit/macropad/halconf.h b/keyboards/adafruit/macropad/halconf.h index 6cd66fd52077..2e3be29bbf07 100644 --- a/keyboards/adafruit/macropad/halconf.h +++ b/keyboards/adafruit/macropad/halconf.h @@ -26,3 +26,6 @@ #undef SPI_SELECT_MODE #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#undef HAL_USE_PWM +#define HAL_USE_PWM TRUE diff --git a/keyboards/adafruit/macropad/keymaps/default/keymap.c b/keyboards/adafruit/macropad/keymaps/default/keymap.c index 34989ea0b60e..808b202df40b 100644 --- a/keyboards/adafruit/macropad/keymaps/default/keymap.c +++ b/keyboards/adafruit/macropad/keymaps/default/keymap.c @@ -18,17 +18,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_MUTE, + LT(1,KC_MUTE), KC_ENT, KC_0, KC_BSPC, KC_7, KC_8, KC_9, KC_4, KC_5, KC_6, KC_1, KC_2, KC_3 - ) + ), + [1] = LAYOUT( + _______, + CK_TOGG, AU_TOGG, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), }; #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(_______, _______) }, }; #endif @@ -111,4 +119,3 @@ bool oled_task_user(void) { } #endif - diff --git a/keyboards/adafruit/macropad/keymaps/peterfalken/keymap.c b/keyboards/adafruit/macropad/keymaps/peterfalken/keymap.c new file mode 100644 index 000000000000..f93126334717 --- /dev/null +++ b/keyboards/adafruit/macropad/keymaps/peterfalken/keymap.c @@ -0,0 +1,98 @@ +// Copyright 2023 Peter.Falken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "peterfalken.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_MUTE, + KC_7, KC_8, KC_9, + KC_4, KC_5, KC_6, + KC_1, KC_2, KC_3, + KC_ENT, KC_0, KC_BSPC + ) +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, +}; +#endif + +#ifdef OLED_ENABLE +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x3f, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x83, 0x83, 0x83, 0x83, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, + 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x83, 0x83, 0x83, 0x83, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x81, 0x83, 0x83, 0x83, 0x83, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x83, 0x83, 0x83, 0x83, 0x81, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x07, 0x1f, 0x3f, 0x7f, 0x7e, 0xf8, 0xf0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xff, 0xff, + 0xff, 0xff, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf8, 0x7e, 0x7f, 0x3f, 0x1f, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, + 0xff, 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xfc, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + oled_write_raw_P(qmk_logo, sizeof(qmk_logo)); +} + +bool oled_task_user(void) { + render_qmk_logo(); + return true; +} +#endif // OLED_ENABLE diff --git a/keyboards/adafruit/macropad/keymaps/peterfalken/rules.mk b/keyboards/adafruit/macropad/keymaps/peterfalken/rules.mk new file mode 100644 index 000000000000..59ffb099c24b --- /dev/null +++ b/keyboards/adafruit/macropad/keymaps/peterfalken/rules.mk @@ -0,0 +1,3 @@ +# Setup QMK features +ENCODER_MAP_ENABLE = yes +RGB_MATRIX_ENABLE = no # Disable RGB key matrix diff --git a/keyboards/adafruit/macropad/keymaps/via/keymap.c b/keyboards/adafruit/macropad/keymaps/via/keymap.c index 6ef3d3e29ddc..80efd80f2d14 100644 --- a/keyboards/adafruit/macropad/keymaps/via/keymap.c +++ b/keyboards/adafruit/macropad/keymaps/via/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_MUTE, + LT(1,KC_MUTE), KC_ENT, KC_0, KC_BSPC, KC_7, KC_8, KC_9, KC_4, KC_5, KC_6, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT( _______, - _______, _______, _______, + CK_TOGG, AU_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -135,4 +135,3 @@ bool oled_task_user(void) { } #endif - diff --git a/keyboards/adafruit/macropad/macropad.c b/keyboards/adafruit/macropad/macropad.c index 5cffdc6c97de..398d0bbdfda2 100644 --- a/keyboards/adafruit/macropad/macropad.c +++ b/keyboards/adafruit/macropad/macropad.c @@ -41,6 +41,31 @@ led_config_t g_led_config = { { #endif +#ifdef AUDIO_ENABLE +void keyboard_pre_init_kb(void) { + // ensure pin is set and enabled pre-audio init + setPinOutput(SPEAKER_SHUTDOWN); + writePinHigh(SPEAKER_SHUTDOWN); + keyboard_pre_init_user(); +} + +void keyboard_post_init_kb(void) { + // set pin based on active status + writePin(SPEAKER_SHUTDOWN, audio_is_on()); + keyboard_post_init_user(); +} + +void audio_on_user(void) { + writePinHigh(SPEAKER_SHUTDOWN); +} + +void audio_off_user(void) { + // needs a delay or it runs right after play note. + wait_ms(200); + writePinLow(SPEAKER_SHUTDOWN); +} +#endif + #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } diff --git a/keyboards/adafruit/macropad/mcuconf.h b/keyboards/adafruit/macropad/mcuconf.h index 198a2eea6973..a833fb2af81f 100644 --- a/keyboards/adafruit/macropad/mcuconf.h +++ b/keyboards/adafruit/macropad/mcuconf.h @@ -20,3 +20,6 @@ #undef RP_SPI_USE_SPI1 #define RP_SPI_USE_SPI1 TRUE + +#undef RP_PWM_USE_PWM0 +#define RP_PWM_USE_PWM0 TRUE diff --git a/keyboards/adafruit/macropad/rules.mk b/keyboards/adafruit/macropad/rules.mk index 0d1e17dde1b6..fd1ecf7cbcd8 100644 --- a/keyboards/adafruit/macropad/rules.mk +++ b/keyboards/adafruit/macropad/rules.mk @@ -9,8 +9,8 @@ COMMAND_ENABLE = no # 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 -# AUDIO_DRIVER = pwm_software +AUDIO_ENABLE = yes # Audio output +AUDIO_DRIVER = pwm_hardware ENCODER_ENABLE = yes RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 diff --git a/keyboards/budgy/config.h b/keyboards/budgy/config.h new file mode 100644 index 000000000000..4543a048be10 --- /dev/null +++ b/keyboards/budgy/config.h @@ -0,0 +1,14 @@ +// Copyright 2022 KeyboardDweebs (@doesntfazer) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U + + +#define SERIAL_USART_FULL_DUPLEX +#define SERIAL_USART_TX_PIN GP1 +#define SERIAL_USART_RX_PIN GP0 + +// #define SERIAL_USART_PIN_SWAP diff --git a/keyboards/budgy/info.json b/keyboards/budgy/info.json new file mode 100644 index 000000000000..631d2be9d1ad --- /dev/null +++ b/keyboards/budgy/info.json @@ -0,0 +1,81 @@ +{ + "manufacturer": "KeyboardDweebs", + "keyboard_name": "budgy", + "maintainer": "doesntfazer", + "bootloader": "rp2040", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "processor": "RP2040", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0117", + "vid": "0xFABE" + }, + "matrix_pins": { + "direct": [ + ["GP6", "GP5", "GP4", "GP3", "GP2"], + ["GP11", "GP10", "GP9", "GP8", "GP7"], + ["GP15", "GP14", "GP13", "GP12", "GP16"], + ["GP17", "GP18", null, null, null] + ] + }, + "split": { + "matrix_pins": { + "right": { + "direct": [ + ["GP2", "GP3", "GP4", "GP5", "GP6"], + ["GP7", "GP8", "GP9", "GP10", "GP11"], + ["GP16", "GP12", "GP13", "GP14", "GP15"], + ["GP18", "GP17", null, null, null] + ] + } + } + }, + "layouts": { + "LAYOUT_split_3x5_2": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0.25 }, + { "matrix": [0, 1], "x": 1, "y": 0.25 }, + { "matrix": [0, 2], "x": 2, "y": 0.125 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0.125 }, + { "matrix": [4, 0], "x": 8, "y": 0.25 }, + { "matrix": [4, 1], "x": 9, "y": 0.125 }, + { "matrix": [4, 2], "x": 10, "y": 0 }, + { "matrix": [4, 3], "x": 11, "y": 0.125 }, + { "matrix": [4, 4], "x": 12, "y": 0.25 }, + { "matrix": [1, 0], "x": 0, "y": 1.25 }, + { "matrix": [1, 1], "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "x": 2, "y": 1.125 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [1, 4], "x": 4, "y": 1.125 }, + { "matrix": [5, 0], "x": 8, "y": 1.25 }, + { "matrix": [5, 1], "x": 9, "y": 1.125 }, + { "matrix": [5, 2], "x": 10, "y": 1 }, + { "matrix": [5, 3], "x": 11, "y": 1.125 }, + { "matrix": [5, 4], "x": 12, "y": 1.25 }, + { "matrix": [2, 0], "x": 0, "y": 2.25 }, + { "matrix": [2, 1], "x": 1, "y": 2.25 }, + { "matrix": [2, 2], "x": 2, "y": 2.125 }, + { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [2, 4], "x": 4, "y": 2.125 }, + { "matrix": [6, 0], "x": 8, "y": 2.25 }, + { "matrix": [6, 1], "x": 9, "y": 2.125 }, + { "matrix": [6, 2], "x": 10, "y": 2 }, + { "matrix": [6, 3], "x": 11, "y": 2.125 }, + { "matrix": [6, 4], "x": 12, "y": 2.25 }, + { "matrix": [3, 0], "x": 3.5, "y": 3.25 }, + { "matrix": [3, 1], "x": 4.5, "y": 3.5 }, + { "matrix": [7, 0], "x": 7.5, "y": 3.75 }, + { "matrix": [7, 1], "x": 8.5, "y": 3.5 } + ] + } + } +} diff --git a/keyboards/budgy/keymaps/default/keymap.c b/keyboards/budgy/keymaps/default/keymap.c new file mode 100644 index 000000000000..3bdf3735989b --- /dev/null +++ b/keyboards/budgy/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +// Copyright 2021 Keyboard Dweebs (@doesntfazer) +// 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 │ , │ . │ / │ + * └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + * ┌───┐ ┌───┐ + * │Bsp├───┐ ┌───┤Ent│ + * └───┤Tab│ │Spc├───┘ + * └───┘ └───┘ + */ + [0] = LAYOUT_split_3x5_2( + 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_BSPC, KC_TAB, KC_SPC, KC_ENT + ) +}; diff --git a/keyboards/budgy/readme.md b/keyboards/budgy/readme.md new file mode 100644 index 000000000000..a164a87acfc3 --- /dev/null +++ b/keyboards/budgy/readme.md @@ -0,0 +1,27 @@ +# budgy + +![budgy](https://i.imgur.com/6kjxmSMh.jpeg) + +34 key, diodeless, RP2040 based, budget keyboard. + +* Keyboard Maintainer: [KeyboardDweebs](https://github.com/doesntfazer) +* Hardware Supported: Raspberry Pi Pico +* Hardware Availability: [Github Page](https://github.com/doesntfazer/Budgy) Buy Directly from [Keyboard Dweebs](https://keyboarddweebs.net/) + +Make example for this keyboard (after setting up your build environment): + + make budgy:default + +Flashing example for this keyboard: + + make budgy: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/budgy/rules.mk b/keyboards/budgy/rules.mk new file mode 100644 index 000000000000..95546c6ef58a --- /dev/null +++ b/keyboards/budgy/rules.mk @@ -0,0 +1,2 @@ +SPLIT_KEYBOARD = yes +SERIAL_DRIVER = vendor diff --git a/keyboards/crowboard/info.json b/keyboards/crowboard/info.json new file mode 100644 index 000000000000..7744907fa73a --- /dev/null +++ b/keyboards/crowboard/info.json @@ -0,0 +1,66 @@ +{ + "manufacturer": "KeyboardDweebs", + "keyboard_name": "crowboard", + "maintainer": "doesntfazer", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["GP6", "GP7", "GP8", "GP9", "GP10", "GP18", "GP19", "GP20", "GP21", "GP22"], + "rows": ["GP14", "GP15", "GP16", "GP17"] + }, + "processor": "RP2040", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "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": [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": [1, 6], "x": 6, "y": 1 }, + { "matrix": [1, 7], "x": 7, "y": 1 }, + { "matrix": [1, 8], "x": 8, "y": 1 }, + { "matrix": [1, 9], "x": 9, "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": [2, 6], "x": 6, "y": 2 }, + { "matrix": [2, 7], "x": 7, "y": 2 }, + { "matrix": [2, 8], "x": 8, "y": 2 }, + { "matrix": [2, 9], "x": 9, "y": 2 }, + { "matrix": [3, 2], "x": 2, "y": 3 }, + { "matrix": [3, 3], "x": 3, "y": 3 }, + { "matrix": [3, 4], "x": 4, "y": 3 }, + { "matrix": [3, 5], "x": 5, "y": 3 }, + { "matrix": [3, 6], "x": 6, "y": 3 }, + { "matrix": [3, 7], "x": 7, "y": 3 } + ] + } + } +} diff --git a/keyboards/crowboard/keymaps/default/config.h b/keyboards/crowboard/keymaps/default/config.h new file mode 100644 index 000000000000..a50d8483dc6c --- /dev/null +++ b/keyboards/crowboard/keymaps/default/config.h @@ -0,0 +1,6 @@ +// Copyright 2022 doesntfazer (@doesntfazer) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY diff --git a/keyboards/crowboard/keymaps/default/keymap.c b/keyboards/crowboard/keymaps/default/keymap.c new file mode 100644 index 000000000000..f6d51dc37c5d --- /dev/null +++ b/keyboards/crowboard/keymaps/default/keymap.c @@ -0,0 +1,60 @@ +// Copyright 2021 Keyboard Dweebs (@doesntfazer) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +#define CTLA LCTL(KC_A) +#define CAE LCTL(LALT(KC_END)) +#define CAD LCTL(LALT(KC_DEL)) + +enum crow_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT ( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + LCTL_T(KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, + LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), + KC_LCTL, TL_LOWR, KC_SPACE, KC_BSPC, TL_UPPR, KC_RALT + ), + + [_LOWER] = LAYOUT ( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_MINUS, KC_EQUAL, KC_LBRC, KC_RBRC, + KC_LCTL, KC_GRAVE, KC_LGUI, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_SCLN, + KC_TRNS, TL_LOWR, KC_TRNS, KC_ENTER, TL_UPPR, KC_TRNS + ), + [_RAISE] = LAYOUT ( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_ESC, KC_DEL, CTLA, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, + KC_CAPS, KC_TILDE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PIPE, KC_COLN, + KC_TRNS, TL_LOWR, KC_TRNS, KC_TRNS, TL_UPPR, KC_TRNS + ), + [_ADJUST] = 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CAD, CAE, CAD, CAD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + + +bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LCTL_T(KC_A): + // Do not force the mod-tap key press to be handled as a modifier + // if any other key was pressed while the mod-tap key is held down. + return false; + default: + // Force the mod-tap key press to be handled as a modifier if any + // other key was pressed while the mod-tap key is held down. + return true; + } +} + + + diff --git a/keyboards/crowboard/keymaps/default/rules.mk b/keyboards/crowboard/keymaps/default/rules.mk new file mode 100644 index 000000000000..7c9bf212a6f5 --- /dev/null +++ b/keyboards/crowboard/keymaps/default/rules.mk @@ -0,0 +1 @@ +TRI_LAYER_ENABLE = yes diff --git a/keyboards/crowboard/readme.md b/keyboards/crowboard/readme.md new file mode 100644 index 000000000000..4603562626f7 --- /dev/null +++ b/keyboards/crowboard/readme.md @@ -0,0 +1,28 @@ +# crowboard + +![crowboard](https://i.imgur.com/Rg7IYPwh.jpg) + +RP2040 based 36 key keyboard + +* Keyboard Maintainer: [doesntfazer](https://github.com/doesntfazer) +* Hardware Supported: Raspberry Pi Pico +* Hardware Availability: keyboarddweebs.net + +## Bootloader + +Enter the bootloader in 2 ways: + +* **Physical reset button**: Hold the button down on the raspberry pi pico while plugging it in. There is no reset button on the pcb. +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available + +Make example for this keyboard (after setting up your build environment): + + make crowboard:default + +Flashing example for this keyboard: + + make crowboard: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). + + diff --git a/keyboards/crowboard/rules.mk b/keyboards/crowboard/rules.mk new file mode 100644 index 000000000000..37ad1d4c6070 --- /dev/null +++ b/keyboards/crowboard/rules.mk @@ -0,0 +1 @@ +PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS! diff --git a/keyboards/evyd13/atom47/keymaps/phsc138/config.h b/keyboards/evyd13/atom47/keymaps/phsc138/config.h new file mode 100644 index 000000000000..ccd556b90d9a --- /dev/null +++ b/keyboards/evyd13/atom47/keymaps/phsc138/config.h @@ -0,0 +1,17 @@ +/* Copyright 2022 PHSC138 + * + * 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 TAPPING_TERM 150 // Tap dance time limit diff --git a/keyboards/evyd13/atom47/keymaps/phsc138/keymap.c b/keyboards/evyd13/atom47/keymaps/phsc138/keymap.c new file mode 100644 index 000000000000..f9fec678cdab --- /dev/null +++ b/keyboards/evyd13/atom47/keymaps/phsc138/keymap.c @@ -0,0 +1,390 @@ +/* Copyright 2022 PHSC138 + * + * 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 + +// These are all aliases for the function layers. +enum custom_layers { + _BASE, + _PROG, + _GAME, + _FN, + _FN1, + _NUM +}; + + +// Tap Dance +typedef struct { + char is_press_action; + int state; +} tap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5, // Send two single taps + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7 +}; + +// Tap dance enums +enum { + PN_SWAP = 0, + LAPO = 1, + LCPO = 2, + RAPC = 3, + RCPC = 4, + D20 = 5 +}; + +enum custom_keycodes { + PROF_MAC = QK_USER +}; + + +uint8_t cur_dance (tap_dance_state_t *state); +void pn_finished (tap_dance_state_t *state, void *user_data); +void pn_reset (tap_dance_state_t *state, void *user_data); + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// TREE: 'pn' to enter custom layers: + // _BASE + // _FN + // _FN1 + // _NUM + // _PROG + // _PROG + // _FN + // _FN1 + // _NUM + // _GAME + // _GAME + // _BASE + +// Tap pn for toggle to _PROG, or hold for numpad +[_BASE] = LAYOUT_split_space( + QK_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(_FN1), + KC_LCTL, KC_LGUI, KC_LALT, TD(PN_SWAP), KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_APP, KC_RCTL), + + +// LEFT AND RIGHT SHIFT: '(' and ')' when tapped, shift when held +// LEFT AND RIGHT CTRL: '{' and '}' when tapped, ctrl when held +// LEFT AND RIGHT ALT: '[' and ']' when tapped, ctrl when held +[_PROG] = LAYOUT_split_space( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + SC_LSPO, _______, _______, _______, _______, _______, _______, _______, _______, _______, SC_RSPC, _______, + TD(LCPO), _______, TD(LAPO), TO(_GAME), _______, _______, _______, TD(RAPC), _______, TD(RCPC)), + + +// Macro for right space is bhop +// Maco for 'fn' is move forward +// Macro for 'fn1' is spin constantly +// Macro for right shift is D20 +[_GAME] = LAYOUT_split_space( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TD(D20), XXXXXXX, + _______, _______, _______, TO(_BASE), _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______), + + +[_FN] = LAYOUT_split_space( + _______, KC_VOLD, KC_VOLU, KC_MUTE, QK_RBT, _______, KC_CALC, KC_PGUP, _______, KC_PGDN, KC_PSCR, KC_SCRL, KC_PAUS, + KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_INS, _______, + _______, _______, _______, _______, _______, KC_HOME, KC_END, BL_TOGG, BL_DOWN, BL_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + +[_FN1] = LAYOUT_split_space( + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + _______, _______, _______, _______, _______, KC_QUOT, KC_SLSH, KC_LBRC, KC_RBRC, KC_BSLS, KC_RSFT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + +[_NUM] = LAYOUT_split_space( + _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, PROF_MAC, _______, _______, + _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, + _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_DOT, _______, _______, _______, + _______, _______, _______, _______, _______, KC_0, _______, _______, DB_TOGG, QK_BOOT), +}; + + +/*--- Profile Macro ---*/ +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case PROF_MAC: + if (record->event.pressed) { + // When keycode PROF_MAC is pressed + SEND_STRING("if [ $shell = 'zsh' ]; then echo \"echo \"Lock your computer -PHSC138\"\" >> ~/.zshrc\nclear; else echo \"echo \"Lock your computer -PHSC138\"\" >> ~/.profile\nclear; fi\n"); + } else { + // When keycode QMKBEST is released + } + break; + } + return true; +}; +/*--- End Profile Macro ---*/ + +/* Return an integer that corresponds to what kind of tap dance should be executed. + * + * How to figure out tap dance state: interrupted and pressed. + * + * Interrupted: If the state of a dance dance is "interrupted", that means that another key has been hit + * under the tapping term. This is typically indicitive that you are trying to "tap" the key. + * + * Pressed: Whether or not the key is still being pressed. If this value is true, that means the tapping term + * has ended, but the key is still being pressed down. This generally means the key is being "held". + * + * One thing that is currenlty not possible with qmk software in regards to tap dance is to mimic the "permissive hold" + * feature. In general, advanced tap dances do not work well if they are used with commonly typed letters. + * For example "A". Tap dances are best used on non-letter keys that are not hit while typing letters. + * + * Good places to put an advanced tap dance: + * z,q,x,j,k,v,b, any function key, home/end, comma, semi-colon + * + * Criteria for "good placement" of a tap dance key: + * Not a key that is hit frequently in a sentence + * Not a key that is used frequently to double tap, for example 'tab' is often double tapped in a terminal, or + * in a web form. So 'tab' would be a poor choice for a tap dance. + * Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the + * letter 'p', the word 'pepper' would be quite frustating to type. + * + * For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested + * + */ +uint8_t cur_dance(tap_dance_state_t *state) { + if(state->count == 1) { + if(state->interrupted || !state->pressed) return SINGLE_TAP; + //key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'. + else return SINGLE_HOLD; + } else if(state->count == 2) { + /* + * DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap + * action when hitting 'pp'. Suggested use case for this return value is when you want to send two + * keystrokes of the key, and not the 'double tap' action/macro. + */ + if(state->interrupted) return DOUBLE_SINGLE_TAP; + else if(state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + //Assumes no one is trying to type the same letter three times (at least not quickly). + //If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add + //an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP' + if(state->count == 3) { + if(state->interrupted || !state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return 8; //magic number. At some point this method will expand to work for more presses +} + +//instanalize an instance of 'tap' for the 'pn' tap dance. +static tap pn_tap_state = { + .is_press_action = 1, + .state = 0 +}; + +void pn_finished(tap_dance_state_t *state, void *user_data) { + pn_tap_state.state = cur_dance(state); + switch(pn_tap_state.state) { + case SINGLE_TAP: layer_on(_PROG); break; + case SINGLE_HOLD: layer_on(_NUM); break; + //case DOUBLE_TAP: register_code(KC_ESC); break; + //case DOUBLE_HOLD: register_code(KC_LALT); break; + //case DOUBLE_SINGLE_TAP: register_code(KC_X); unregister_code(KC_X); register_code(KC_X); + //Last case is for fast typing. Assuming your key is `f`: + //For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`. + //In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms. + } +} + +void pn_reset(tap_dance_state_t *state, void *user_data) { + switch(pn_tap_state.state) { + //case SINGLE_TAP: unregister_code(KC_X); break; + case SINGLE_HOLD: layer_off(_NUM); break; + //case DOUBLE_TAP: unregister_code(KC_ESC); break; + //case DOUBLE_HOLD: unregister_code(KC_LALT); + //case DOUBLE_SINGLE_TAP: unregister_code(KC_X); + } + pn_tap_state.state = 0; +} + +static tap lalt_tap_state = { + .is_press_action = 1, + .state = 0 +}; + +void lalt_finished(tap_dance_state_t *state, void *user_data) { + lalt_tap_state.state = cur_dance(state); + switch(lalt_tap_state.state) { + case SINGLE_TAP: register_code(KC_LBRC); break; + case SINGLE_HOLD: register_code(KC_LALT); break; + } +} + +void lalt_reset(tap_dance_state_t *state, void *user_data) { + switch(lalt_tap_state.state) { + case SINGLE_TAP: unregister_code(KC_LBRC); break; + case SINGLE_HOLD: unregister_code(KC_LALT); break; + } + lalt_tap_state.state = 0; +} + +static tap ralt_tap_state = { + .is_press_action = 1, + .state = 0 +}; + +void ralt_finished(tap_dance_state_t *state, void *user_data) { + ralt_tap_state.state = cur_dance(state); + switch(ralt_tap_state.state) { + case SINGLE_TAP: register_code(KC_RBRC); break; + case SINGLE_HOLD: register_code(KC_RALT); break; + } +} + +void ralt_reset(tap_dance_state_t *state, void *user_data) { + switch(ralt_tap_state.state) { + case SINGLE_TAP: unregister_code(KC_RBRC); break; + case SINGLE_HOLD: unregister_code(KC_RALT); break; + } + ralt_tap_state.state = 0; +} + +static tap rctl_tap_state = { + .is_press_action = 1, + .state = 0 +}; + +void rctl_finished(tap_dance_state_t *state, void *user_data) { + rctl_tap_state.state = cur_dance(state); + switch(rctl_tap_state.state) { + case SINGLE_TAP: register_code(KC_RSFT); register_code(KC_RBRC); break; + case SINGLE_HOLD: register_code(KC_RCTL); break; + } +} + +void rctl_reset(tap_dance_state_t *state, void *user_data) { + switch(rctl_tap_state.state) { + case SINGLE_TAP: unregister_code(KC_RSFT); unregister_code(KC_RBRC); break; + case SINGLE_HOLD: unregister_code(KC_RCTL); break; + } + rctl_tap_state.state = 0; +} + +static tap lctl_tap_state = { + .is_press_action = 1, + .state = 0 +}; + +void lctl_finished(tap_dance_state_t *state, void *user_data) { + lctl_tap_state.state = cur_dance(state); + switch(lctl_tap_state.state) { + case SINGLE_TAP: register_code(KC_LSFT); register_code(KC_LBRC); break; + case SINGLE_HOLD: register_code(KC_LCTL); break; + } +} + +void lctl_reset(tap_dance_state_t *state, void *user_data) { + switch(lctl_tap_state.state) { + case SINGLE_TAP: unregister_code(KC_LSFT); unregister_code(KC_LBRC); break; + case SINGLE_HOLD: unregister_code(KC_LCTL); break; + } + lctl_tap_state.state = 0; +} + +static tap d20_tap_state = { + .is_press_action = 1, + .state = 0, +}; + +int d20_srand = 0; +uint32_t timer_seed; + +void d20_finished(tap_dance_state_t *state, void *user_data) { + d20_tap_state.state = cur_dance(state); + switch(d20_tap_state.state) { + case SINGLE_HOLD: { + if(d20_srand == 0){ + timer_seed = timer_read32(); + srand((unsigned int)timer_seed); + d20_srand = 1; + } + + SEND_STRING("Seed: "); + // uint32_t has max size of 4294967296 + char SEED_STR_SIZE = 16; + // Initialize seed_str + char seed_str[SEED_STR_SIZE]; + for (int iter=0;iter < SEED_STR_SIZE;iter++) seed_str[iter] = 0; + + int i = SEED_STR_SIZE - 2; // Leave null byte on end of string + while (timer_seed && i >= 0) { + seed_str[i] = timer_seed % 10 + '0'; + timer_seed /= 10; + i -= 1; + } + i++; + + // Move all characters over i spaces + char move = i; + while (i < SEED_STR_SIZE -1) { + seed_str[i-move] = seed_str[i]; + seed_str[i] = 0; + i += 1; + } + + send_string(seed_str); + break; + // Else allow fall through + } + case SINGLE_TAP: { + if(d20_srand == 0){ + timer_seed = timer_read(); + srand((unsigned int)timer_seed); + d20_srand = 1; + } + + unsigned char roll = rand() % 20 + 1; + char res[3]; + res[0] = (char)((char)(roll / 10) + '0'); + res[1] = (char)(roll % 10 + '0'); + + send_string(res); + + break; + } + } +} + +void d20_reset(tap_dance_state_t *state, void *user_data) { + d20_tap_state.state = 0; +} + +tap_dance_action_t tap_dance_actions[] = { + [PN_SWAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, pn_finished, pn_reset), + [LAPO] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lalt_finished, lalt_reset), + [RAPC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ralt_finished, ralt_reset), + [LCPO] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lctl_finished, lctl_reset), + [RCPC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rctl_finished, rctl_reset), + [D20] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, d20_finished, d20_reset), +}; diff --git a/keyboards/evyd13/atom47/keymaps/phsc138/readme.md b/keyboards/evyd13/atom47/keymaps/phsc138/readme.md new file mode 100644 index 000000000000..6817befa8e7d --- /dev/null +++ b/keyboards/evyd13/atom47/keymaps/phsc138/readme.md @@ -0,0 +1,18 @@ +# PHSC138's Layout for the atom47 +## Base layer +The base layer is a standard vortex core layout + +## Layer 1 (PROG) +This layer contains space cadet bindings to make programming easier. Ex: tapping left shift will input an open parenthesis + +## Layer 2 (GAME) +This layer contains game specific macros, currently only a D20 has been implemented + +## Layer 3 (FN) +This can be activated by pressing the `fn` key. This layer contains mostly the same bindings as the base vortex core except vim keybinds have replaced the arrow keys. + +## Layer 4 (FN1) +This can be activated by pressing the `fn1` key. This is the default vortex core layer. + +## Layer 5 (NUM) +This is a numpad that can be activated by holding the PN key. This also has some useful keys, such as `QC_BOOT`. diff --git a/keyboards/evyd13/atom47/keymaps/phsc138/rules.mk b/keyboards/evyd13/atom47/keymaps/phsc138/rules.mk new file mode 100644 index 000000000000..c6a2d559888e --- /dev/null +++ b/keyboards/evyd13/atom47/keymaps/phsc138/rules.mk @@ -0,0 +1,3 @@ +MOUSEKEY_ENABLE = no +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/keyboards/hineybush/h87_g2/info.json b/keyboards/hineybush/h87_g2/info.json index 2868e6cffbb3..f38dc302ef44 100644 --- a/keyboards/hineybush/h87_g2/info.json +++ b/keyboards/hineybush/h87_g2/info.json @@ -21,7 +21,7 @@ "usb": { "device_version": "1.0.0", "pid": "0x0001", - "vid": "0x4048" + "vid": "0x4069" }, "layouts": { "LAYOUT": { diff --git a/keyboards/junco/info.json b/keyboards/junco/info.json new file mode 100644 index 000000000000..72e0d5c92a55 --- /dev/null +++ b/keyboards/junco/info.json @@ -0,0 +1,107 @@ +{ + "manufacturer": "Dane Skalski", + "keyboard_name": "Junco", + "url": "https://github.com/Daneski13/Junco", + "maintainer": "Daneski13", + "usb": { + "vid": "0x4413", + "pid": "0x4A13", + "device_version": "1.0.0" + }, + "processor": "RP2040", + "bootloader": "rp2040", + "layouts": { + "LAYOUT_split4x6_r1": { + "layout": [ + { "label": "`", "matrix": [0, 0], "x": 0, "y": 0.7 }, + { "label": "1", "matrix": [0, 1], "x": 1, "y": 0.7 }, + { "label": "2", "matrix": [0, 2], "x": 2, "y": 0.3 }, + { "label": "3", "matrix": [0, 3], "x": 3, "y": 0 }, + { "label": "4", "matrix": [0, 4], "x": 4, "y": 0.3 }, + { "label": "5", "matrix": [0, 5], "x": 5, "y": 0.45 }, + { "label": "6", "matrix": [5, 5], "x": 9, "y": 0.45 }, + { "label": "7", "matrix": [5, 4], "x": 10, "y": 0.3 }, + { "label": "8", "matrix": [5, 3], "x": 11, "y": 0 }, + { "label": "9", "matrix": [5, 2], "x": 12, "y": 0.3 }, + { "label": "0", "matrix": [5, 1], "x": 13, "y": 0.7 }, + { "label": "-", "matrix": [5, 0], "x": 14, "y": 0.7 }, + + { "label": "Tab", "matrix": [1, 0], "x": 0, "y": 1.7 }, + { "label": "Q", "matrix": [1, 1], "x": 1, "y": 1.7 }, + { "label": "W", "matrix": [1, 2], "x": 2, "y": 1.3 }, + { "label": "E", "matrix": [1, 3], "x": 3, "y": 1 }, + { "label": "R", "matrix": [1, 4], "x": 4, "y": 1.3 }, + { "label": "T", "matrix": [1, 5], "x": 5, "y": 1.45 }, + { "label": "Y", "matrix": [6, 5], "x": 9, "y": 1.45 }, + { "label": "U", "matrix": [6, 4], "x": 10, "y": 1.3 }, + { "label": "I", "matrix": [6, 3], "x": 11, "y": 1 }, + { "label": "O", "matrix": [6, 2], "x": 12, "y": 1.3 }, + { "label": "P", "matrix": [6, 1], "x": 13, "y": 1.7 }, + { "label": "Enter", "matrix": [6, 0], "x": 14, "y": 1.7 }, + + { "label": "Esc", "matrix": [2, 0], "x": 0, "y": 2.7 }, + { "label": "A", "matrix": [2, 1], "x": 1, "y": 2.7 }, + { "label": "S", "matrix": [2, 2], "x": 2, "y": 2.3 }, + { "label": "D", "matrix": [2, 3], "x": 3, "y": 2 }, + { "label": "F", "matrix": [2, 4], "x": 4, "y": 2.3 }, + { "label": "G", "matrix": [2, 5], "x": 5, "y": 2.45 }, + { "label": "H", "matrix": [7, 5], "x": 9, "y": 2.45 }, + { "label": "J", "matrix": [7, 4], "x": 10, "y": 2.3 }, + { "label": "K", "matrix": [7, 3], "x": 11, "y": 2 }, + { "label": "L", "matrix": [7, 2], "x": 12, "y": 2.3 }, + { "label": ";", "matrix": [7, 1], "x": 13, "y": 2.7 }, + { "label": "'", "matrix": [7, 0], "x": 14, "y": 2.7 }, + + { "label": "Shift", "matrix": [3, 0], "x": 0, "y": 3.7 }, + { "label": "Z", "matrix": [3, 1], "x": 1, "y": 3.7 }, + { "label": "X", "matrix": [3, 2], "x": 2, "y": 3.3 }, + { "label": "C", "matrix": [3, 3], "x": 3, "y": 3 }, + { "label": "V", "matrix": [3, 4], "x": 4, "y": 3.3 }, + { "label": "B", "matrix": [3, 5], "x": 5, "y": 3.45 }, + { "label": "Mute", "matrix": [4, 5], "x": 6.2, "y": 3.45 }, + { "label": "XXX", "matrix": [9, 5], "x": 7.8, "y": 3.45 }, + { "label": "N", "matrix": [8, 5], "x": 9, "y": 3.45 }, + { "label": "M", "matrix": [8, 4], "x": 10, "y": 3.3 }, + { "label": ",", "matrix": [8, 3], "x": 11, "y": 3 }, + { "label": ".", "matrix": [8, 2], "x": 12, "y": 3.3 }, + { "label": "/", "matrix": [8, 1], "x": 13, "y": 3.7 }, + { "label": "Shift", "matrix": [8, 0], "x": 14, "y": 3.7 }, + + { "label": "Ctrl", "matrix": [4, 0], "x": 2, "y": 4.3 }, + { "label": "Win", "matrix": [4, 1], "x": 3, "y": 4 }, + { "label": "Alt", "matrix": [4, 2], "x": 4, "y": 4.3 }, + { + "label": "Del", + "matrix": [4, 3], + "x": 5.1, + "y": 4.5, + "h": 1.5 + }, + { + "label": "Spc", + "matrix": [4, 4], + "x": 6.1, + "y": 4.5, + "h": 1.5 + }, + { + "label": "Shift", + "matrix": [9, 3], + "x": 7.9, + "y": 4.5, + "h": 1.5 + }, + { + "label": "Bspc", + "matrix": [9, 4], + "x": 8.9, + "y": 4.5, + "h": 1.5 + }, + { "label": "Alt", "matrix": [9, 2], "x": 10, "y": 4.3 }, + { "label": "Win", "matrix": [9, 1], "x": 11, "y": 4 }, + { "label": "Ctrl", "matrix": [9, 0], "x": 12, "y": 4.3 } + ] + } + } +} diff --git a/keyboards/junco/keymaps/default/config.h b/keyboards/junco/keymaps/default/config.h new file mode 100644 index 000000000000..43c47b9122a1 --- /dev/null +++ b/keyboards/junco/keymaps/default/config.h @@ -0,0 +1,38 @@ +// Copyright 2022 Dane Skalski (@Daneski13) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* - Encoder settings - */ +#ifdef ENCODER_ENABLE +# define ENCODER_RESOLUTION 4 +#endif +#ifdef ENCODER_MAP_ENABLE +// Key delay for encoders (necessary for some keycodes) +# define ENCODER_MAP_KEY_DELAY 10 +#endif + +/* + - RGB Stuff - + All effects can be found in the QMK docs: + https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +*/ +#ifdef RGB_MATRIX_ENABLE + +// Default effect when EEPROM cleared +# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_RAINBOW_MOVING_CHEVRON + +// Turns off RGB effects when there is no longer a USB connection +# define RGB_DISABLE_WHEN_USB_SUSPENDED + +// Key press reactive animations +# define SPLIT_TRANSPORT_MIRROR // Necessary setting for key press animations +# define RGB_MATRIX_KEYPRESSES // Enables key press effects +# define ENABLE_RGB_MATRIX_MULTISPLASH + +// Normal effects +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_PIXEL_RAIN + +#endif diff --git a/keyboards/junco/keymaps/default/keymap.c b/keyboards/junco/keymaps/default/keymap.c new file mode 100644 index 000000000000..dc607477e2fe --- /dev/null +++ b/keyboards/junco/keymaps/default/keymap.c @@ -0,0 +1,161 @@ +// Copyright 2022 Dane Skalski (@Daneski13) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +// Layers enum +enum junco_layers { _QWERTY, _COLEMAK_DH, _SYMB, _EXT, _ADJUST }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + /* + Traditional QWERTY + ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ + │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Tab│ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │Ent│ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Esc│ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ + ├───┼───┼───┼───┼───┼───┼───┐ ┌───┼───┼───┼───┼───┼───┼───┤ + │Sft│ Z │ X │ C │ V │ B │Mut│ │XXX│ N │ M │ , │ . │ / │Sft│ + └───┴───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┴───┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │Ctr│Win│Alt│Del│Spc│ │Sft│Bsp│Alt│Win│Ctr│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + For macOS - GUI (cmd) and Alt (opt) swapped + */ + [_QWERTY] = LAYOUT_split4x6_r1( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENTER, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SEMICOLON, KC_QUOTE, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, LT(_EXT, KC_DEL), KC_SPC, KC_RSFT, LT(_SYMB, KC_BSPC), KC_RALT, KC_RGUI, KC_RCTL + ), + + /* + Colemak-DH + ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ + │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Tab│ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ ; │Ent│ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Esc│ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │ ' │ + ├───┼───┼───┼───┼───┼───┼───┐ ┌───┼───┼───┼───┼───┼───┼───┤ + │Sft│ Z │ X │ C │ D │ V │Mut│ │XXX│ K │ H │ , │ . │ / │Sft│ + └───┴───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┴───┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │Ctr│Win│Alt│Del│Spc│ │Sft│Bsp│Alt│Win│Ctr│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + For macOS - GUI (cmd) and Alt (opt) swapped + */ + [_COLEMAK_DH] = LAYOUT_split4x6_r1( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SEMICOLON, KC_ENTER, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOTE, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_MUTE, KC_NO, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, LT(_EXT, KC_DEL), KC_SPC, KC_RSFT, LT(_SYMB, KC_BSPC), KC_RALT, KC_RGUI, KC_RCTL + ), + + /* + Symbols/Numpad Layer + ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ + │F1 │F2 │F3 │F4 │F5 │F6 │ │F7 │F8 │F9 │F10│F11│F12│ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Tab│ ! │ @ │ # │ $ │ % │ │ * │ 7 │ 8 │ 9 │ + │Ent│ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │ \ │ _ │ [ │ { │ ( │ ^ │ │ = │ 4 │ 5 │ 6 │ 0 │NUM│ + ├───┼───┼───┼───┼───┼───┼───┐ ┌───┼───┼───┼───┼───┼───┼───┤ + │___│ | │ ] │ } │ ) │ & │___│ │___│ / │ 1 │ 2 │ 3 │ - │___│ + └───┴───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┴───┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │___│___│___│___│___│ │___│___│___│___│___│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + */ + [_SYMB] = LAYOUT_split4x6_r1( + 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_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PAST, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_ENTER, + KC_BSLS, KC_UNDS, KC_LBRC, KC_LCBR, KC_LPRN, KC_CIRC, KC_PEQL, KC_P4, KC_P5, KC_P6, KC_P0, KC_NUM, + _______, KC_PIPE, KC_RBRC, KC_RCBR, KC_RPRN, KC_AMPR, _______, _______, KC_PSLS, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, + _______, _______, _______, MO(_ADJUST), _______, _______, _______, _______, _______, _______ + ), + + /* + Extension/Function Layer + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10│ F11│ F12│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ ⇤ │PGUP│End │ ↑ │Home│ │ │BRIU│ F7 │ F8 │ F9 │ F10│____│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │Cps │PGDN│ ← │ ↓ │ → │ │ │BRID│ F4 │ F5 │ F6 │ F11│____│ + ├────┼────┼────┼────┼────┼────┼────┐ ┌────┼────┼────┼────┼────┼────┼────┤ + │____│ │ │ │ │ │____│ │ ▶⏸ │ │ F1 │ F2 │ F3 │ F12│____│ + └────┴────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┴────┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │___│___│___│___│___│ │___│___│___│___│___│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + */ + [_EXT] = LAYOUT_split4x6_r1( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + S(KC_TAB), KC_PGUP, KC_END, KC_UP, KC_HOME, _______, KC_BRIU, KC_F7, KC_F8, KC_F9, KC_F10, _______, + KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT, _______, KC_BRID, KC_F4, KC_F5, KC_F6, KC_F11, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_F1, KC_F2, KC_F3, KC_F12, _______, + _______, _______, _______, _______, _______, _______, MO(_ADJUST), _______, _______, _______ + ), + + /* + Adjust Layer, Keyboard Settings + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │SpdU│HueU│SatU│ValU│Rnxt│ │ │ │EClr│Rbt │DBUG│BOOT│ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │SpdD│HueD│SatD│ValD│Rprv│RTgl│ │ │QWRT│COLE│ │ │ │ + ├────┼────┼────┼────┼────┼────┼────┐ ┌────┼────┼────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┴────┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │___│___│___│___│___│ │___│___│___│___│___│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + */ + [_ADJUST] = LAYOUT_split4x6_r1( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, KC_NO, KC_NO, EE_CLR, QK_RBT, DB_TOGG, QK_BOOT, KC_NO, + RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, RGB_TOG, KC_NO, DF(_QWERTY), DF(_COLEMAK_DH), 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, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + // clang-format on +}; + +/* + --- Rotary Encoder Mappings --- + + Encoder mappings go from leftmost encoder to rightmost encoder on the physical board. + index 0 is the the optional leftmost encoder on the left half, index 1 is the right encoder + on the left half (by the thumb keys), index 2 is the left encoder on the right half (by the + thumb keys), and index 3 is the optional rightmost encoder on the right half. + + If you are only using the 2 required encoders by the thumb keys, you only need to worry about + index 1 and index 2. + + Note that the keycode for counter-clockwise rotation (CCW) goes first and then the key for + clockwise (CW) within ENCODER_CCW_CW. +*/ +#ifdef ENCODER_MAP_ENABLE +// clang-format off + +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + // Base layer encoder mappings: + // index 0: mouse wheel up (CCW)/down (CW) index 1: volume down/up index 2: mouse wheel up/down index 3: mouse wheel left/right + [_QWERTY] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_WH_L, KC_WH_R) }, + [_COLEMAK_DH] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + + // Passes through to base layers + [_SYMB] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + // On the extension layer, the right side's left encoder by the thumb keys (mouse wheel up/down) is traded for media previous/next + [_EXT] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + // Passes through + [_ADJUST] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + // clang-format on +}; + +#endif diff --git a/keyboards/junco/keymaps/default/readme.md b/keyboards/junco/keymaps/default/readme.md new file mode 100644 index 000000000000..e37bf97ac7f5 --- /dev/null +++ b/keyboards/junco/keymaps/default/readme.md @@ -0,0 +1,57 @@ +# Default Junco Keymap + +This is the default layout for Junco. For the most part it's a normal QWERTY layout. The exceptions being the thumb keys, rotary encoders, and lack of caps lock (which is replaced by escape). + +One of the biggest features of QMK is it brings layers into the mix which can give you access to even more keys. There are 4 layers: the default/base layer (QWERTY), a symbol layer, an extension layer, and an adjust layer. + +Layers are very similar to Shift on a normal keyboard, where "a" becomes "A" when holding down shift. With a custom layer, you can have "j" become "4" for example and make an entire side of the keyboard become a number pad. + +The [symbol layer](#symbol-layer) is accessed by holding down backspace, the [extension layer](#extension-layer) is accessed by holding down delete, and the [adjust layer](#adjust-layer) is accessed by holding down both delete and backspace. + +## Default Base Layer (QWERTY) + +Grey keys are rotary encoders (the ones on far left and far right are optional). Middle legend is pressing down the encoder, bottom left legend is counter-clockwise turn, and bottom right legend is clockwise turn of the encoder. + +Those arrows for the bottom legends on the encoders are mouse scroll directions. + +Red legends are the layer activated by holding down a key. + +![Junco's QWERTY Layout](https://i.imgur.com/fXGt5Jh.png) + +## Symbol Layer + +This layer is accessed by holding down backspace on the base layer, thus that key is blacked out. + +On the symbol layer, the right side is a number pad, and the left side contains all the typical symbols (geared for programming). + +Holding down delete within the symbol layer will take you to the adjust layer. + +![Junco's Symbol Layer](https://i.imgur.com/6F35Z4Wh.png) + +## Extension Layer + +This layer's theme is navigation/extras, its accessed by holding down delete on the base layer, thus that key is blacked out. + +On the extension layer, the right side is the function keys in a number-pad-esque layout with screen brightness up/down, and the left side has navigation keys and caps lock. Also, the rotary on the right side encoder becomes media controls. + +Holding down backspace within the extension layer will take you to the adjust layer. + +![Junco's Extension Layer](https://i.imgur.com/FETcqkCh.png) + +## Adjust Layer + +This layer's theme is adjusting the keyboard's settings, it's accessed by holding down both delete and backspace on the base layer. + +On the adjust layer, the right side is the keyboard's settings: clear data, reboot, toggle debug mode, enter the bootloader, and change the base layer between QWERTY and [Colemak-DH](#colemak-dh). The left side adjusts the RGB lighting. + +![Junco's Adjust Layer](https://i.imgur.com/fRsdlt3h.png) + +## Colemak-DH + +This keymap offers Colemak-DH as an alternative base layer to QWERTY. + +QWERTY is default when flashing your keyboard, but you can change it to Colemak-DH by selecting it's key on the adjust layer. + +If you've never heard of it, Colemak is a keyboard layout that was designed to be a more ergonomic, modern, efficient, and comfortable replacement to QWERTY. Colemak was designed to place the most common letters in english on the home row along with many of the most common bigrams together (two letters typed in a row). Colemak-DH is a variant of Colemak that moves D and H to beneath the index fingers rather than the home row since most people find it easier and faster to reach the keys that way rather than the middle of the home row. + +![Junco's Colemak-DH Layout](https://i.imgur.com/8biZfn2h.png) diff --git a/keyboards/junco/keymaps/default/rules.mk b/keyboards/junco/keymaps/default/rules.mk new file mode 100644 index 000000000000..2304032cba58 --- /dev/null +++ b/keyboards/junco/keymaps/default/rules.mk @@ -0,0 +1,16 @@ +# Change from yes to no to disable features + +# Enables Audio control and System control Keycodes +EXTRAKEY_ENABLE = yes +# Enables Mousekeys +MOUSEKEY_ENABLE = yes +# Encoder Support +ENCODER_ENABLE = yes +# Use Enocoder Mapping +ENCODER_MAP_ENABLE = yes + +# Enables RGB Lighting Effects +RGB_MATRIX_ENABLE = yes + +# Allows use of `qmk console` for debugging +CONSOLE_ENABLE = yes diff --git a/keyboards/junco/keymaps/deluxe/config.h b/keyboards/junco/keymaps/deluxe/config.h new file mode 100644 index 000000000000..bec55fbd4c30 --- /dev/null +++ b/keyboards/junco/keymaps/deluxe/config.h @@ -0,0 +1,58 @@ +// Copyright 2022 Dane Skalski (@Daneski13) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* Indicator LEDs */ +// LED index for caps lock key on the extension layer +#define CAPS_LOCK_LED_INDEX 25 +// LED index for num lock key on the symbol layer +#define NUM_LOCK_LED_INDEX 62 +// LED index for key that sticks the adjust layer +#define ADJST_LED_INDEX 19 + +// Number of Layers that can be used by VIA. +// Change this if you want more layers +#define DYNAMIC_KEYMAP_LAYER_COUNT 6 + +/* - Encoder settings - */ +#ifdef ENCODER_ENABLE +# define ENCODER_RESOLUTION 4 +#endif +#ifdef ENCODER_MAP_ENABLE +// Key delay for encoders (necessary for some keycodes) +# define ENCODER_MAP_KEY_DELAY 10 +#endif + +/* + - RGB Stuff - + All effects can be found in the QMK docs: + https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +*/ +#ifdef RGB_MATRIX_ENABLE + +// Allows the indicator LEDs to work +# define SPLIT_LED_STATE_ENABLE +# define SPLIT_LAYER_STATE_ENABLE + +// Default effect when EEPROM cleared +# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_RAINBOW_MOVING_CHEVRON + +// Turns off RGB effects when there is no longer a USB connection +# define RGB_DISABLE_WHEN_USB_SUSPENDED + +// Throttling of RGB to increase keyboard responsiveness, set to 1.5x the default limits +# define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 6 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +# define RGB_MATRIX_LED_FLUSH_LIMIT 24 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms), the default, is equivalent to limiting to 60fps + +// Key press reactive animations +# define SPLIT_TRANSPORT_MIRROR // Necessary setting for key press animations +# define RGB_MATRIX_KEYPRESSES // Enables key press effects +# define ENABLE_RGB_MATRIX_MULTISPLASH + +// Normal effects +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_PIXEL_RAIN + +#endif diff --git a/keyboards/junco/keymaps/deluxe/keymap.c b/keyboards/junco/keymaps/deluxe/keymap.c new file mode 100644 index 000000000000..e4dcb97faed2 --- /dev/null +++ b/keyboards/junco/keymaps/deluxe/keymap.c @@ -0,0 +1,329 @@ +// Copyright 2022 Dane Skalski (@Daneski13) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// Layers enum +enum junco_layers { _QWERTY, _COLEMAK_DH, _SYMB, _EXT, _ADJUST }; + +// Custom keycodes +enum custom_keycodes { + // Keycode for toggling between macOS and Windows key mappings + // Actually just an alias to the GUI and Alt swap Magic keycode + KC_OS = MAGIC_TOGGLE_ALT_GUI, + // Keycode for swapping the base layer between QWERTY and Colemak-DH + KC_TOGGLE_BASE = SAFE_RANGE, + // Keycode for redo action (Ctrl + Y on windows, Ctrl + Shift + Z on macOS) + KC_REDO, + // Keycodes for next/previous word + KC_WNXT, + KC_WPRV, + // Keycode for sticking/unsticking the adjust layer + KC_ADJST +}; + +/* LED indicators */ +bool is_caps_lock_enabled(void) { // Caps lock + return (host_keyboard_led_state().caps_lock); +} +bool is_num_lock_enabled(void) { // Num lock + return (host_keyboard_led_state().num_lock); +} +bool is_adjust_layer_sticky(layer_state_t state) { // Adjust layer sticky + // Checks if the state is equal to just the adjust layer being active. + // Doing it this way can leverage SPLIT_LAYER_STATE_ENABLE + return (state == (1UL << _ADJUST)) ? true : false; +} +// Indicator color based on the RGB Matrix mode +RGB indicator_color(void) { + RGB rgb; + // Normally the indicator color is white to stand out in the RGB rainbow. + // When using the custom RGB mode that already is white, the indicator color + // is green to stand out. + if (rgb_matrix_config.mode == RGB_MATRIX_CUSTOM_WHITE_UNDERGLOW_CYCLE) { + // Green + rgb.r = 0; + rgb.g = 255; + rgb.b = 0; + } else { + // White + rgb.r = 255; + rgb.g = 255; + rgb.b = 255; + } + return rgb; +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + /* + Traditional QWERTY + ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ + │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Tab│ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │Ent│ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Esc│ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ + ├───┼───┼───┼───┼───┼───┼───┐ ┌───┼───┼───┼───┼───┼───┼───┤ + │Sft│ Z │ X │ C │ V │ B │Mut│ │▶⏸ │ N │ M │ , │ . │ / │Sft│ + └───┴───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┴───┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │Ctr│Win│Alt│Del│Spc│ │Sft│Bsp│Alt│Win│Ctr│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + For macOS - GUI (cmd) and Alt (opt) swapped + */ + [_QWERTY] = LAYOUT_split4x6_r1( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENTER, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SEMICOLON, KC_QUOTE, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_MPLY, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, LT(_EXT, KC_DEL), KC_SPC, KC_RSFT, LT(_SYMB, KC_BSPC), KC_RALT, KC_RGUI, KC_RCTL + ), + + /* + Colemak-DH + ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ + │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Tab│ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ ; │Ent│ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Esc│ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │ ' │ + ├───┼───┼───┼───┼───┼───┼───┐ ┌───┼───┼───┼───┼───┼───┼───┤ + │Sft│ Z │ X │ C │ D │ V │Mut│ │▶⏸ │ K │ H │ , │ . │ / │Sft│ + └───┴───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┴───┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │Ctr│Win│Alt│Del│Spc│ │Sft│Bsp│Alt│Win│Ctr│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + For macOS - GUI/Win (cmd) and Alt (opt) swapped + */ + [_COLEMAK_DH] = LAYOUT_split4x6_r1( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SEMICOLON, KC_ENTER, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOTE, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_MUTE, KC_MPLY, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, LT(_EXT, KC_DEL), KC_SPC, KC_RSFT, LT(_SYMB, KC_BSPC), KC_RALT, KC_RGUI, KC_RCTL + ), + + /* + Symbols/Numpad Layer + ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ + │F1 │F2 │F3 │F4 │F5 │F6 │ │F7 │F8 │F9 │F10│F11│F12│ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Tab│ ! │ @ │ # │ $ │ % │ │ * │ 7 │ 8 │ 9 │ + │Ent│ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │ \ │ _ │ [ │ { │ ( │ ^ │ │ = │ 4 │ 5 │ 6 │ 0 │NUM│ + ├───┼───┼───┼───┼───┼───┼───┐ ┌───┼───┼───┼───┼───┼───┼───┤ + │___│ | │ ] │ } │ ) │ & │___│ │___│ / │ 1 │ 2 │ 3 │ - │___│ + └───┴───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┴───┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │___│___│___│___│___│ │___│___│___│___│___│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + */ + [_SYMB] = LAYOUT_split4x6_r1( + 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_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PAST, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_ENTER, + KC_BSLS, KC_UNDS, KC_LBRC, KC_LCBR, KC_LPRN, KC_CIRC, KC_PEQL, KC_P4, KC_P5, KC_P6, KC_P0, KC_NUM, + _______, KC_PIPE, KC_RBRC, KC_RCBR, KC_RPRN, KC_AMPR, _______, _______, KC_PSLS, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* + Extension/Function Layer + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10│ F11│ F12│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ ⇤ │PGUP│End │ ↑ │Home│ │ │BRIU│ F7 │ F8 │ F9 │ F10│____│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │Cps │PGDN│ ← │ ↓ │ → │ │ │BRID│ F4 │ F5 │ F6 │ F11│____│ + ├────┼────┼────┼────┼────┼────┼────┐ ┌────┼────┼────┼────┼────┼────┼────┤ + │____│ │ │ │ │ │____│ │____│ │ F1 │ F2 │ F3 │ F12│____│ + └────┴────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┴────┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │___│___│___│___│___│ │___│___│___│___│___│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + */ + [_EXT] = LAYOUT_split4x6_r1( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + S(KC_TAB), KC_PGUP, KC_END, KC_UP, KC_HOME, _______, KC_BRIU, KC_F7, KC_F8, KC_F9, KC_F10, _______, + KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT, _______, KC_BRID, KC_F4, KC_F5, KC_F6, KC_F11, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* + Adjust Layer, Keyboard Settings + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │SpdU│HueU│SatU│ValU│Rnxt│Stck│ │ │EClr│Rbt │DBUG│BOOT│ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │SpdD│HueD│SatD│ValD│Rprv│RTgl│ │ │LOUT│ OS │ │ │ │ + ├────┼────┼────┼────┼────┼────┼────┐ ┌────┼────┼────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │RTgl│ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┴────┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │___│___│___│___│___│ │___│___│___│___│___│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + */ + [_ADJUST] = LAYOUT_split4x6_r1( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, KC_ADJST, KC_NO, EE_CLR, QK_RBT, DB_TOGG, QK_BOOT, KC_NO, + RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, RGB_TOG, KC_NO, KC_TOGGLE_BASE, KC_OS, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + // clang-format on +}; + +/* + --- Rotary Encoder Mappings --- + + Encoder mappings go from leftmost encoder to rightmost encoder on the physical board. + index 0 is the the optional leftmost encoder on the left half, index 1 is the right encoder + on the left half (by the thumb keys), index 2 is the left encoder on the right half (by the + thumb keys), and index 3 is the optional rightmost encoder on the right half. + + If you are only using the 2 required encoders by the thumb keys, you only need to worry about + index 1 and index 2. + + Note that the key to be sent for counter-clockwise rotation (CCW) goes first and then the key for + clockwise (CW) within ENCODER_CCW_CW. +*/ +#ifdef ENCODER_MAP_ENABLE +// clang-format off + +// Base layer encoder mappings: +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + // Base layers + // index 0: mouse wheel up (CCW)/down (CW) index 1: volume up/down index 2: media prev/next index 3: mouse wheel left/right + [_QWERTY] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_WH_L, KC_WH_R) }, + [_COLEMAK_DH] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + + // Passes through to base layer + [_SYMB] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + // undo/redo previous word/next word + [_EXT] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_UNDO, KC_REDO), ENCODER_CCW_CW(KC_WPRV, KC_WNXT) }, + // RGB Speed down/up RGB previous mode/next mode RGB brightness down/up + [_ADJUST] = { ENCODER_CCW_CW(RGB_SPD, RGB_SPI), ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + // clang-format on +}; + +#endif + +// Called whenever a layer is changed +layer_state_t layer_state_set_user(layer_state_t state) { + // Make sure the adjust layer isn't sticky + if (is_adjust_layer_sticky(state)) return state; + + // When both the symbol and extension layer keys are held, the Adjust layer is active. + return update_tri_layer_state(state, _SYMB, _EXT, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // Toggle base layer + case KC_TOGGLE_BASE: + if (record->event.pressed) { + // Toggle swapping base layers between Colemak-DH and QWERTY. + // When base layer is QWERTY, swap to Colemak-DH and vice-versa + if (get_highest_layer(default_layer_state) == _QWERTY) { + default_layer_set(1UL << _COLEMAK_DH); + } else { + default_layer_set(1UL << _QWERTY); + } + } + return false; + + // Override undo in favor of the more modern undo action + case KC_UNDO: + if (record->event.pressed) { + // Use the correct modifier for macOS or Windows + uint16_t mod = keymap_config.swap_lalt_lgui ? KC_LGUI : KC_LCTL; + // Send Ctrl+Z/Cmd+Z + register_code(mod); + tap_code_delay(KC_Z, 10); + unregister_code(mod); + } + return false; + + // Redo action + case KC_REDO: + if (record->event.pressed) { + // Whether or not macOS mapping is enabled + if (keymap_config.swap_lalt_lgui) { + // macOS - Send Cmd+Shift+Z + register_code(KC_LGUI); + register_code(KC_LSFT); + tap_code_delay(KC_Z, 10); + unregister_code(KC_LSFT); + unregister_code(KC_LGUI); + } else { + // Windows - Send Ctrl+Y + register_code(KC_LCTL); + tap_code_delay(KC_Y, 10); + unregister_code(KC_LCTL); + } + } + return false; + + // Next word + case KC_WNXT: + if (record->event.pressed) { + // Use the correct modifier for macOS or Windows + uint16_t mod = keymap_config.swap_lalt_lgui ? KC_LALT : KC_LCTL; + // Send Ctrl+Right/Option+Right + register_code(mod); + tap_code_delay(KC_RGHT, 10); + unregister_code(mod); + } + return false; + + // Previous word + case KC_WPRV: + if (record->event.pressed) { + // Use the correct modifier for macOS or Windows + uint16_t mod = keymap_config.swap_lalt_lgui ? KC_LALT : KC_LCTL; + // Send Ctrl+Left/Option+Left + register_code(mod); + tap_code_delay(KC_LEFT, 10); + unregister_code(mod); + } + return false; + + // Stick / Unstick the adjust layer + case KC_ADJST: + if (record->event.pressed) { + // If currently not sticky, we want only the adjust layer to be active to make it stick. + // Otherwise we want the default layer, un-stick. + is_adjust_layer_sticky(layer_state) ? layer_state_set(default_layer_state) : layer_move(_ADJUST); + dprintf("Adjust layer is now %s\n", is_adjust_layer_sticky(layer_state) ? "stuck" : "un-stuck"); + } + return false; + default: + return true; + } +} + +/* Indicators (Caps Lock / Num Lock / Adjust Layer Sticky) */ +bool rgb_matrix_indicators_user(void) { + layer_state_t curr_layer_state = layer_state; + layer_state_t layer = get_highest_layer(curr_layer_state); + RGB rgb = indicator_color(); + + /* Only show the indicator on their respective layers */ + // Caps Lock is only on the extension layer + if (is_caps_lock_enabled() && layer == _EXT) { + rgb_matrix_set_color(CAPS_LOCK_LED_INDEX, rgb.r, rgb.g, rgb.b); + } + + // Num Lock is only on the symbol layer + if (is_num_lock_enabled() && layer == _SYMB) { + rgb_matrix_set_color(NUM_LOCK_LED_INDEX, rgb.r, rgb.g, rgb.b); + } + + // If the adjust layer is stuck/sticky, light it up. Don't need to care about + // checking the layer since it can only be active on the adjust layer anyway + if (is_adjust_layer_sticky(curr_layer_state)) rgb_matrix_set_color(ADJST_LED_INDEX, rgb.r, rgb.g, rgb.b); + + return false; +} diff --git a/keyboards/junco/keymaps/deluxe/readme.md b/keyboards/junco/keymaps/deluxe/readme.md new file mode 100644 index 000000000000..d52d315f7d41 --- /dev/null +++ b/keyboards/junco/keymaps/deluxe/readme.md @@ -0,0 +1,43 @@ +# Deluxe Junco Keymap + +This is my personal keymap for Junco at time of writing. It departs from the [default layout](../default/README.md) with the encoder mappings and some extra keycodes. This keymap also adds indicators when caps lock and num lock are enabled. When enabled, that key will become a static white (green on the white backlight mode) but only when the layer that respective key is on is active. + +I wanted that classic rainbow barf RGB effect for the underglow even if the per-key lighting is something else, so I added 2 custom RGB matrix animations: white per-key lighting with rainbow underglow and pixel rain with rainbow underglow. + +Here are some gifs of the animations: + +![White + Underglow Animation](https://i.imgur.com/2vCiZz0.gif) + +![Pixel Rain + Underglow Animation](https://i.imgur.com/f6t0OfD.gif) + +## Base Layers + +The base layers are the same as the default layout, except the right side's left encoder (by the thumb keys) is now media controls. Since I am using all 4 encoders it doesn't make sense to have 2 mouse scroll up/down, but for someone with just 2 encoders it may make sense to have media controls on a layer. + +QWERTY: + +![QWERTY Layer](https://i.imgur.com/vkS9Tceh.png) + +Colemak-DH: + +![Colemak-DH Layer](https://i.imgur.com/5YYgaUAh.png) + +## Symbol Layer + +Symbol layer is identical to the default layout. + +![Symbol Layer](https://i.imgur.com/6F35Z4Wh.png) + +## Extension Layer + +Encoders on the right side become undo/redo and scrolling horizontally by word. + +![Extension Layer](https://i.imgur.com/0VCStS8h.png) + +## Adjust Layer + +Pressing "Stick Adj Layer" will "stick" the adjust layer so you can use the rotary encoders for RGB settings rather than holding down both backspace and delete. To go back to the default layer, press that stick key again or press and release either Del or Backspace. When the adjust layer is currently "sticky" the sticky key will become the indicator color mentioned earlier. + +"Toggle Base" will toggle between QWERTY and Colemak-DH and toggle OS will toggle between macOS and Windows key-mappings (swapping WIN/Command with Alt/Option by the thumb keys and properly mapping redo/word scrolling). + +![Adjust layer](https://i.imgur.com/71ftNoNh.png) diff --git a/keyboards/junco/keymaps/deluxe/rgb_matrix_user.inc b/keyboards/junco/keymaps/deluxe/rgb_matrix_user.inc new file mode 100644 index 000000000000..3efe5067497c --- /dev/null +++ b/keyboards/junco/keymaps/deluxe/rgb_matrix_user.inc @@ -0,0 +1,48 @@ +// Copyright 2022 Dane Skalski (@Daneski13) +// SPDX-License-Identifier: GPL-2.0-or-later + +RGB_MATRIX_EFFECT(WHITE_UNDERGLOW_CYCLE) +RGB_MATRIX_EFFECT(PIXEL_RAIN_UNDERGLOW_CYCLE) + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +// This is a modified version of the effect_runner_dx_dy_dist function from rgb_matrix +// that only applies the effect to the underglow LEDs of this keyboard +static bool underglow_effect_runner(effect_params_t* params, dx_dy_dist_f underglow_effect_func, bool backlight_white) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = rgb_matrix_config.hsv; + HSV white = {0, 0, hsv.v}; + RGB rgb = rgb_matrix_hsv_to_rgb(white); + uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + // Underglow LEDs are indicies 0 - 7 and 37 - 44 + if ((i <= 7) || (37 <= i && i <= 44)) { + // Apply the maths and colors to the underglow LEDs + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; + int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; + uint8_t dist = sqrt16(dx * dx + dy * dy); + RGB rgb = rgb_matrix_hsv_to_rgb(underglow_effect_func(hsv, dx, dy, dist, time)); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } else { + // Set the backlight to white if needed + if (!backlight_white) continue; + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + } + return rgb_matrix_check_finished_leds(led_max); +} + +// Solid white but the underglow is a rainbow spiral +static bool WHITE_UNDERGLOW_CYCLE(effect_params_t* params) { + return underglow_effect_runner(params, &CYCLE_SPIRAL_math, true); +} + +// Pixel rain effect but the underglow is a rainbow spiral +static bool PIXEL_RAIN_UNDERGLOW_CYCLE(effect_params_t* params) { + PIXEL_RAIN(params); + return underglow_effect_runner(params, &CYCLE_SPIRAL_math, false); +} + +#endif diff --git a/keyboards/junco/keymaps/deluxe/rules.mk b/keyboards/junco/keymaps/deluxe/rules.mk new file mode 100644 index 000000000000..b788c6155b42 --- /dev/null +++ b/keyboards/junco/keymaps/deluxe/rules.mk @@ -0,0 +1,20 @@ +# Enables Audio control and System control Keycodes +EXTRAKEY_ENABLE = yes +# Enables Mousekeys +MOUSEKEY_ENABLE = yes +# Encoder Support +ENCODER_ENABLE = yes +# Use Enocoder Mapping +ENCODER_MAP_ENABLE = yes + +# Enables RGB Lighting Effects +RGB_MATRIX_ENABLE = yes + +# Allows use of `qmk console` for debugging +CONSOLE_ENABLE = yes + +# Enables VIA +VIA_ENABLE = yes + +# Custom RGB Matrix Effect +RGB_MATRIX_CUSTOM_USER = yes diff --git a/keyboards/junco/keymaps/via/config.h b/keyboards/junco/keymaps/via/config.h new file mode 100644 index 000000000000..c4ce821594d5 --- /dev/null +++ b/keyboards/junco/keymaps/via/config.h @@ -0,0 +1,87 @@ +// Copyright 2022 Dane Skalski (@Daneski13) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Number of Layers that can be used by VIA. +// Change this if you want more layers +#define DYNAMIC_KEYMAP_LAYER_COUNT 6 + +/* - Encoder settings - */ +#ifdef ENCODER_ENABLE +# define ENCODER_RESOLUTION 4 +#endif +#ifdef ENCODER_MAP_ENABLE +// Key delay for encoders (necessary for some keycodes) +# define ENCODER_MAP_KEY_DELAY 10 +#endif + +/* + - RGB - + Defines all effects so VIA can properly select them via index +*/ +#ifdef RGB_MATRIX_ENABLE + +// Default effect when EEPROM cleared +# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_RAINBOW_MOVING_CHEVRON + +// Turns off RGB effects when there is no longer a USB connection +# define RGB_DISABLE_WHEN_USB_SUSPENDED + +// Allow keypress reactive animations +# define SPLIT_TRANSPORT_MIRROR // Necessary setting for key press animations on a split +# define RGB_MATRIX_KEYPRESSES // Enables key press effects + +// Allow frame buffer effects +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS // Enables frame buffer effects + +// All effect definitions +# define ENABLE_RGB_MATRIX_ALPHAS_MODS // Enables RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Enables RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Enables RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING // Enables RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT // Enables RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL // Enables RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Enables RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Enables RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Enables RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Enables RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL // Enables RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Enables RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Enables RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Enables RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Enables RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Enables RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Enables RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Enables RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON // Enables RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Enables RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Enables RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS // Enables RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Enables RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING // Enables RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM // Enables RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE // Enables RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL // Enables RGB_MATRIX_PIXEL_FRACTAL +# define ENABLE_RGB_MATRIX_PIXEL_FLOW // Enables RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_RAIN // Enables RGB_MATRIX_PIXEL_RAIN + +// Following need RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP // Enables RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN // Enables RGB_MATRIX_DIGITAL_RAIN + +// Following need RGB_MATRIX_KEYPRESSES +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Enables RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE // Enables RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Enables RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Enables RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Enables RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Enables RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Enables RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Enables RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH // Enables RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH // Enables RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH // Enables RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Enables RGB_MATRIX_SOLID_MULTISPLASH + +#endif diff --git a/keyboards/junco/keymaps/via/keymap.c b/keyboards/junco/keymaps/via/keymap.c new file mode 100644 index 000000000000..b50332be284e --- /dev/null +++ b/keyboards/junco/keymaps/via/keymap.c @@ -0,0 +1,161 @@ +// Copyright 2022 Dane Skalski (@Daneski13) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +// Layers enum +enum junco_layers { _QWERTY, _COLEMAK_DH, _SYMB, _EXT, _ADJUST }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + /* + Traditional QWERTY + ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ + │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Tab│ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │Ent│ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Esc│ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ + ├───┼───┼───┼───┼───┼───┼───┐ ┌───┼───┼───┼───┼───┼───┼───┤ + │Sft│ Z │ X │ C │ V │ B │Mut│ │XXX│ N │ M │ , │ . │ / │Sft│ + └───┴───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┴───┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │Ctr│Win│Alt│Del│Spc│ │Sft│Bsp│Alt│Win│Ctr│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + For macOS - GUI (cmd) and Alt (opt) swapped + */ + [_QWERTY] = LAYOUT_split4x6_r1( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENTER, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SEMICOLON, KC_QUOTE, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, LT(_EXT, KC_DEL), KC_SPC, KC_RSFT, LT(_SYMB, KC_BSPC), KC_RALT, KC_RGUI, KC_RCTL + ), + + /* + Colemak-DH + ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ + │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Tab│ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ ; │Ent│ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Esc│ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │ ' │ + ├───┼───┼───┼───┼───┼───┼───┐ ┌───┼───┼───┼───┼───┼───┼───┤ + │Sft│ Z │ X │ C │ D │ V │Mut│ │XXX│ K │ H │ , │ . │ / │Sft│ + └───┴───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┴───┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │Ctr│Win│Alt│Del│Spc│ │Sft│Bsp│Alt│Win│Ctr│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + For macOS - GUI (cmd) and Alt (opt) swapped + */ + [_COLEMAK_DH] = LAYOUT_split4x6_r1( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SEMICOLON, KC_ENTER, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOTE, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_MUTE, KC_NO, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, LT(_EXT, KC_DEL), KC_SPC, KC_RSFT, LT(_SYMB, KC_BSPC), KC_RALT, KC_RGUI, KC_RCTL + ), + + /* + Symbols/Numpad Layer + ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ + │F1 │F2 │F3 │F4 │F5 │F6 │ │F7 │F8 │F9 │F10│F11│F12│ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │Tab│ ! │ @ │ # │ $ │ % │ │ * │ 7 │ 8 │ 9 │ + │Ent│ + ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + │ \ │ _ │ [ │ { │ ( │ ^ │ │ = │ 4 │ 5 │ 6 │ 0 │NUM│ + ├───┼───┼───┼───┼───┼───┼───┐ ┌───┼───┼───┼───┼───┼───┼───┤ + │___│ | │ ] │ } │ ) │ & │___│ │___│ / │ 1 │ 2 │ 3 │ - │___│ + └───┴───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┴───┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │___│___│___│___│___│ │___│___│___│___│___│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + */ + [_SYMB] = LAYOUT_split4x6_r1( + 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_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PAST, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_ENTER, + KC_BSLS, KC_UNDS, KC_LBRC, KC_LCBR, KC_LPRN, KC_CIRC, KC_PEQL, KC_P4, KC_P5, KC_P6, KC_P0, KC_NUM, + _______, KC_PIPE, KC_RBRC, KC_RCBR, KC_RPRN, KC_AMPR, _______, _______, KC_PSLS, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, + _______, _______, _______, MO(_ADJUST), _______, _______, _______, _______, _______, _______ + ), + + /* + Extension/Function Layer + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10│ F11│ F12│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ ⇤ │PGUP│End │ ↑ │Home│ │ │BRIU│ F7 │ F8 │ F9 │ F10│____│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │Cps │PGDN│ ← │ ↓ │ → │ │ │BRID│ F4 │ F5 │ F6 │ F11│____│ + ├────┼────┼────┼────┼────┼────┼────┐ ┌────┼────┼────┼────┼────┼────┼────┤ + │____│ │ │ │ │ │____│ │ ▶⏸ │ │ F1 │ F2 │ F3 │ F12│____│ + └────┴────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┴────┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │___│___│___│___│___│ │___│___│___│___│___│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + */ + [_EXT] = LAYOUT_split4x6_r1( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + S(KC_TAB), KC_PGUP, KC_END, KC_UP, KC_HOME, _______, KC_BRIU, KC_F7, KC_F8, KC_F9, KC_F10, _______, + KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT, _______, KC_BRID, KC_F4, KC_F5, KC_F6, KC_F11, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_F1, KC_F2, KC_F3, KC_F12, _______, + _______, _______, _______, _______, _______, _______, MO(_ADJUST), _______, _______, _______ + ), + + /* + Adjust Layer, Keyboard Settings + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │SpdU│HueU│SatU│ValU│Rnxt│ │ │ │EClr│Rbt │DBUG│BOOT│ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │SpdD│HueD│SatD│ValD│Rprv│RTgl│ │ │QWRT│COLE│ │ │ │ + ├────┼────┼────┼────┼────┼────┼────┐ ┌────┼────┼────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┴────┘ + ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + │___│___│___│___│___│ │___│___│___│___│___│ + └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + */ + [_ADJUST] = LAYOUT_split4x6_r1( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, KC_NO, KC_NO, EE_CLR, QK_RBT, DB_TOGG, QK_BOOT, KC_NO, + RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, RGB_TOG, KC_NO, DF(_QWERTY), DF(_COLEMAK_DH), 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, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + // clang-format on +}; + +/* + --- Rotary Encoder Mappings --- + + Encoder mappings go from leftmost encoder to rightmost encoder on the physical board. + index 0 is the the optional leftmost encoder on the left half, index 1 is the right encoder + on the left half (by the thumb keys), index 2 is the left encoder on the right half (by the + thumb keys), and index 3 is the optional rightmost encoder on the right half. + + If you are only using the 2 required encoders by the thumb keys, you only need to worry about + index 1 and index 2. + + Note that the key to be sent for counter-clockwise rotation (CCW) goes first and then the key for + clockwise (CW) within ENCODER_CCW_CW. +*/ +#ifdef ENCODER_MAP_ENABLE +// clang-format off + +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + // Base layer encoder mappings: + // index 0: mouse wheel up (CCW)/down (CW) index 1: volume down/up index 2: mouse wheel up/down index 3: mouse wheel left/right + [_QWERTY] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_WH_L, KC_WH_R) }, + [_COLEMAK_DH] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + + // Passes through to base layers + [_SYMB] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + // On the extension layer, the right side's left encoder by the thumb keys (mouse wheel up/down) is traded for media previous/next + [_EXT] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + // Passes through + [_ADJUST] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + // clang-format on +}; + +#endif diff --git a/keyboards/junco/keymaps/via/rules.mk b/keyboards/junco/keymaps/via/rules.mk new file mode 100644 index 000000000000..fd9cd98bcb4c --- /dev/null +++ b/keyboards/junco/keymaps/via/rules.mk @@ -0,0 +1,19 @@ +# Change from yes to no to disable features + +# Enables Audio control and System control Keycodes +EXTRAKEY_ENABLE = yes +# Enables Mousekeys +MOUSEKEY_ENABLE = yes +# Encoder Support +ENCODER_ENABLE = yes +# Use Enocoder Mapping +ENCODER_MAP_ENABLE = yes + +# Enables RGB Matrix +RGB_MATRIX_ENABLE = yes + +# Allows use of `qmk console` for debugging +# CONSOLE_ENABLE = yes + +# Enables VIA +VIA_ENABLE = yes diff --git a/keyboards/junco/readme.md b/keyboards/junco/readme.md new file mode 100644 index 000000000000..b5817ff7e760 --- /dev/null +++ b/keyboards/junco/readme.md @@ -0,0 +1,41 @@ +# Junco + +![Junco](https://i.imgur.com/WzZaIgQh.jpg) + +Junco is a 60% Raspberry Pi Pico powered split keyboard boasting a 4x6 layout with an aggressive columnar stagger. It has 5 "thumb" keys on either side, support for 2-4 rotary encoders, and per-key RGB lighting. + +- Keyboard Maintainer: [Dane Skalski](https://github.com/Daneski13) +- Hardware Supported: Junco PCB, Raspberry Pi Pico +- Hardware Availability: [PCB, Case, Parts List](https://github.com/Daneski13/Junco) + +Remember you have to flash both halves of the keyboard for it to work! + +Make example for this keyboard (after setting up your build environment): + + make junco:default + +Flashing example for this keyboard: + +```bash +# For flashing the left half... +make junco:default:uf2-split-left +# or the qmk cli equivalent: +qmk flash -kb junco --keymap default -bl uf2-split-left + +# For flashing the right half... +make junco:default:uf2-split-right +# or the qmk cli equivalent: +qmk flash -kb junco --keymap default -bl uf2-split-right +``` + +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** (works after you have flashed once): Hold down the top far corner key while plugging in the keyboard (`~` left half, `-` right half). This will also clear the EEPROM. +- **Physical reset button**: Hold the `BOOT` button on the Pico and press the `RST` button on the Pico, release the the `RST` button before the `BOOT` button. +- **Keycode in layout**: In the default layout, the `Bootloader` keycode is above home row pinky on the right side's adjust layer. + +Once you enter the bootloader, the keyboard will show up as a USB device on your computer, you could drag and drop a firmware file to flash it, but I recommend using the flash commands for the respective side. diff --git a/keyboards/junco/rev1/config.h b/keyboards/junco/rev1/config.h new file mode 100644 index 000000000000..d9c0556cdfec --- /dev/null +++ b/keyboards/junco/rev1/config.h @@ -0,0 +1,43 @@ +// Copyright 2022 Dane Skalski (@Daneski13) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Electrical Wiring Stuff +#define MATRIX_ROW_PINS \ + { GP8, GP9, GP10, GP11, GP12 } +#define MATRIX_COL_PINS \ + { GP2, GP3, GP4, GP5, GP6, GP7 } +#define DIODE_DIRECTION COL2ROW + +// Split Keyboard Stuff +#define EE_HANDS // Sets the keyboard’s handedness using EEPROM +#define SERIAL_USART_FULL_DUPLEX // Use full duplex communication (TRRS) +#define SERIAL_USART_TX_PIN GP0 // USART TX pin +#define SERIAL_USART_RX_PIN GP1 // USART RX pin + +/* RGB Stuff */ +#ifdef RGB_MATRIX_ENABLE + +# define RGB_DI_PIN GP15 // Pin for RGB logic +# define RGB_MATRIX_LED_COUNT 74 +# define RGB_MATRIX_SPLIT \ + { 37, 37 } // 37 LEDs on each side + +#endif + +/* Rotary Encoders Definition */ +// Indexing goes from physical leftmost to rightmost +// 0: left-half left | 1: left-half right | 2: right-half left | 3: right-half right +#ifdef ENCODER_ENABLE + +# define ENCODERS_PAD_A \ + { GP16, GP14 } +# define ENCODERS_PAD_B \ + { GP17, GP13 } +# define ENCODERS_PAD_A_RIGHT \ + { GP14, GP16 } +# define ENCODERS_PAD_B_RIGHT \ + { GP13, GP17 } + +#endif diff --git a/keyboards/junco/rev1/post_config.h b/keyboards/junco/rev1/post_config.h new file mode 100644 index 000000000000..bcc15a941a03 --- /dev/null +++ b/keyboards/junco/rev1/post_config.h @@ -0,0 +1,15 @@ +// Copyright 2022 Dane Skalski (@Daneski13) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* Default Bootmagic lite */ +// Top left for left side is default in core + +// Top right for right side +#ifndef BOOTMAGIC_LITE_ROW_RIGHT +# define BOOTMAGIC_LITE_ROW_RIGHT 5 +#endif +#ifndef BOOTMAGIC_LITE_COLUMN_RIGHT +# define BOOTMAGIC_LITE_COLUMN_RIGHT 0 +#endif diff --git a/keyboards/junco/rev1/rev1.c b/keyboards/junco/rev1/rev1.c new file mode 100644 index 000000000000..d1346b82e215 --- /dev/null +++ b/keyboards/junco/rev1/rev1.c @@ -0,0 +1,126 @@ +// Copyright 2022 Dane Skalski (@Daneski13) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +// Hand swap +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + // Left + {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}}, + {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}}, + {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}}, + {{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}, {5, 8}, {6, 8}}, + {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}, {5, 9}, {6, 9}}, + // Right + {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}}, + {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}}, + {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}}, + {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}}, + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}} +}; +#endif + +/* RGB LED matrix */ +#ifdef RGB_MATRIX_ENABLE +/* + Key Matrix Physical + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, + L30, L31, L32, L33, L34, L35, L45, R40, R30, R31, R32, R33, R34, R35, + L40, L41, L42, L43, L44, R42, R41, R43, R44, R45 + + Key Electrical + Left: + { 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, L45 }, + Right: + { R05, R04, R03, R02, R01, R00 }, + { R15, R14, R13, R12, R11, R10 }, + { R25, R24, R23, R22, R21, R20 }, + { R35, R34, R33, R32, R31, R30 }, + { R45, R44, R43, R42, R41, R40 } + + Key matrix physical filled with LED electrical indexes, count starting at 1 + + Col + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 Row + + 14 13 12 11 10 9 46 47 48 49 50 51 0 + 6 7 8 45 44 43 + 15 16 17 18 19 20 57 56 55 54 53 52 1 + + 26 25 24 23 22 21 58 59 60 61 62 63 2 + 5 4 3 40 41 42 + 27 28 29 30 31 32 NO NO 69 68 67 66 65 64 3 + + 37 36 35 34 33 70 71 72 73 74 4 + 2 1 38 39 +*/ + +// clang-format off +led_config_t g_led_config = { + { // Key Electrical Matrix to LED Index (count start at 0, so 8 is the first non-underglow key) + + // Left Half + { 13, 12, 11, 10, 9, 8 }, + { 14, 15, 16, 17, 18, 19 }, + { 25, 24, 23, 22, 21, 20 }, + { 26, 27, 28, 29, 30, 31 }, + { 36, 35, 34, 33, 32, NO_LED }, + + // Right Half + { 50, 49, 48, 47, 46, 45 }, + { 51, 52, 53, 54, 55, 56 }, + { 62, 61, 60, 59, 58, 57 }, + { 63, 64, 65, 66, 67, 68 }, + { 73, 72, 71, 70, 69, NO_LED } + }, + { // LED Index to LED Physical Position (mirrored on right half) + + // Left Underglow (indicies 1 - 8) + { 95, 72 }, { 52, 72 }, { 86, 40 }, { 52, 40 }, { 9, 40 }, { 9, 8 }, { 52, 8 }, { 86, 8 }, + // Left Matrix (indicies 9 - 37) + { 86, 0 }, { 69, 0 }, { 52, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, + { 0, 16 }, { 17, 16 }, { 34, 16 }, { 52, 16 }, { 69, 16 }, { 86, 16 }, + { 86, 32 }, { 69, 32 }, { 52, 32 }, { 34, 32 }, { 17, 32 }, { 0, 32 }, + { 0, 48 }, { 17, 48 }, { 34, 48 }, { 52, 48 }, { 69, 48 }, { 86, 48 }, /* No Led */ + { 103, 64 }, { 86, 64 }, { 69, 64 }, { 52, 64 }, { 34, 64 }, + + // Right Underglow (indicies 38 - 45) + { 129, 72 }, { 172, 72 }, { 138, 40 }, { 172, 40 }, { 215, 40 }, { 215, 8 }, { 172, 8 }, { 138, 8 }, + // Right Matrix (indicies 46 - 74) + { 138, 0 }, { 155, 0 }, { 172, 0 }, { 190, 0 }, { 207, 0 }, { 224, 0 }, + { 224, 16 }, { 207, 16 }, { 190, 16 }, { 172, 16 }, { 155, 16 }, { 138, 16 }, + { 138, 32 }, { 155, 32 }, { 172, 32 }, { 190, 32 }, { 207, 32 }, { 224, 32 }, + /* No Led */ { 224, 48 }, { 207, 48 }, { 190, 48 }, { 172, 48 }, { 155, 48 }, { 138, 48 }, + { 121, 64 }, { 138, 64 }, { 155, 64 }, { 172, 64 }, { 190, 64 } + }, + { // LED Index to Flag (2 - Underglow, 4 - Key Backlight) + + // Left Underglow + 2, 2, 2, 2, 2, 2, 2, 2, + // Left Matrix + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, + + // Right Underglow + 2, 2, 2, 2, 2, 2, 2, 2, + // Right Matrix + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4 + } +}; + +#endif diff --git a/keyboards/junco/rev1/rules.mk b/keyboards/junco/rev1/rules.mk new file mode 100644 index 000000000000..feb836dbe1e0 --- /dev/null +++ b/keyboards/junco/rev1/rules.mk @@ -0,0 +1,3 @@ +# RGB Stuff +RGB_MATRIX_DRIVER = WS2812 +WS2812_DRIVER = vendor diff --git a/keyboards/junco/rules.mk b/keyboards/junco/rules.mk new file mode 100644 index 000000000000..a04c7822f91e --- /dev/null +++ b/keyboards/junco/rules.mk @@ -0,0 +1,9 @@ +# Split Keyboard Stuff +SPLIT_KEYBOARD = yes +SERIAL_DRIVER = vendor + +# Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes + +# Default Folder +DEFAULT_FOLDER = junco/rev1 diff --git a/keyboards/keychron/q1/ansi_encoder/info.json b/keyboards/keychron/q1/ansi_encoder/info.json index 2391e674ad0d..1dcefeb7f4db 100644 --- a/keyboards/keychron/q1/ansi_encoder/info.json +++ b/keyboards/keychron/q1/ansi_encoder/info.json @@ -31,8 +31,8 @@ {"matrix":[0,11], "x":10.75, "y":0}, {"matrix":[0,12], "x":11.75, "y":0}, {"matrix":[0,13], "x":12.75, "y":0}, - {"matrix":[0,14], "x":14, "y":0}, - {"matrix":[4,14], "x":15.25, "y":0}, + {"matrix":[4,14], "x":14, "y":0}, + {"matrix":[0,14], "x":15.25, "y":0}, {"matrix":[1, 0], "x":0, "y":1}, {"matrix":[1, 1], "x":1, "y":1}, diff --git a/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c new file mode 100755 index 000000000000..0d4fd2cd98a8 --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c @@ -0,0 +1,244 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * 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 "quantum.h" + +#ifdef RGB_MATRIX_ENABLE + +// clang-format off + +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, A_2, C_2, B_2}, // ESC + {0, A_3, C_3, B_3}, // F1 + {0, A_4, C_4, B_4}, // F2 + {0, A_5, C_5, B_5}, // F3 + {0, A_6, C_6, B_6}, // F4 + {0, A_7, C_7, B_7}, // F5 + {0, A_8, C_8, B_8}, // F6 + + {0, D_1, F_1, E_1}, // M1 + {0, D_2, F_2, E_2}, // `~ + {0, D_3, F_3, E_3}, // 1! + {0, D_4, F_4, E_4}, // 2@ + {0, D_5, F_5, E_5}, // 3# + {0, D_6, F_6, E_6}, // 4$ + {0, D_7, F_7, E_7}, // 5% + {0, D_8, F_8, E_8}, // 6^ + + {0, G_1, I_1, H_1}, // M2 + {0, G_2, I_2, H_2}, // TAB + {0, G_3, I_3, H_3}, // Q + {0, G_4, I_4, H_4}, // W + {0, G_5, I_5, H_5}, // E + {0, G_6, I_6, H_6}, // R + {0, G_7, I_7, H_7}, // T + + {0, J_1, L_1, K_1}, // M3 + {0, J_2, L_2, K_2}, // CapsJock + {0, J_3, L_3, K_3}, // A + {0, J_4, L_4, K_4}, // S + {0, J_5, L_5, K_5}, // D + {0, J_6, L_6, K_6}, // F + {0, J_7, L_7, K_7}, // G + + {0, J_9, L_9, K_9}, // M4 + {0, J_11, L_11, K_11}, // Shift_J + {0, J_12, L_12, K_12}, // Z + {0, J_13, L_13, K_13}, // X + {0, J_14, L_14, K_14}, // C + {0, J_15, L_15, K_15}, // V + {0, J_16, L_16, K_16}, // B + + {0, G_9, I_9, H_9}, // M5 + {0, G_10, I_10, H_10}, // Ctrl_L + {0, G_11, I_11, H_11}, // WGn_L + {0, G_12, I_12, H_12}, // Alt_L + {0, G_13, I_13, H_13}, // Fn + {0, G_15, I_15, H_15}, // Space + + {0, A_16, C_16, B_16}, // F7 + {0, A_15, C_15, B_15}, // F8 + {0, A_14, C_14, B_14}, // F9 + {0, A_13, C_13, B_13}, // F11 + {0, A_12, C_12, B_12}, // F11 + {0, A_11, C_11, B_11}, // F12 + {0, A_10, C_10, B_10}, // INS + {0, A_9, C_9, B_9}, // DEL + + {0, D_16, F_16, E_16}, // 7& + {0, D_15, F_15, E_15}, // 8* + {0, D_14, F_14, E_14}, // 9( + {0, D_13, F_13, E_13}, // 1) + {0, D_12, F_12, E_12}, // -_ + {0, D_11, F_11, E_11}, // =+ + {0, D_10, F_10, E_10}, // BackSpace + {0, D_8, F_8, E_8}, // PgUp + + {0, G_16, I_16, H_16}, // Y + {0, G_15, I_15, H_15}, // U + {0, G_14, I_14, H_14}, // G + {0, G_13, I_13, H_13}, // O + {0, G_12, I_12, H_12}, // P + {0, G_11, I_11, H_11}, // [ + {0, G_10, I_10, H_10}, // ] + {0, G_9, I_9, H_9}, // \|| + {0, G_8, I_8, H_8}, // PgDn + + {0, J_16, L_16, K_16}, // H + {0, J_15, L_15, K_15}, // J + {0, J_14, L_14, K_14}, // KKEY_PRESS_HOME + {0, J_13, L_13, K_13}, // J + {0, J_12, L_12, K_12}, // ;: + {0, J_11, L_11, K_11}, // '" + {0, J_9, L_9, K_9}, // Enter + {0, J_8, L_8, K_8}, // Home + + {0, J_7, L_7, K_7}, // N + {0, J_6, L_6, K_6}, // M + {0, J_5, L_5, K_5}, // ,< + {0, J_4, L_4, K_4}, // .> + {0, J_3, L_3, K_3}, // ?/ + {0, J_2, L_2, K_2}, // Shift_R + {0, J_1, L_1, K_1}, // Up + + {0, G_6, I_6, H_6}, // Space + {0, G_5, I_5, H_5}, // Win_R + {0, G_4, I_4, H_4}, // Fn + {0, G_3, I_3, H_3}, // Ctrl_R + {0, G_2, I_2, H_2}, // Left + {0, G_1, I_1, H_1}, // Down + {0, G_7, I_7, H_7}, // Right +}; + +#define __ NO_LED + +led_config_t g_led_config = { + { + // Key Matrix to LED Index + { __, 0, 1, 2, 3, 4, 5, 6, __ }, + { 7, 8, 9, 10, 11, 12, 13, 14, __ }, + { 15, 16, 17, 18, 19, __, 20, 21, __ }, + { 22, 23, 24, 25, 26, 27, 28, __, __ }, + { 29, __, 30, 31, 32, 33, 34, 35, __ }, + { 36, 37, 38, 39, 40, __, 41, __, __ }, + { 42, 43, 44, 45, 46, 47, 48, 49, __ }, + { 50, 51, 52, 53, 54, 55, 56, __, 57 }, + { 58, 59, 60, 61, 62, 63, 64, 65, 66 }, + { 67, 68, 69, 70, 71, 72, __, 73, 74 }, + { 75, 76, 77, 78, 79, 80, __, 81, __ }, + { __, 82, 83, 84, 85, __, 86, 87, 88 }, + }, + { + // LED Index to Physical Position + {17,0}, {31,0}, {45,0}, {59,0}, {72,0}, {86,0}, {100,0}, + {0,15}, {17,15}, {31,15}, {45,15}, {59,15}, {72,15}, {86,15}, {100,15}, + {0,27}, {21,27}, {38,27}, {52,27}, {66,27}, {79,27}, {93,27}, + {0,40}, {22,40}, {41,40}, {55,40}, {69,40}, {83,40}, {97,40}, + {0,52}, {26,52}, {48,52}, {61,52}, {76,52}, {90,52}, {102,52}, + {0,64}, {19,64}, {36,64}, {53,64}, {70,64}, {94,64}, + {110,0}, {124,0}, {138,0}, {152,0}, {165,0}, {179,0}, {193,0}, {207,0}, + {110,15}, {124,15}, {138,15}, {152,15}, {165,15}, {179,15}, {200,15}, {224,15}, + {104,27}, {117,27}, {131,27}, {145,27}, {158,27}, {172,27}, {186,27}, {203,27}, {224,27}, + {107,40}, {121,40}, {134,40}, {148,40}, {162,40}, {176,40}, {198,40}, {224,40}, + {114,52}, {127,52}, {141,52}, {155,52}, {169,52}, {188,52}, {210,52}, + {126,64}, {152,64}, {166,64}, {180,64}, {196,64}, {210,64}, {224,64}, + }, + { + // RGB LED Index to Flag + 1, 1, 1, 1, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, + 1, 8, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, + 1, 1, 1, 1, 1, 4, + 1, 1, 1, 1, 1, 1, 1, 1, + 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 1, + 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 1, 1, + 4, 1, 1, 1, 1, 1, 1, + } +}; + +// clang-format on + +#endif + +#define ADC_BUFFER_DEPTH 1 +#define ADC_NUM_CHANNELS 1 +#define ADC_SAMPLING_RATE ADC_SMPR_SMP_12P5 +#define ADC_RESOLUTION ADC_CFGR_RES_10BITS + +static int16_t analogReadPin_my(pin_t pin) { + ADCConfig adcCfg = {}; + adcsample_t sampleBuffer[ADC_NUM_CHANNELS*ADC_BUFFER_DEPTH]; + ADCDriver* targetDriver = &ADCD1; + ADCConversionGroup adcConversionGroup = { + .circular = FALSE, + .num_channels = (uint16_t)(ADC_NUM_CHANNELS), + .cfgr = ADC_RESOLUTION, + }; + + palSetLineMode(pin, PAL_MODE_INPUT_ANALOG); + switch (pin) { + case B0: + adcConversionGroup.smpr[2] = ADC_SMPR2_SMP_AN15(ADC_SAMPLING_RATE); + adcConversionGroup.sqr[0] = ADC_SQR1_SQ1_N(ADC_CHANNEL_IN15); + sampleBuffer[0] = 0; + break; + case B1: + adcConversionGroup.smpr[2] = ADC_SMPR2_SMP_AN16(ADC_SAMPLING_RATE); + adcConversionGroup.sqr[0] = ADC_SQR1_SQ1_N(ADC_CHANNEL_IN16); + sampleBuffer[0] = 0; + break; + default: + return 0; + } + adcStart(targetDriver, &adcCfg); + if (adcConvert(targetDriver, &adcConversionGroup, &sampleBuffer[0], ADC_BUFFER_DEPTH) != MSG_OK) { + return 0; + } + + return *sampleBuffer; +} + +void keyboard_post_init_kb(void) { + // 1. The pin A5/B5 of the USB C interface in the left hand is connected to the pin A0 of MCU, + // A0 will be set to output and write high when keyboard initial. + // 2. The same pin in the right hand is connected to the pin B0 and B1 of MCU respectively, + // and the ADC function of B0 and B1 will be enabled when keyboard initial. + // 3. because the serial usart RXD and TXD is multiplexed on USB's D+ and D- in the right hand. + // So detect the voltage on the pin A5/B5 of the USB C interface by ADC, + // and disable USB connectivity when the ADC value exceeds 1000, + // to avoid affecting the serial usart communication between the left hand and the right hand. + if (is_keyboard_left()) { + setPinOutput(A0); + writePinHigh(A0); + } else { + if ((analogReadPin_my(B0) > 1000) || (analogReadPin_my(B1) > 1000)) { + setPinInput(A11); + setPinInput(A12); + } + } + + keyboard_post_init_user(); +} diff --git a/keyboards/keychron/q11/ansi_encoder/config.h b/keyboards/keychron/q11/ansi_encoder/config.h new file mode 100755 index 000000000000..08632f0ce726 --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/config.h @@ -0,0 +1,20 @@ +/* Copyright 2023 @ Keychron(https://www.keychron.com) + * + * 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 + +/* Enable caps-lock LED */ +#define CAPS_LOCK_LED_INDEX 23 diff --git a/keyboards/keychron/q11/ansi_encoder/info.json b/keyboards/keychron/q11/ansi_encoder/info.json new file mode 100755 index 000000000000..50d1260a09cb --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/info.json @@ -0,0 +1,166 @@ +{ + "keyboard_name": "Keychron Q11", + "manufacturer": "Keychron", + "url": "https://github.com/Keychron", + "maintainer": "lalalademaxiya1", + "bootloader": "stm32-dfu", + "bootmagic": { + "matrix": [0, 1] + }, + "features": { + "audio": false, + "backlight": false, + "bootmagic": true, + "command": false, + "console": false, + "dip_switch": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true, + "rgblight": false + }, + "diode_direction": "ROW2COL", + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B1"} + ] + }, + "matrix_pins": { + "cols": ["A7", "A6", "A5", "A4", "A3", "A2", "A1", "C15", null], + "rows": ["A13", "A14", "A15", "B3", "B4", "B5"] + }, + "processor": "STM32L432", + "rgb_matrix": { + "driver": "CKLED2001", + "split_count": [42, 47] + }, + "split": { + "enabled": true, + "encoder": { + "right": { + "rotary": [ + {"pin_a": "C14", "pin_b": "C15"} + ] + } + }, + "matrix_pins": { + "right": { + "cols": ["A8", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0"], + "rows": ["B5", "B4", "B3", "A15", "A14", "A13"] + } + }, + "transport": { + "protocol": "serial_usart", + "sync_matrix_state": false + } + }, + "usb": { + "vid": "0x3434", + "pid": "0x01E0", + "device_version": "1.0.0" + }, + "layouts": { + "LAYOUT_ansi_91": { + "layout": [ + {"matrix":[0,0], "x":0, "y":0}, + {"matrix":[0,1], "x":1.25, "y":0}, + {"matrix":[0,2], "x":2.25, "y":0}, + {"matrix":[0,3], "x":3.25, "y":0}, + {"matrix":[0,4], "x":4.25, "y":0}, + {"matrix":[0,5], "x":5.25, "y":0}, + {"matrix":[0,6], "x":6.25, "y":0}, + {"matrix":[0,7], "x":7.25, "y":0}, + {"matrix":[6,0], "x":8.25, "y":0}, + {"matrix":[6,1], "x":9.25, "y":0}, + {"matrix":[6,2], "x":10.25, "y":0}, + {"matrix":[6,3], "x":11.25, "y":0}, + {"matrix":[6,4], "x":12.25, "y":0}, + {"matrix":[6,5], "x":13.25, "y":0}, + {"matrix":[6,6], "x":14.25, "y":0}, + {"matrix":[6,7], "x":15.25, "y":0}, + {"matrix":[6,8], "x":16.5, "y":0}, + + {"matrix":[1,0], "x":0, "y":1.25}, + {"matrix":[1,1], "x":1.25, "y":1.25}, + {"matrix":[1,2], "x":2.25, "y":1.25}, + {"matrix":[1,3], "x":3.25, "y":1.25}, + {"matrix":[1,4], "x":4.25, "y":1.25}, + {"matrix":[1,5], "x":5.25, "y":1.25}, + {"matrix":[1,6], "x":6.25, "y":1.25}, + {"matrix":[1,7], "x":7.25, "y":1.25}, + {"matrix":[7,0], "x":8.25, "y":1.25}, + {"matrix":[7,1], "x":9.25, "y":1.25}, + {"matrix":[7,2], "x":10.25, "y":1.25}, + {"matrix":[7,3], "x":11.25, "y":1.25}, + {"matrix":[7,4], "x":12.25, "y":1.25}, + {"matrix":[7,5], "x":13.25, "y":1.25}, + {"matrix":[7,6], "x":14.25, "y":1.25, "w":2}, + {"matrix":[7,8], "x":16.5, "y":1.25}, + + {"matrix":[2,0], "x":0, "y":2.25}, + {"matrix":[2,1], "x":1.25, "y":2.25, "w":1.5}, + {"matrix":[2,2], "x":2.75, "y":2.25}, + {"matrix":[2,3], "x":3.75, "y":2.25}, + {"matrix":[2,4], "x":4.75, "y":2.25}, + {"matrix":[2,6], "x":5.75, "y":2.25}, + {"matrix":[2,7], "x":6.75, "y":2.25}, + {"matrix":[8,0], "x":7.75, "y":2.25}, + {"matrix":[8,1], "x":8.75, "y":2.25}, + {"matrix":[8,2], "x":9.75, "y":2.25}, + {"matrix":[8,3], "x":10.75, "y":2.25}, + {"matrix":[8,4], "x":11.75, "y":2.25}, + {"matrix":[8,5], "x":12.75, "y":2.25}, + {"matrix":[8,6], "x":13.75, "y":2.25}, + {"matrix":[8,7], "x":14.75, "y":2.25, "w":1.5}, + {"matrix":[8,8], "x":16.5, "y":2.25}, + + {"matrix":[3,0], "x":0, "y":3.25}, + {"matrix":[3,1], "x":1.25, "y":3.25, "w":1.75}, + {"matrix":[3,2], "x":3, "y":3.25}, + {"matrix":[3,3], "x":4, "y":3.25}, + {"matrix":[3,4], "x":5, "y":3.25}, + {"matrix":[3,5], "x":6, "y":3.25}, + {"matrix":[3,6], "x":7, "y":3.25}, + {"matrix":[9,0], "x":8, "y":3.25}, + {"matrix":[9,1], "x":9, "y":3.25}, + {"matrix":[9,2], "x":10, "y":3.25}, + {"matrix":[9,3], "x":11, "y":3.25}, + {"matrix":[9,4], "x":12, "y":3.25}, + {"matrix":[9,5], "x":13, "y":3.25}, + {"matrix":[9,7], "x":14, "y":3.25, "w":2.25}, + {"matrix":[9,8], "x":16.5, "y":3.25}, + + {"matrix":[4,0], "x":0, "y":4.25}, + {"matrix":[4,2], "x":1.25, "y":4.25, "w":2.25}, + {"matrix":[4,3], "x":3.5, "y":4.25}, + {"matrix":[4,4], "x":4.5, "y":4.25}, + {"matrix":[4,5], "x":5.5, "y":4.25}, + {"matrix":[4,6], "x":6.5, "y":4.25}, + {"matrix":[4,7], "x":7.5, "y":4.25}, + {"matrix":[10,0], "x":8.5, "y":4.25}, + {"matrix":[10,1], "x":9.5, "y":4.25}, + {"matrix":[10,2], "x":10.5, "y":4.25}, + {"matrix":[10,3], "x":11.5, "y":4.25}, + {"matrix":[10,4], "x":12.5, "y":4.25}, + {"matrix":[10,5], "x":13.5, "y":4.25, "w":1.75}, + {"matrix":[10,7], "x":15.5, "y":4.25}, + + {"matrix":[5,0], "x":0, "y":5.25}, + {"matrix":[5,1], "x":1.25, "y":5.25, "w":1.25}, + {"matrix":[5,2], "x":2.5, "y":5.25, "w":1.25}, + {"matrix":[5,3], "x":3.75, "y":5.25, "w":1.25}, + {"matrix":[5,4], "x":5, "y":5.25, "w":1.25}, + {"matrix":[5,6], "x":6.25, "y":5.25, "w":2.25}, + {"matrix":[11,1], "x":8.5, "y":5.25, "w":2.75}, + {"matrix":[11,2], "x":11.25, "y":5.25}, + {"matrix":[11,3], "x":12.25, "y":5.25}, + {"matrix":[11,4], "x":13.25, "y":5.25}, + {"matrix":[11,6], "x":14.5, "y":5.25}, + {"matrix":[11,7], "x":15.5, "y":5.25}, + {"matrix":[11,8], "x":16.5, "y":5.25} + ] + } + } +} diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/default/keymap.c b/keyboards/keychron/q11/ansi_encoder/keymaps/default/keymap.c new file mode 100755 index 000000000000..b2c3ec24c0ab --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * 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{ + MAC_BASE, + MAC_FN, + WIN_BASE, + WIN_FN +}; + +#define KC_TASK LGUI(KC_TAB) +#define KC_FLXP LGUI(KC_E) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_ansi_91( + KC_MUTE, KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_INS, 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_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_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_HOME, + _______, 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_LOPT, KC_LCMD, MO(MAC_FN), KC_SPC, KC_SPC, KC_RCMD, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [MAC_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, 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_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [WIN_BASE] = LAYOUT_ansi_91( + KC_MUTE, 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_INS, 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_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_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_HOME, + _______, 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_LWIN, KC_LALT, MO(WIN_FN), KC_SPC, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [MAC_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [WIN_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } +}; +#endif // ENCODER_MAP_ENABLE diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/default/rules.mk b/keyboards/keychron/q11/ansi_encoder/keymaps/default/rules.mk new file mode 100755 index 000000000000..ee325681483f --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/keychron/keymap.c b/keyboards/keychron/q11/ansi_encoder/keymaps/keychron/keymap.c new file mode 100755 index 000000000000..710292232309 --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/keychron/keymap.c @@ -0,0 +1,84 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * 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 "keychron_common.h" + +// clang-format off + +enum layers{ + MAC_BASE, + MAC_FN, + WIN_BASE, + WIN_FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_ansi_91( + KC_MUTE, KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_INS, KC_DEL, KC_MUTE, + MC_1, 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_PGUP, + MC_2, 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_PGDN, + MC_3, 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_HOME, + MC_4, 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, + MC_5, KC_LCTL, KC_LOPTN, KC_LCMMD, MO(MAC_FN), KC_SPC, KC_SPC, KC_RCMMD, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [MAC_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, 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_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [WIN_BASE] = LAYOUT_ansi_91( + KC_MUTE, 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_INS, KC_DEL, KC_MUTE, + MC_1, 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_PGUP, + MC_2, 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_PGDN, + MC_3, 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_HOME, + MC_4, 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, + MC_5, KC_LCTL, KC_LWIN, KC_LALT, MO(WIN_FN), KC_SPC, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [MAC_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI)}, + [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [WIN_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI)} +}; +#endif // ENCODER_MAP_ENABLE + +// clang-format on + +void housekeeping_task_user(void) { + housekeeping_task_keychron(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_keychron(keycode, record)) { + return false; + } + + return true; +} diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/keychron/rules.mk b/keyboards/keychron/q11/ansi_encoder/keymaps/keychron/rules.mk new file mode 100755 index 000000000000..9cf1a9b56cba --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/keychron/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes + +VPATH += keyboards/keychron/common +SRC += keychron_common.c diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/via/keymap.c b/keyboards/keychron/q11/ansi_encoder/keymaps/via/keymap.c new file mode 100755 index 000000000000..7ba9886ef876 --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/via/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * 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{ + MAC_BASE, + MAC_FN, + WIN_BASE, + WIN_FN +}; + +#define KC_TASK LGUI(KC_TAB) +#define KC_FLXP LGUI(KC_E) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_ansi_91( + KC_MUTE, KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_INS, KC_DEL, KC_MUTE, + MC_1, 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_PGUP, + MC_2, 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_PGDN, + MC_3, 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_HOME, + MC_4, 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, + MC_5, KC_LCTL, KC_LOPT, KC_LCMD, MO(MAC_FN), KC_SPC, KC_SPC, KC_RCMD, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [MAC_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, 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_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [WIN_BASE] = LAYOUT_ansi_91( + KC_MUTE, 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_INS, KC_DEL, KC_MUTE, + MC_1, 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_PGUP, + MC_2, 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_PGDN, + MC_3, 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_HOME, + MC_4, 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, + MC_5, KC_LCTL, KC_LWIN, KC_LALT, MO(WIN_FN), KC_SPC, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [MAC_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [WIN_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } +}; +#endif // ENCODER_MAP_ENABLE diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/via/rules.mk b/keyboards/keychron/q11/ansi_encoder/keymaps/via/rules.mk new file mode 100755 index 000000000000..f1adcab005e8 --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/keychron/q11/ansi_encoder/rules.mk b/keyboards/keychron/q11/ansi_encoder/rules.mk new file mode 100755 index 000000000000..567ea30a2a8d --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/rules.mk @@ -0,0 +1,9 @@ +# Build Options +# change yes to no to disable +# +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = embedded_flash +SERIAL_DRIVER = usart + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/keychron/q11/config.h b/keyboards/keychron/q11/config.h new file mode 100755 index 000000000000..604ec142b869 --- /dev/null +++ b/keyboards/keychron/q11/config.h @@ -0,0 +1,110 @@ +/* Copyright 2023 @ Keychron(https://www.keychron.com) + * + * 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 + +// Connects each switch in the dip switch to the GPIO pin of the MCU +#define DIP_SWITCH_PINS \ + { A8 } + +/* handedness */ +#define SPLIT_HAND_MATRIX_GRID A2, A15 +#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT + +#define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `q11.c` + +/* RGB Matrix Configuration */ +#define DRIVER_COUNT 1 +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_1_LED_TOTAL 89 +#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL +#define SPLIT_TRANSPORT_MIRROR + +/* Increase I2C speed to 1000 KHz */ +#define I2C1_TIMINGR_PRESC 0U +#define I2C1_TIMINGR_SCLDEL 3U +#define I2C1_TIMINGR_SDADEL 0U +#define I2C1_TIMINGR_SCLH 15U +#define I2C1_TIMINGR_SCLL 51U + +#define CKLED2001_CURRENT_TUNE \ + { 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF } // 300mA + +/* EEPROM Driver Configuration */ +#define WEAR_LEVELING_LOGICAL_SIZE 2048 +#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) + +/* Split Keyboard specific options. */ +#define SERIAL_USART_TX_PIN A9 // USART TX pin + +/* Encoder Configuration */ +#define ENCODER_DEFAULT_POS 0x3 + +/* Disable RGB lighting when PC is in suspend */ +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// #define ENABLE_RGB_MATRIX_ALPHAS_MODS +// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +// #define ENABLE_RGB_MATRIX_BAND_VAL +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// #define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// #define ENABLE_RGB_MATRIX_HUE_BREATHING +// #define ENABLE_RGB_MATRIX_HUE_PENDULUM +// #define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +// #define ENABLE_RGB_MATRIX_PIXEL_FLOW +// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#define RGB_MATRIX_KEYPRESSES +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/keychron/q11/halconf.h b/keyboards/keychron/q11/halconf.h new file mode 100755 index 000000000000..028285a1f3e1 --- /dev/null +++ b/keyboards/keychron/q11/halconf.h @@ -0,0 +1,23 @@ +/* Copyright 2020 QMK + * + * 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_SERIAL TRUE +#define HAL_USE_ADC TRUE + +#include_next diff --git a/keyboards/keychron/q11/mcuconf.h b/keyboards/keychron/q11/mcuconf.h new file mode 100755 index 000000000000..209b3f6fb576 --- /dev/null +++ b/keyboards/keychron/q11/mcuconf.h @@ -0,0 +1,28 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE + +#undef STM32_ADC_USE_ADC1 +#define STM32_ADC_USE_ADC1 TRUE diff --git a/keyboards/keychron/q11/q11.c b/keyboards/keychron/q11/q11.c new file mode 100755 index 000000000000..8cfbb38fff0a --- /dev/null +++ b/keyboards/keychron/q11/q11.c @@ -0,0 +1,102 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * 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 "quantum.h" + +// Mask out handedness diode to prevent it +// from keeping the keyboard awake +// - just mirroring `KC_NO` in the `LAYOUT` +// macro to keep it simple +const matrix_row_t matrix_mask[] = { + 0b011111111, + 0b011111111, + 0b011111111, + 0b001111111, + 0b011111101, + 0b001011111, + 0b111111111, + 0b101111111, + 0b111111111, + 0b110111111, + 0b010111111, + 0b111011110, +}; + +#ifdef DIP_SWITCH_ENABLE +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 ? 0 : 2)); + } + return true; +} +#endif + +#if defined(RGB_MATRIX_ENABLE) && (defined(CAPS_LOCK_LED_INDEX) || defined(NUM_LOCK_LED_INDEX)) +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + switch (keycode) { + 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; + } + return true; +} + +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; + } + // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); +# if defined(CAPS_LOCK_LED_INDEX) + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_LED_INDEX, 255, 255, 255); + } else { + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_LED_INDEX, 0, 0, 0); + } + } +# endif // CAPS_LOCK_LED_INDEX +# if defined(NUM_LOCK_LED_INDEX) + if (host_keyboard_led_state().num_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_LED_INDEX, 255, 255, 255); + } else { + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_LED_INDEX, 0, 0, 0); + } + } +# endif // NUM_LOCK_LED_INDEX + return true; +} +#endif diff --git a/keyboards/keychron/q11/readme.md b/keyboards/keychron/q11/readme.md new file mode 100644 index 000000000000..3dad920e04e3 --- /dev/null +++ b/keyboards/keychron/q11/readme.md @@ -0,0 +1,21 @@ +# Keychron Q11 + +![Keychron Q11](https://i.imgur.com/FPTNqKj.jpg) + +A customizable 75% split keyboard. + +* Keyboard Maintainer: [Keychron](https://github.com/keychron) +* Hardware Supported: Keychron Q11 +* Hardware Availability: [Keychron Q11 QMK Custom Mechanical Keyboard](https://www.keychron.com/products/keychron-q11-qmk-custom-mechanical-keyboard) + +Make example for this keyboard (after setting up your build environment): + + make keychron/q11/ansi_encoder:default + +Flashing example for this keyboard: + + make keychron/q11/ansi_encoder: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/lily58/keymaps/oldfieldtc/config.h b/keyboards/lily58/keymaps/oldfieldtc/config.h new file mode 100644 index 000000000000..edfc9530b24f --- /dev/null +++ b/keyboards/lily58/keymaps/oldfieldtc/config.h @@ -0,0 +1,23 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 Tommy Oldfield <@oldfieldtc> + +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 TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 \ No newline at end of file diff --git a/keyboards/lily58/keymaps/oldfieldtc/keymap.c b/keyboards/lily58/keymaps/oldfieldtc/keymap.c new file mode 100644 index 000000000000..11750e82e85c --- /dev/null +++ b/keyboards/lily58/keymaps/oldfieldtc/keymap.c @@ -0,0 +1,191 @@ +// Copyright 2022 Tommy Oldfield (@oldfieldtc) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +void render_logo(void); + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |BackSP| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LCTRL | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LAlt/⌥|LGUI/⌘|LOWER| /Space / \Enter \ |RAISE | Play |RGUI/⌘ | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + + [_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + 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, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_ENT, MO(2), KC_MPLY, KC_RGUI +), + +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | Mute |Vol - |Vol + | Play | Rwd | Fwd | | | | | | | DEL | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | ~ | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | Caps | | | | | |-------| |-------| | _ | + | { | } | |\ | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | | |LOWER | / / \ \ |RAISE | | | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +[_LOWER] = LAYOUT( + KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MRWD, KC_MFFD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, + 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_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NONUS_HASH, + KC_CAPS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NONUS_BACKSLASH, + KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO +), + +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 |-------. ,-------| | Left | Down | Up |Right | | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | F7 | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | # | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | | |LOWER | / / \ \ |RAISE | | | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + +[_RAISE] = LAYOUT( + 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_PLUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO + ), + +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | MODE | HUE- | SAT- | VAL- | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | | |LOWER | / / \ \ |RAISE | | | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + [_ADJUST] = LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, + KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +//SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk +#ifdef OLED_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +// When you add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +bool oled_task_user(void) { + if (is_keyboard_master()) { + // If you want to change the display of OLED, you need to change here + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + + oled_write_P(PSTR("WPM: "), false); + oled_write_ln(get_u8_str(get_current_wpm(), '0'), false); + } else { + render_logo(); + } + return false; +} +#endif // OLED_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_ENABLE + set_keylog(keycode, record); +#endif + + } + return true; +} + +void render_logo(void) { + static const char PROGMEM my_logo[] = { + // 'punpun 2', 128x32px + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0xe0, 0x70, 0x38, 0x1c, 0x0c, 0x06, 0x06, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, +0x02, 0x02, 0x02, 0x06, 0x06, 0x06, 0x04, 0x04, 0x0c, 0x0c, 0x08, 0x08, 0x18, 0x18, 0x18, 0x10, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x3f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x1c, 0x18, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x18, 0x10, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x70, 0x38, 0x1c, 0x06, 0x03, +0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x03, 0x02, 0x06, 0x04, 0x04, 0x0c, 0x08, 0x18, 0x18 + }; + oled_write_raw_P(my_logo, sizeof(my_logo)); +} \ No newline at end of file diff --git a/keyboards/lily58/keymaps/oldfieldtc/readme.md b/keyboards/lily58/keymaps/oldfieldtc/readme.md new file mode 100644 index 000000000000..8aa978d52e25 --- /dev/null +++ b/keyboards/lily58/keymaps/oldfieldtc/readme.md @@ -0,0 +1,22 @@ +# Lily58 keyboard keymap + +## Default layer +![Default keymap layer](https://i.imgur.com/c5kbMww.jpg) + +[Default layer - Keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/8ff6160c16e9b9ee7e104538bfad4a59) + +## Lower layer +![Lower keymap layer](https://i.imgur.com/GcLR3Uw.jpg) + +[Lower layer - Keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/7d77cd87c53d5eded50530242b852c20) + +## Raise layer +![Raise keymap layer](https://i.imgur.com/aNVwlKJ.jpg) + +[Raise layer - Keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/c7a63881a13e339f1b5b847637677e5f) + +## Adjust layer +![Adjust keymap layer](https://i.imgur.com/0l4c1Df.jpg) + +[Adjust layer - Keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/15a25bc84fa69a1b9f228574674728d3) + diff --git a/keyboards/lily58/keymaps/oldfieldtc/rules.mk b/keyboards/lily58/keymaps/oldfieldtc/rules.mk new file mode 100644 index 000000000000..004b46d64100 --- /dev/null +++ b/keyboards/lily58/keymaps/oldfieldtc/rules.mk @@ -0,0 +1,11 @@ +EXTRAKEY_ENABLE = yes +WPM_ENABLE = yes + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + ./lib/timelogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ \ No newline at end of file diff --git a/keyboards/lily58/keymaps/paulomp90/config.h b/keyboards/lily58/keymaps/paulomp90/config.h new file mode 100644 index 000000000000..b2cfbdd69c93 --- /dev/null +++ b/keyboards/lily58/keymaps/paulomp90/config.h @@ -0,0 +1,22 @@ +/* Copyright 2023 Paulo Pereira + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + + +#define QUICK_TAP_TERM 0 +#define TAPPING_TERM 150 +#define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/lily58/keymaps/paulomp90/features/custom_shift_keys.c b/keyboards/lily58/keymaps/paulomp90/features/custom_shift_keys.c new file mode 100644 index 000000000000..f2e091c0b9dc --- /dev/null +++ b/keyboards/lily58/keymaps/paulomp90/features/custom_shift_keys.c @@ -0,0 +1,67 @@ +/* Copyright 2023 Paulo Pereira + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "custom_shift_keys.h" + +bool process_custom_shift_keys(uint16_t keycode, keyrecord_t *record) { + static uint16_t registered_keycode = KC_NO; + + // If a custom shift key is registered, then this event is either + // releasing it or manipulating another key at the same time. Either way, + // we release the currently registered key. + if (registered_keycode != KC_NO) { + unregister_code16(registered_keycode); + registered_keycode = KC_NO; + } + + if (record->event.pressed) { // Press event. + const uint8_t mods = get_mods(); +#ifndef NO_ACTION_ONESHOT + if ((mods | get_weak_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) { +#else + if ((mods | get_weak_mods()) & MOD_MASK_SHIFT) { // Shift is held. +#endif // NO_ACTION_ONESHOT + // Continue default handling if this is a tap-hold key being held. + if ((IS_QK_MOD_TAP(keycode) || IS_QK_LAYER_TAP(keycode)) && + record->tap.count == 0) { + return true; + } + + // Search for a custom shift key whose keycode is `keycode`. + for (int i = 0; i < NUM_CUSTOM_SHIFT_KEYS; ++i) { + if (keycode == custom_shift_keys[i].keycode) { + registered_keycode = custom_shift_keys[i].shifted_keycode; + if (IS_QK_MODS(registered_keycode) && // Should key be shifted? + (QK_MODS_GET_MODS(registered_keycode) & MOD_LSFT) != 0) { + register_code16(registered_keycode); // If so, press directly. + } else { + // If not, cancel shift mods, press the key, and restore mods. + del_weak_mods(MOD_MASK_SHIFT); +#ifndef NO_ACTION_ONESHOT + del_oneshot_mods(MOD_MASK_SHIFT); +#endif // NO_ACTION_ONESHOT + unregister_mods(MOD_MASK_SHIFT); + register_code16(registered_keycode); + set_mods(mods); + } + return false; + } + } + } + } + + return true; // Continue with default handling. +} diff --git a/keyboards/lily58/keymaps/paulomp90/features/custom_shift_keys.h b/keyboards/lily58/keymaps/paulomp90/features/custom_shift_keys.h new file mode 100644 index 000000000000..2097f2bb7ea3 --- /dev/null +++ b/keyboards/lily58/keymaps/paulomp90/features/custom_shift_keys.h @@ -0,0 +1,29 @@ +/* Copyright 2023 Paulo Pereira + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#pragma once +#include QMK_KEYBOARD_H + +typedef struct { + uint16_t keycode; + uint16_t shifted_keycode; +} custom_shift_key_t; + +extern const custom_shift_key_t custom_shift_keys[]; +extern uint8_t NUM_CUSTOM_SHIFT_KEYS; + +bool process_custom_shift_keys(uint16_t keycode, keyrecord_t *record); \ No newline at end of file diff --git a/keyboards/lily58/keymaps/paulomp90/keymap.c b/keyboards/lily58/keymaps/paulomp90/keymap.c new file mode 100644 index 000000000000..af0fafb33739 --- /dev/null +++ b/keyboards/lily58/keymaps/paulomp90/keymap.c @@ -0,0 +1,264 @@ +/* Copyright 2023 Paulo Pereira + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +#include "keymap_portuguese.h" +#include "features/custom_shift_keys.h" + +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +/* tap dance shifts */ +typedef struct { + bool is_press_action; + int state; +} tap; + +typedef enum { + TD_NONE, + TD_UNKNOWN, + TD_SINGLE_TAP, + TD_SINGLE_HOLD, + TD_DOUBLE_TAP +} td_state_t; + +enum { LEFT_SHIFT = 0, RIGHT_SHIFT = 1 }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | '? | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | +* | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LShift| A | S | D | F | G |-------. ,-------| H | J | K | L | Ç | BACK | + * |------+------+------+------+------+------| <> | | ´` |------+------+------+------+------+------| + * |LCTRL | Z | X | C | V | B |-------| |-------| N | M | ,; | .: | _- |Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE | RGUI | RAlt | + * | | | |/ / \ \ | | | | + * `-------------------''-------' '------''--------------------' + */ + [_QWERTY] = LAYOUT( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, + TD(LEFT_SHIFT), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSPC, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(RIGHT_SHIFT), + KC_LALT, KC_LGUI, TL_LOWR, KC_SPC, KC_ENT, TL_UPPR, KC_RGUI, KC_RALT + ), + + /* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | | | | | | | PgUp | HOME | Up | END | ºª | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| PgDn | Left | Down |Right | ~^ | DEL | + * |------+------+------+------+------+------| <> | | ´` |------+------+------+------+------+------| + * | | | | << | >|| | >> |-------| |-------| | Vol+ | Vol- | Mute | \| | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE | RGUI | RAlt | + * | | | |/ / \ \ | | | | + * `-------------------''-------' '------''--------------------' + */ + [_LOWER] = LAYOUT( + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, + KC_F1, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_LBRC, KC_F12, + _______, _______, _______, _______, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_QUOT, KC_DEL, + _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_VOLU, KC_VOLD, KC_MUTE, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | 1 | 2 | 3 | 4 | 5 | | PgUp | HOME | Up | END | ºª | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | 6 | 7 | 8 | 9 | 0 |-------. ,-------| PgDn | Left | Down |Right | ~^ | | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | << | >|| | >> |-------| |-------| | Vol+ | Vol- | Mute | \| | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE | RGUI | RAlt | + * | | | |/ / \ \ | | | | + * `-------------------''-------' '------''--------------------' + */ + [_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_LBRC, _______, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_QUOT, _______, + _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_VOLU, KC_VOLD, KC_MUTE, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |RGB ON| HUE+ | SAT+ | VAL+ | | BRG+ |-------. ,-------| | | | | | | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | MODE | HUE- | SAT- | VAL- | | BRG- |-------| |-------| | | | | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE | RGUI | RAlt | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + + [_ADJUST] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_BRIU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BRID, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +// SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk +#ifdef OLED_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +// When you add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +bool oled_task_user(void) { + if (is_keyboard_master()) { + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + } else { + oled_write(read_logo(), false); + } + return false; +} +#endif // OLED_ENABLE + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + #ifdef OLED_ENABLE + set_keylog(keycode, record); + #endif + } + + return true; +} + +/* Tap dance shifts */ +td_state_t cur_dance(tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { + return TD_SINGLE_TAP; + } else { + return TD_SINGLE_HOLD; + } + } else if (state->count == 2) { + return TD_DOUBLE_TAP; + } + + return TD_UNKNOWN; +} + +static tap lshifttap_state = {.is_press_action = true, .state = TD_NONE}; + +static tap rshifttap_state = {.is_press_action = true, .state = TD_NONE}; + +void lshift_finished(tap_dance_state_t *state, void *user_data) { + lshifttap_state.state = cur_dance(state); + + switch (lshifttap_state.state) { + case TD_SINGLE_TAP: + register_code16(LALT(KC_LEFT)); + break; + case TD_SINGLE_HOLD: + register_code(KC_LSFT); + break; + case TD_DOUBLE_TAP: + tap_code16(LALT(KC_LEFT)); + register_code16(LALT(KC_LEFT)); + break; + default: + break; + } +} + +void lshift_reset(tap_dance_state_t *state, void *user_data) { + switch (lshifttap_state.state) { + case TD_SINGLE_TAP: + unregister_code16(LALT(KC_LEFT)); + break; + case TD_SINGLE_HOLD: + unregister_code(KC_LSFT); + break; + case TD_DOUBLE_TAP: + unregister_code16(LALT(KC_LEFT)); + break; + } + lshifttap_state.state = TD_NONE; +} + +void rshift_finished(tap_dance_state_t *state, void *user_data) { + rshifttap_state.state = cur_dance(state); + + switch (rshifttap_state.state) { + case TD_SINGLE_TAP: + register_code16(LALT(KC_RGHT)); + break; + case TD_SINGLE_HOLD: + register_code(KC_RSFT); + break; + case TD_DOUBLE_TAP: + tap_code16(LALT(KC_RGHT)); + register_code16(LALT(KC_RGHT)); + break; + default: + break; + } +} + +void rshift_reset(tap_dance_state_t *state, void *user_data) { + switch (rshifttap_state.state) { + case TD_SINGLE_TAP: + unregister_code16(LALT(KC_RGHT)); + break; + case TD_SINGLE_HOLD: + unregister_code(KC_RSFT); + break; + case TD_DOUBLE_TAP: + unregister_code16(LALT(KC_RGHT)); + break; + } + rshifttap_state.state = TD_NONE; +} + +tap_dance_action_t tap_dance_actions[] = { + [LEFT_SHIFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lshift_finished, lshift_reset), + [RIGHT_SHIFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rshift_finished, rshift_reset), +}; diff --git a/keyboards/lily58/keymaps/paulomp90/readme.md b/keyboards/lily58/keymaps/paulomp90/readme.md new file mode 100644 index 000000000000..9ab72cd0b2c5 --- /dev/null +++ b/keyboards/lily58/keymaps/paulomp90/readme.md @@ -0,0 +1,10 @@ +# Paulo Lily58 + +Lily58 is 6×4 column-staggered split keyboard. + +![Keymap first layer](https://i.postimg.cc/HWcgcxb8/lily58.png "Keymap first layer") + +- Add portuguese include +- Add custom shift behaviour, when tap move by 1 word left <> right, when held act as shift. +idea taken from [here](https://getreuer.info/posts/keyboards/custom-shift-keys/index.html). + diff --git a/keyboards/lily58/keymaps/paulomp90/rules.mk b/keyboards/lily58/keymaps/paulomp90/rules.mk new file mode 100644 index 000000000000..d7bfc9739429 --- /dev/null +++ b/keyboards/lily58/keymaps/paulomp90/rules.mk @@ -0,0 +1,14 @@ +EXTRAKEY_ENABLE = yes # Audio control and System control +OLED_ENABLE= yes # OLED display +TAP_DANCE_ENABLE = yes +TRI_LAYER_ENABLE = yes + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + features/custom_shift_keys.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/keyboards/lxxt/config.h b/keyboards/lxxt/config.h new file mode 100644 index 000000000000..03ef56622c0c --- /dev/null +++ b/keyboards/lxxt/config.h @@ -0,0 +1,19 @@ +/* Copyright 2023 DeskDaily + * + * 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 WS2812_PIO_USE_PIO1 \ No newline at end of file diff --git a/keyboards/lxxt/info.json b/keyboards/lxxt/info.json new file mode 100644 index 000000000000..0a90b3e00bca --- /dev/null +++ b/keyboards/lxxt/info.json @@ -0,0 +1,133 @@ +{ + "keyboard_name": "LXXT", + "manufacturer": "DeskDaily", + "url": "", + "maintainer": "DeskDaily", + "usb": { + "vid": "0x5003", + "pid": "0x0001", + "device_version": "0.0.1" + }, + "encoder": { + "rotary": [ + {"pin_a": "GP27", "pin_b": "GP28"}, + {"pin_a": "GP8", "pin_b": "GP9"} + ] + }, + "processor": "RP2040", + "bootloader": "rp2040", + "matrix_pins": { + "rows": ["GP29", "GP26", "GP22", "GP24", "GP17"], + "cols": ["GP25", "GP23", "GP7", "GP0", "GP15", "GP14", "GP13", "GP12", "GP11", "GP10", "GP6", "GP5", "GP4", "GP3", "GP2", "GP1"] + }, + "rgblight": { + "pin": "GP21", + "led_count": 16, + "hue_steps": 8, + "saturation_steps": 8, + "brightness_steps": 8, + "max_brightness": 255, + "sleep": true, + "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 + } + }, + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "console": false, + "command": false, + "nkro": true, + "rgblight": true + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1.25, "y": 0}, + {"matrix": [0, 2], "x": 2.25, "y": 0}, + {"matrix": [0, 3], "x": 3.25, "y": 0}, + {"matrix": [0, 4], "x": 4.25, "y": 0}, + {"matrix": [0, 5], "x": 5.25, "y": 0}, + {"matrix": [0, 6], "x": 6.25, "y": 0}, + {"matrix": [0, 7], "x": 7.25, "y": 0}, + {"matrix": [0, 8], "x": 8.25, "y": 0}, + {"matrix": [0, 9], "x": 9.25, "y": 0}, + {"matrix": [0, 10], "x": 10.25, "y": 0}, + {"matrix": [0, 11], "x": 11.25, "y": 0}, + {"matrix": [0, 12], "x": 12.25, "y": 0}, + {"matrix": [0, 13], "x": 13.25, "y": 0}, + {"matrix": [0, 14], "x": 14.25, "y": 0}, + {"matrix": [1, 14], "x": 15.25, "y": 0}, + {"matrix": [0, 15], "x": 16.5, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1.25, "y": 1, "w": 1.5}, + {"matrix": [1, 2], "x": 2.75, "y": 1}, + {"matrix": [1, 3], "x": 3.75, "y": 1}, + {"matrix": [1, 4], "x": 4.75, "y": 1}, + {"matrix": [1, 5], "x": 5.75, "y": 1}, + {"matrix": [1, 6], "x": 6.75, "y": 1}, + {"matrix": [1, 7], "x": 7.75, "y": 1}, + {"matrix": [1, 8], "x": 8.75, "y": 1}, + {"matrix": [1, 9], "x": 9.75, "y": 1}, + {"matrix": [1, 10], "x": 10.75, "y": 1}, + {"matrix": [1, 11], "x": 11.75, "y": 1}, + {"matrix": [1, 12], "x": 12.75, "y": 1}, + {"matrix": [1, 13], "x": 13.75, "y": 1}, + {"matrix": [2, 14], "x": 14.75, "y": 1, "w": 1.5}, + {"matrix": [1, 15], "x": 16.5, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1.25, "y": 2, "w": 1.75}, + {"matrix": [2, 2], "x": 3, "y": 2}, + {"matrix": [2, 3], "x": 4, "y": 2}, + {"matrix": [2, 4], "x": 5, "y": 2}, + {"matrix": [2, 5], "x": 6, "y": 2}, + {"matrix": [2, 6], "x": 7, "y": 2}, + {"matrix": [2, 7], "x": 8, "y": 2}, + {"matrix": [2, 8], "x": 9, "y": 2}, + {"matrix": [2, 9], "x": 10, "y": 2}, + {"matrix": [2, 10], "x": 11, "y": 2}, + {"matrix": [2, 11], "x": 12, "y": 2}, + {"matrix": [2, 12], "x": 13, "y": 2}, + {"matrix": [2, 13], "x": 14, "y": 2, "w": 2.25}, + {"matrix": [2, 15], "x": 16.5, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1.25, "y": 3, "w": 2.25}, + {"matrix": [3, 3], "x": 3.5, "y": 3}, + {"matrix": [3, 4], "x": 4.5, "y": 3}, + {"matrix": [3, 5], "x": 5.5, "y": 3}, + {"matrix": [3, 6], "x": 6.5, "y": 3}, + {"matrix": [3, 7], "x": 7.5, "y": 3}, + {"matrix": [3, 8], "x": 8.5, "y": 3}, + {"matrix": [3, 9], "x": 9.5, "y": 3}, + {"matrix": [3, 10], "x": 10.5, "y": 3}, + {"matrix": [3, 11], "x": 11.5, "y": 3}, + {"matrix": [3, 12], "x": 12.5, "y": 3}, + {"matrix": [3, 13], "x": 13.5, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 15.25, "y": 3}, + {"matrix": [3, 15], "x": 16.5, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4}, + {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 1.25}, + {"matrix": [4, 8], "x": 5, "y": 4, "w": 6.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}, + {"matrix": [4, 14], "x": 15, "y": 4, "w": 1.25}, + {"matrix": [4, 15], "x": 16.5, "y": 4} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/lxxt/keymaps/default/keymap.c b/keyboards/lxxt/keymaps/default/keymap.c new file mode 100644 index 000000000000..d9d74d27418d --- /dev/null +++ b/keyboards/lxxt/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2023 DeskDaily + * + * 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( + KC_TRNS, 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_BSPC, KC_TRNS, + KC_TRNS, 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_TRNS, + KC_TRNS, 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_TRNS, + KC_TRNS, 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_LSFT, KC_TRNS, + KC_TRNS, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_RGUI, KC_APP, KC_LCTL, KC_TRNS + ), +}; + diff --git a/keyboards/lxxt/keymaps/via/keymap.c b/keyboards/lxxt/keymaps/via/keymap.c new file mode 100644 index 000000000000..c2b6c2f59d0d --- /dev/null +++ b/keyboards/lxxt/keymaps/via/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2023 DeskDaily + * + * 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( + KC_TRNS, 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_BSPC, KC_TRNS, + KC_TRNS, 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_TRNS, + KC_TRNS, 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_TRNS, + KC_TRNS, 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_LSFT, KC_TRNS, + KC_TRNS, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_RGUI, KC_APP, KC_LCTL, KC_TRNS + ), + + [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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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), ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, + [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + }; +#endif \ No newline at end of file diff --git a/keyboards/lxxt/keymaps/via/rules.mk b/keyboards/lxxt/keymaps/via/rules.mk new file mode 100644 index 000000000000..aaf0497be139 --- /dev/null +++ b/keyboards/lxxt/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/lxxt/lxxt.c b/keyboards/lxxt/lxxt.c new file mode 100644 index 000000000000..0c4401c32b15 --- /dev/null +++ b/keyboards/lxxt/lxxt.c @@ -0,0 +1,42 @@ +/* Copyright 2023 DeskDaily + * + * 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 "quantum.h" + +#if defined(ENCODER_ENABLE) + +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_kb(index, clockwise)) { + return false; /* Don't process further events if user function exists and returns false */ + } + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code_delay(KC_VOLU, 10); + } else { + tap_code_delay(KC_VOLD, 10); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code_delay(KC_BRIU, 10); + } else { + tap_code_delay(KC_BRID, 10); + } + } + return true; +} + +#endif \ No newline at end of file diff --git a/keyboards/lxxt/readme.md b/keyboards/lxxt/readme.md new file mode 100644 index 000000000000..4edfee278742 --- /dev/null +++ b/keyboards/lxxt/readme.md @@ -0,0 +1,24 @@ +# LXXT + +A 60% pcb with extra columns on the left and right part (Extended 60%) + +* Keyboard Maintainer: [DeskDaily](https://github.com/DeskDaily) +* Hardware Supported: RP2040 + +Make example for this keyboard (after setting up your build environment): + + make lxxt:default + +Flashing example for this keyboard: + + make lxxt:default:flash + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the upper left key/esc) 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/lxxt/rules.mk b/keyboards/lxxt/rules.mk new file mode 100644 index 000000000000..7fbf8d36abf3 --- /dev/null +++ b/keyboards/lxxt/rules.mk @@ -0,0 +1,3 @@ +ENCODER_ENABLE = yes + +WS2812_DRIVER = vendor diff --git a/keyboards/momokai/tap_duo/readme.md b/keyboards/momokai/tap_duo/readme.md index 8027955ba241..8afb5181b467 100644 --- a/keyboards/momokai/tap_duo/readme.md +++ b/keyboards/momokai/tap_duo/readme.md @@ -2,7 +2,8 @@ * Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) - +* Hardware Supported: Tap Duo +* Hardware Availability: [Momokai](https://www.momokai.com/) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/momokai/tap_trio/readme.md b/keyboards/momokai/tap_trio/readme.md index 8027955ba241..c97a681fa7b4 100644 --- a/keyboards/momokai/tap_trio/readme.md +++ b/keyboards/momokai/tap_trio/readme.md @@ -2,7 +2,8 @@ * Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) - +* Hardware Supported: Tap Trio +* Hardware Availability: [Momokai](https://www.momokai.com/) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/planck/keymaps/peterfalken/config.h b/keyboards/planck/keymaps/peterfalken/config.h new file mode 100644 index 000000000000..4b14b7756b8e --- /dev/null +++ b/keyboards/planck/keymaps/peterfalken/config.h @@ -0,0 +1,49 @@ +/* Copyright 2015-2021 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef AUDIO_ENABLE +# define STARTUP_SONG SONG(PLANCK_SOUND) +// #define STARTUP_SONG SONG(NO_SOUND) + +# define DEFAULT_LAYER_SONGS \ + { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND) } +#endif + +/* + * MIDI options + */ + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/planck/keymaps/peterfalken/keymap.c b/keyboards/planck/keymaps/peterfalken/keymap.c new file mode 100644 index 000000000000..140149c47233 --- /dev/null +++ b/keyboards/planck/keymaps/peterfalken/keymap.c @@ -0,0 +1,80 @@ +// Copyright 2023 Peter.Falken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "muse.h" +#include "peterfalken.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | Ctrl | Opt | Cmd | LWR | Space | RSE | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + 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_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 , + _______, KC_LCTL, KC_LOPT, KC_LCMD, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | ▽ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ ▽ | ▽ | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, 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_planck_grid( + 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | RSET | ▽ | M.AP | M.AL | LPAD | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | SLEP | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CPWD | UN | CU | CO | PA | MV | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + QK_BOOT, _______, CK_M1, KC_MCTL, KC_LPAD, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_SLP, + CK_CW, _______, CK_CU, CK_CO, CK_PA, CK_MV, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; diff --git a/keyboards/4pplet/bootleg/rev_a/rev_a.c b/keyboards/planck/keymaps/peterfalken/readme.md similarity index 87% rename from keyboards/4pplet/bootleg/rev_a/rev_a.c rename to keyboards/planck/keymaps/peterfalken/readme.md index b4f233d379e8..f64d682a51ed 100644 --- a/keyboards/4pplet/bootleg/rev_a/rev_a.c +++ b/keyboards/planck/keymaps/peterfalken/readme.md @@ -1,5 +1,4 @@ -/* -Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> +Copyright 2023 LEG @PeterFalken 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 +12,3 @@ 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 "rev_a.h" diff --git a/keyboards/planck/keymaps/peterfalken/rules.mk b/keyboards/planck/keymaps/peterfalken/rules.mk new file mode 100644 index 000000000000..a33c6c1ddb85 --- /dev/null +++ b/keyboards/planck/keymaps/peterfalken/rules.mk @@ -0,0 +1,8 @@ +# Setup keymap QMK features +# TODO: Check for space optimizations +AUDIO_ENABLE = yes # Enable Audio Output +ENCODER_ENABLE = no # Disable encoder + +ifeq ($(strip $(AUDIO_ENABLE)), yes) + SRC += muse.c +endif diff --git a/keyboards/preonic/keymaps/peterfalken/config.h b/keyboards/preonic/keymaps/peterfalken/config.h new file mode 100644 index 000000000000..797bd2c78db2 --- /dev/null +++ b/keyboards/preonic/keymaps/peterfalken/config.h @@ -0,0 +1,49 @@ +/* Copyright 2015-2021 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef AUDIO_ENABLE +# define STARTUP_SONG SONG(PREONIC_SOUND) +// #define STARTUP_SONG SONG(NO_SOUND) + +# define DEFAULT_LAYER_SONGS \ + { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND) } +#endif + +/* + * MIDI options + */ + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/preonic/keymaps/peterfalken/keymap.c b/keyboards/preonic/keymaps/peterfalken/keymap.c new file mode 100644 index 000000000000..7123ba766971 --- /dev/null +++ b/keyboards/preonic/keymaps/peterfalken/keymap.c @@ -0,0 +1,92 @@ +// Copyright 2023 Peter.Falken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "muse.h" +#include "peterfalken.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + 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_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, + _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ▽ | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | ▽ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ ▽ | ▽ | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 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_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | RSET | ▽ | M.AP | M.AL | LPAD | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | SLEP | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CPWD | UN | CU | CO | PA | MV | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + QK_BOOT, _______, CK_M1, KC_MCTL, KC_LPAD, _______, _______, _______, _______, _______, _______, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_SLP, + CK_CW, _______, CK_CU, CK_CO, CK_PA, CK_MV, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; diff --git a/keyboards/4pplet/aekiso60/rev_b/rev_b.c b/keyboards/preonic/keymaps/peterfalken/readme.md similarity index 87% rename from keyboards/4pplet/aekiso60/rev_b/rev_b.c rename to keyboards/preonic/keymaps/peterfalken/readme.md index 4928bbc23a40..f64d682a51ed 100644 --- a/keyboards/4pplet/aekiso60/rev_b/rev_b.c +++ b/keyboards/preonic/keymaps/peterfalken/readme.md @@ -1,5 +1,4 @@ -/* -Copyright 2022 Stefan Sundin "4pplet" <4pplet@protonmail.com> +Copyright 2023 LEG @PeterFalken 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,7 +12,3 @@ 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 "rev_b.h" - - diff --git a/keyboards/preonic/keymaps/peterfalken/rules.mk b/keyboards/preonic/keymaps/peterfalken/rules.mk new file mode 100644 index 000000000000..a33c6c1ddb85 --- /dev/null +++ b/keyboards/preonic/keymaps/peterfalken/rules.mk @@ -0,0 +1,8 @@ +# Setup keymap QMK features +# TODO: Check for space optimizations +AUDIO_ENABLE = yes # Enable Audio Output +ENCODER_ENABLE = no # Disable encoder + +ifeq ($(strip $(AUDIO_ENABLE)), yes) + SRC += muse.c +endif diff --git a/keyboards/smithrune/iron160/iron160_h/config.h b/keyboards/smithrune/iron160/iron160_h/config.h new file mode 100644 index 000000000000..4edf24a4d9d0 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_h/config.h @@ -0,0 +1,18 @@ +/* +Copyright 2022 Gondolindrim +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 + +/* Defining RGB default brightness to zero */ +#define RGBLIGHT_DEFAULT_VAL 0 diff --git a/keyboards/smithrune/iron160/iron160_h/halconf.h b/keyboards/smithrune/iron160/iron160_h/halconf.h new file mode 100644 index 000000000000..d4123d91eeb8 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_h/halconf.h @@ -0,0 +1,26 @@ +/* Copyright 2022 Gondolindrim + * + * 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 . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/iron180/halconf.h -r platforms/chibios/common/configs/halconf.h` + */ + +#pragma once + +#define HAL_USE_SPI TRUE + +#include_next diff --git a/keyboards/smithrune/iron160/iron160_h/info.json b/keyboards/smithrune/iron160/iron160_h/info.json new file mode 100644 index 000000000000..0c2886206814 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_h/info.json @@ -0,0 +1,90 @@ +{ + "keyboard_name": "I160-H", + "manufacturer": "SmithRune", + "url": "", + "maintainer": "Gondolindrim", + "usb": { + "vid": "0x8384", + "pid": "0x1648", + "device_version": "0.0.1" + }, + "processor": "STM32F072", + "bootloader": "stm32-dfu", + "matrix_pins": { + "cols": ["A3" , "B9" , "B8" , "B5" , "B4", "B3" , "A6" , "A5" , "A4" , "A2" , "A1" , "A0" , "C15" , "C14"], + "rows": ["A10", "A15", "C13", "A7" , "B0"] + }, + "rgblight": { + "led_count": 1, + "pin": "B15" + }, + "diode_direction": "COL2ROW", + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "matrix": [0, 0 ], "w": 1, "x": 0, "y": 0 }, + { "label": "1", "matrix": [0, 1 ], "w": 1, "x": 1, "y": 0 }, + { "label": "2", "matrix": [0, 2 ], "w": 1, "x": 2, "y": 0 }, + { "label": "3", "matrix": [0, 3 ], "w": 1, "x": 3, "y": 0 }, + { "label": "4", "matrix": [0, 4 ], "w": 1, "x": 4, "y": 0 }, + { "label": "5", "matrix": [0, 5 ], "w": 1, "x": 5, "y": 0 }, + { "label": "6", "matrix": [0, 6 ], "w": 1, "x": 6, "y": 0 }, + { "label": "7", "matrix": [0, 7 ], "w": 1, "x": 7, "y": 0 }, + { "label": "8", "matrix": [0, 8 ], "w": 1, "x": 8, "y": 0 }, + { "label": "9", "matrix": [0, 9 ], "w": 1, "x": 9, "y": 0 }, + { "label": "0", "matrix": [0, 10], "w": 1, "x": 10, "y": 0 }, + { "label": "_", "matrix": [0, 11], "w": 1, "x": 11, "y": 0 }, + { "label": "+", "matrix": [0, 12], "w": 1, "x": 12, "y": 0 }, + { "label": "Bspc", "matrix": [0, 13], "w": 1, "x": 13, "y": 0 }, + { "label": "Bspc", "matrix": [4, 13], "w": 1, "x": 14, "y": 0 }, + { "label": "Tab", "matrix": [1, 0 ], "w": 1.5, "x": 0, "y": 1 }, + { "label": "Q", "matrix": [1, 1 ], "w": 1, "x": 1.5, "y": 1 }, + { "label": "W", "matrix": [1, 2 ], "w": 1, "x": 2.5, "y": 1 }, + { "label": "E", "matrix": [1, 3 ], "w": 1, "x": 3.5, "y": 1 }, + { "label": "R", "matrix": [1, 4 ], "w": 1, "x": 4.5, "y": 1 }, + { "label": "T", "matrix": [1, 5 ], "w": 1, "x": 5.5, "y": 1 }, + { "label": "Y", "matrix": [1, 6 ], "w": 1, "x": 6.5, "y": 1 }, + { "label": "U", "matrix": [1, 7 ], "w": 1, "x": 7.5, "y": 1 }, + { "label": "I", "matrix": [1, 8 ], "w": 1, "x": 8.5, "y": 1 }, + { "label": "O", "matrix": [1, 9 ], "w": 1, "x": 9.5, "y": 1 }, + { "label": "P", "matrix": [1, 10], "w": 1, "x": 10.5, "y": 1 }, + { "label": "{", "matrix": [1, 11], "w": 1, "x": 11.5, "y": 1 }, + { "label": "}", "matrix": [1, 12], "w": 1, "x": 12.5, "y": 1 }, + { "label": "|", "matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1 }, + { "label": "Caps", "matrix": [2, 0 ], "w": 1.75, "x": 0, "y": 2 }, + { "label": "A", "matrix": [2, 1 ], "w": 1, "x": 1.75, "y": 2 }, + { "label": "S", "matrix": [2, 2 ], "w": 1, "x": 2.75, "y": 2 }, + { "label": "D", "matrix": [2, 3 ], "w": 1, "x": 3.75, "y": 2 }, + { "label": "F", "matrix": [2, 4 ], "w": 1, "x": 4.75, "y": 2 }, + { "label": "G", "matrix": [2, 5 ], "w": 1, "x": 5.75, "y": 2 }, + { "label": "H", "matrix": [2, 6 ], "w": 1, "x": 6.75, "y": 2 }, + { "label": "J", "matrix": [2, 7 ], "w": 1, "x": 7.75, "y": 2 }, + { "label": "K", "matrix": [2, 8 ], "w": 1, "x": 8.75, "y": 2 }, + { "label": "L", "matrix": [2, 9 ], "w": 1, "x": 9.75, "y": 2 }, + { "label": ":", "matrix": [2, 10], "w": 1, "x": 10.75, "y": 2 }, + { "label": "\"", "matrix": [2, 11], "w": 1, "x": 11.75, "y": 2 }, + { "label": "Enter", "matrix": [2, 13], "w": 1.25, "x": 12.75, "y": 2 }, + { "label": "Shift", "matrix": [3, 0 ], "w": 1.25, "x": 0, "y": 3 }, + { "label": "Z", "matrix": [3, 2 ], "w": 1, "x": 2.25, "y": 3 }, + { "label": "X", "matrix": [3, 3 ], "w": 1, "x": 3.25, "y": 3 }, + { "label": "C", "matrix": [3, 4 ], "w": 1, "x": 4.25, "y": 3 }, + { "label": "V", "matrix": [3, 5 ], "w": 1, "x": 5.25, "y": 3 }, + { "label": "B", "matrix": [3, 6 ], "w": 1, "x": 6.25, "y": 3 }, + { "label": "N", "matrix": [3, 7 ], "w": 1, "x": 7.25, "y": 3 }, + { "label": "M", "matrix": [3, 8 ], "w": 1, "x": 8.25, "y": 3 }, + { "label": "<", "matrix": [3, 9 ], "w": 1, "x": 9.25, "y": 3 }, + { "label": ">", "matrix": [3, 10], "w": 1, "x": 10.25, "y": 3 }, + { "label": "?", "matrix": [3, 11], "w": 1, "x": 11.25, "y": 3 }, + { "label": "Shift", "matrix": [3, 12], "w": 1.75, "x": 12.25, "y": 3 }, + { "label": "MO(1)", "matrix": [3, 13], "w": 1, "x": 14, "y": 3 }, + { "label": "Ctrl", "matrix": [4, 0 ], "w": 1.25, "x": 0, "y": 4 }, + { "label": "Win", "matrix": [4, 1 ], "w": 1, "x": 1.5, "y": 4 }, + { "label": "Alt", "matrix": [4, 2 ], "w": 1.25, "x": 2.5, "y": 4 }, + { "label": "Space", "matrix": [4, 6 ], "w": 7, "x": 4, "y": 4 }, + { "label": "Alt", "matrix": [4, 10], "w": 1.5, "x": 11, "y": 4 }, + { "label": "Win", "matrix": [4, 11], "w": 1, "x": 12.5, "y": 4 }, + { "label": "Ctrl", "matrix": [4, 12], "w": 1.5, "x": 13.5, "y": 4 } + ] + } + } +} diff --git a/keyboards/smithrune/iron160/iron160_h/iron160_h.c b/keyboards/smithrune/iron160/iron160_h/iron160_h.c new file mode 100644 index 000000000000..d87d4cbf3bc4 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_h/iron160_h.c @@ -0,0 +1,29 @@ +/* +Copyright 2022 Gondolindrim + +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 "quantum.h" + +// Defining indicator colors +uint8_t caps_color[3] = {0x33,0x33,0x33}; + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + led_state.caps_lock ? rgblight_setrgb_at(caps_color[0], caps_color[1], caps_color[2], 0) : rgblight_setrgb_at(0x00,0x00,0x00,0); + } + return res; +} diff --git a/keyboards/smithrune/iron160/iron160_h/keymaps/default/keymap.c b/keyboards/smithrune/iron160/iron160_h/keymaps/default/keymap.c new file mode 100755 index 000000000000..b39e8d72eb40 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_h/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2022 Gondolindrim + +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( + QK_GESC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1) , + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC , KC_RALT, KC_RWIN, MO(1) , KC_RCTL + ), + [1] = LAYOUT( + QK_BOOT , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/smithrune/iron160/iron160_h/keymaps/via/keymap.c b/keyboards/smithrune/iron160/iron160_h/keymaps/via/keymap.c new file mode 100755 index 000000000000..5a700c2ee870 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_h/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2022 Gondolindrim + +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( + QK_GESC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1) , + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC , KC_RALT, KC_RWIN, KC_RCTL, KC_BSPC + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/smithrune/iron160/iron160_h/keymaps/via/rules.mk b/keyboards/smithrune/iron160/iron160_h/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_h/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/smithrune/iron160/iron160_h/mcuconf.h b/keyboards/smithrune/iron160/iron160_h/mcuconf.h new file mode 100644 index 000000000000..357bfe1c6c7d --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_h/mcuconf.h @@ -0,0 +1,23 @@ +/* Copyright 2022 Gondolindrim + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#pragma once + +#include_next + +#undef STM32_SPI_USE_SPI2 +#define STM32_SPI_USE_SPI2 TRUE diff --git a/keyboards/smithrune/iron160/iron160_h/rules.mk b/keyboards/smithrune/iron160/iron160_h/rules.mk new file mode 100644 index 000000000000..4c6ba89ef9d0 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_h/rules.mk @@ -0,0 +1,20 @@ +# 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 = yes # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = no +LTO_ENABLE = no + +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = legacy + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/smithrune/iron160/iron160_s/config.h b/keyboards/smithrune/iron160/iron160_s/config.h new file mode 100644 index 000000000000..e5da34f31218 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_s/config.h @@ -0,0 +1,26 @@ +/* +Copyright 2022 Gondolindrim + +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 BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 2 +#define BACKLIGHT_PAL_MODE 1 +/* 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 diff --git a/keyboards/smithrune/iron160/iron160_s/halconf.h b/keyboards/smithrune/iron160/iron160_s/halconf.h new file mode 100644 index 000000000000..8fcc53fced12 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_s/halconf.h @@ -0,0 +1,26 @@ +/* Copyright 2022 Gondolindrim + * + * 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 . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/iron180/halconf.h -r platforms/chibios/common/configs/halconf.h` + */ + +#pragma once + +#define HAL_USE_PWM TRUE + +#include_next diff --git a/keyboards/smithrune/iron160/iron160_s/info.json b/keyboards/smithrune/iron160/iron160_s/info.json new file mode 100644 index 000000000000..5eda7443b431 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_s/info.json @@ -0,0 +1,98 @@ +{ + "keyboard_name": "I160-S", + "manufacturer": "SmithRune", + "url": "", + "maintainer": "Gondolindrim", + "usb": { + "vid": "0x8384", + "pid": "0x1653", + "device_version": "0.0.1" + }, + "processor": "STM32F072", + "bootloader": "stm32-dfu", + "matrix_pins": { + "cols": ["A3", "B9", "B8", "B5", "B4", "B3", "A6", "A5", "A4", "A2", "A1", "A0", "C15", "C14"], + "rows": ["A10", "A15", "C13", "B1", "B10"] + }, + "diode_direction": "COL2ROW", + "backlight": { + "pin": "A7", + "levels": 20, + "breathing": true, + "breathing_period": 3 + }, + "indicators": { + "caps_lock": "B0" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "~", "matrix": [0, 0 ], "w": 1, "x": 0, "y": 0 }, + { "label": "!", "matrix": [0, 1 ], "w": 1, "x": 1, "y": 0 }, + { "label": "@", "matrix": [0, 2 ], "w": 1, "x": 2, "y": 0 }, + { "label": "#", "matrix": [0, 3 ], "w": 1, "x": 3, "y": 0 }, + { "label": "$", "matrix": [0, 4 ], "w": 1, "x": 4, "y": 0 }, + { "label": "%", "matrix": [0, 5 ], "w": 1, "x": 5, "y": 0 }, + { "label": "^", "matrix": [0, 6 ], "w": 1, "x": 6, "y": 0 }, + { "label": "&", "matrix": [0, 7 ], "w": 1, "x": 7, "y": 0 }, + { "label": "*", "matrix": [0, 8 ], "w": 1, "x": 8, "y": 0 }, + { "label": "(", "matrix": [0, 9 ], "w": 1, "x": 9, "y": 0 }, + { "label": ")", "matrix": [0, 10], "w": 1, "x": 10, "y": 0 }, + { "label": "_", "matrix": [0, 11], "w": 1, "x": 11, "y": 0 }, + { "label": "+", "matrix": [0, 12], "w": 1, "x": 12, "y": 0 }, + { "label": "Bspc", "matrix": [0, 13], "w": 1, "x": 13, "y": 0 }, + { "label": "Bspc", "matrix": [4, 13], "w": 1, "x": 14, "y": 0 }, + { "label": "Tab", "matrix": [1, 0 ], "w": 1.5, "x": 0, "y": 1 }, + { "label": "Q", "matrix": [1, 1 ], "w": 1, "x": 1.5, "y": 1 }, + { "label": "W", "matrix": [1, 2 ], "w": 1, "x": 2.5, "y": 1 }, + { "label": "E", "matrix": [1, 3 ], "w": 1, "x": 3.5, "y": 1 }, + { "label": "R", "matrix": [1, 4 ], "w": 1, "x": 4.5, "y": 1 }, + { "label": "T", "matrix": [1, 5 ], "w": 1, "x": 5.5, "y": 1 }, + { "label": "Y", "matrix": [1, 6 ], "w": 1, "x": 6.5, "y": 1 }, + { "label": "U", "matrix": [1, 7 ], "w": 1, "x": 7.5, "y": 1 }, + { "label": "I", "matrix": [1, 8 ], "w": 1, "x": 8.5, "y": 1 }, + { "label": "O", "matrix": [1, 9 ], "w": 1, "x": 9.5, "y": 1 }, + { "label": "P", "matrix": [1, 10], "w": 1, "x": 10.5, "y": 1 }, + { "label": "]", "matrix": [1, 11], "w": 1, "x": 11.5, "y": 1 }, + { "label": "[", "matrix": [1, 12], "w": 1, "x": 12.5, "y": 1 }, + { "label": "|", "matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1 }, + { "label": "Caps", "matrix": [2, 0 ], "w": 1.75, "x": 0, "y": 2 }, + { "label": "A", "matrix": [2, 1 ], "w": 1, "x": 1.75, "y": 2 }, + { "label": "S", "matrix": [2, 2 ], "w": 1, "x": 2.75, "y": 2 }, + { "label": "D", "matrix": [2, 3 ], "w": 1, "x": 3.75, "y": 2 }, + { "label": "F", "matrix": [2, 4 ], "w": 1, "x": 4.75, "y": 2 }, + { "label": "G", "matrix": [2, 5 ], "w": 1, "x": 5.75, "y": 2 }, + { "label": "H", "matrix": [2, 6 ], "w": 1, "x": 6.75, "y": 2 }, + { "label": "J", "matrix": [2, 7 ], "w": 1, "x": 7.75, "y": 2 }, + { "label": "K", "matrix": [2, 8 ], "w": 1, "x": 8.75, "y": 2 }, + { "label": "L", "matrix": [2, 9 ], "w": 1, "x": 9.75, "y": 2 }, + { "label": ":", "matrix": [2, 10], "w": 1, "x": 10.75, "y": 2 }, + { "label": "\"", "matrix": [2, 11], "w": 1, "x": 11.75, "y": 2 }, + { "label": "~", "matrix": [2, 12], "w": 1, "x": 12.75, "y": 2 }, + { "label": "Enter", "matrix": [2, 13], "w": 1.25, "x": 13.75, "y": 2 }, + { "label": "Shift", "matrix": [3, 0 ], "w": 1.25, "x": 0, "y": 3 }, + { "label": "|", "matrix": [3, 1 ], "w": 1, "x": 1.25, "y": 3 }, + { "label": "Z", "matrix": [3, 2 ], "w": 1, "x": 2.25, "y": 3 }, + { "label": "X", "matrix": [3, 3 ], "w": 1, "x": 3.25, "y": 3 }, + { "label": "C", "matrix": [3, 4 ], "w": 1, "x": 4.25, "y": 3 }, + { "label": "V", "matrix": [3, 5 ], "w": 1, "x": 5.25, "y": 3 }, + { "label": "B", "matrix": [3, 6 ], "w": 1, "x": 6.25, "y": 3 }, + { "label": "N", "matrix": [3, 7 ], "w": 1, "x": 7.25, "y": 3 }, + { "label": "M", "matrix": [3, 8 ], "w": 1, "x": 8.25, "y": 3 }, + { "label": "<", "matrix": [3, 9 ], "w": 1, "x": 9.25, "y": 3 }, + { "label": ">", "matrix": [3, 10], "w": 1, "x": 10.25, "y": 3 }, + { "label": "?", "matrix": [3, 11], "w": 1, "x": 11.25, "y": 3 }, + { "label": "Shift", "matrix": [3, 12], "w": 1.75, "x": 12.25, "y": 3 }, + { "label": "MO(1)", "matrix": [3, 13 ], "w": 1, "x": 14, "y": 3 }, + { "label": "Ctrl", "matrix": [4, 0 ], "w": 1.25, "x": 0, "y": 4 }, + { "label": "Win", "matrix": [4, 1 ], "w": 1.25, "x": 1.25, "y": 4 }, + { "label": "Alt", "matrix": [4, 2 ], "w": 1.25, "x": 2.5, "y": 4 }, + { "label": "Space", "matrix": [4, 6 ], "w": 6.25, "x": 3.75, "y": 4 }, + { "label": "Alt", "matrix": [4, 9 ], "w": 1.25, "x": 10, "y": 4 }, + { "label": "Win", "matrix": [4, 10], "w": 1.25, "x": 11.25, "y": 4 }, + { "label": "Menu", "matrix": [4, 11], "w": 1.25, "x": 12.5, "y": 4 }, + { "label": "Ctrl", "matrix": [4, 12], "w": 1.25, "x": 13.75, "y": 4 } + ] + } + } +} diff --git a/keyboards/smithrune/iron160/iron160_s/keymaps/default/keymap.c b/keyboards/smithrune/iron160/iron160_s/keymaps/default/keymap.c new file mode 100755 index 000000000000..1cc3dea2f6da --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_s/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2022 Gondolindrim + +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( + QK_GESC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT , + KC_LSFT, KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1) , + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC , KC_RALT, KC_RWIN, MO(1) , KC_RCTL, KC_BSPC + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/smithrune/iron160/iron160_s/keymaps/via/keymap.c b/keyboards/smithrune/iron160/iron160_s/keymaps/via/keymap.c new file mode 100755 index 000000000000..f8790cc60076 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_s/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2022 Gondolindrim + +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( + QK_GESC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT , + KC_LSFT, KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1) , + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC , KC_RALT, KC_RWIN, MO(1) , KC_RCTL, KC_BSPC + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/smithrune/iron160/iron160_s/keymaps/via/rules.mk b/keyboards/smithrune/iron160/iron160_s/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_s/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/smithrune/iron160/iron160_s/mcuconf.h b/keyboards/smithrune/iron160/iron160_s/mcuconf.h new file mode 100644 index 000000000000..c9bd9ded2679 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_s/mcuconf.h @@ -0,0 +1,23 @@ +/* +Copyright 2022 Gondolindrim + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include_next + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE diff --git a/keyboards/smithrune/iron160/iron160_s/rules.mk b/keyboards/smithrune/iron160/iron160_s/rules.mk new file mode 100644 index 000000000000..b7824fcbdf74 --- /dev/null +++ b/keyboards/smithrune/iron160/iron160_s/rules.mk @@ -0,0 +1,20 @@ +# 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 = yes # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = no +LTO_ENABLE = no + +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = legacy + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/smithrune/iron160/readme.md b/keyboards/smithrune/iron160/readme.md new file mode 100644 index 000000000000..2c4fe63d461d --- /dev/null +++ b/keyboards/smithrune/iron160/readme.md @@ -0,0 +1,34 @@ +# Iron 160 QMK folder + +![Iron160](https://i.imgur.com/8B2l2pnh.jpg) + +## Introduction + +This is the QMK Firmware repository for the Iron160 PCB, a keyboard designed by [Smith and Rune](https://smithrune.com/) and PCB designed by [Gondolindrim](http://github.com/Gondolindrim), who is also the firwmare maintainer. + +There are two variants of the PCB: a solderable (I160-S) and a hotswap (I160-H) PCB. Both support a myriad of alternative layouts, as well as RGB LEDs for underglow light. + +## How to flash + +### Enter bootloader + +The DFU state in the bootloader can be accessed in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key, escape in the default keymap) and plug in the keyboard; +* **Physical reset button**: press the button on the front of the PCB, next to caps lock, for at least five seconds; +* **Keycode in layout**: Press the key mapped to `QK_BOOT`; in the default layout, that is top left key ('escape') in layer 1. + +### How to compile and flash + +After checking what PCB you own and setting up your build environment, you can compile the Iron 165R2 default keymap by using one of the options below. + + make smithrune/iron160/iron160_s:default + make smithrune/iron160/iron160_h:default + +And use dfu-util in the command line or through a GUI like QMK toolbox to upload the firmware to the PCB. To directly flash the PCB after it is put into a DFU state, use: + + + make smithrune/iron160/iron160_s:default:flash + make smithrune/iron160/iron160_h: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). diff --git a/keyboards/system76/launch_1/keymaps/peterfalken/config.h b/keyboards/system76/launch_1/keymaps/peterfalken/config.h new file mode 100644 index 000000000000..565698b7b512 --- /dev/null +++ b/keyboards/system76/launch_1/keymaps/peterfalken/config.h @@ -0,0 +1,43 @@ +// Copyright 2023 Peter.Falken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Custom RGB_MATRIX settings +#ifdef RGB_MATRIX_ENABLE + // Remove predefined values + #undef RGB_DISABLE_TIMEOUT + #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS + #undef RGB_MATRIX_DEFAULT_MODE + #undef RGB_MATRIX_DEFAULT_HUE + #undef RGB_MATRIX_DEFAULT_SAT + #undef RGB_MATRIX_DEFAULT_VAL + + // Redefine values + // Number of milliseconds to wait until RGB automatically turns off + #define RGB_MATRIX_TIMEOUT 5000 + // Limits maximum brightness of LEDs to 120 out of 255 + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 + // Sets the default startup mode + #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CUSTOM_active_keys + // Sets the default hue, saturation & brightness values + #define RGB_MATRIX_DEFAULT_HUE 0 + #define RGB_MATRIX_DEFAULT_SAT 0 + #define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS/3 +#endif // RGB_MATRIX_ENABLE + +// Custom definition +// Disable RGB_MATRIX_ANIMATIONS to free up space +#ifdef DISABLE_RGB_MATRIX_ANIMATIONS + #undef ENABLE_RGB_MATRIX_CYCLE_ALL + #undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + #undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN + #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN + #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + #undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + #undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL + #undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL + #undef ENABLE_RGB_MATRIX_RAINDROPS + #undef ENABLE_RGB_MATRIX_SPLASH + #undef ENABLE_RGB_MATRIX_MULTISPLASH +#endif // DISABLE_RGB_MATRIX_ANIMATIONS diff --git a/keyboards/system76/launch_1/keymaps/peterfalken/keymap.c b/keyboards/system76/launch_1/keymaps/peterfalken/keymap.c new file mode 100644 index 000000000000..2c5c8bf8625e --- /dev/null +++ b/keyboards/system76/launch_1/keymaps/peterfalken/keymap.c @@ -0,0 +1,90 @@ +// Copyright 2023 Peter.Falken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "peterfalken.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0, default layer + _________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE || HOME | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | || | +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSPACE || PGUP | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | [ | ] | | || | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | \ || PGDN | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | : | " | | | | + | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | | END | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | < | > | ? | | | + | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | + |________________|________|________|________|________|________|________|________|________|________|________|____________|________|________ + | | | | | | | | | | | | | | + | MO.1 | RCTL | LALT | LGUI | SPACE | SPACE | RGUI | RALT | RCTRL | | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| + */ + + [_QWERTY] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, + 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_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_PGDN, + CK_CW, 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_END, + 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, + MO(1), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Layer 1, function layer + _________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || PLAY/ | +| ▽ | ▽ | M.AP | M.AL | LPAD | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ || PAUSE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | LED | LED | LED | || VOLUME | +| TO.0 | TO.1 | TO.2 | TO.3 | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | TOGGLE | DOWN | UP | ▽ || UP | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || VOLUME | +|PRINT SCREEN| ▽ | ▽ | ▽ | ▽ | ▽ | HOME | PGDN | PGUP | END | ▽ | ▽ | ▽ | SLEP || DOWN | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | | | | | | + | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | LEFT | DOWN | UP | RIGHT | ▽ | ▽ | ▽ | | MUTE | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | | | | | | + | ▽ | UN | CU | CO | PA | MV | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | PGUP | + |________________|________|________|________|________|________|________|________|________|________|________|____________|________|________ + | | | | | | | | | | | | | | + | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | TO.0 | | HOME | PGDN | END | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| + + * `QK_BOOT' resets the controller and puts the board into firmware flashing mode. + * If this key is hit accidentally, just unplug the board and plug it back in. + */ + + [_LOWER] = LAYOUT( + KC_TRNS, KC_TRNS, CK_M1, KC_MCTL, KC_LPAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + TO(0), TO(1), TO(2), TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_VAD, RGB_VAI, KC_TRNS, KC_VOLU, + KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, CK_SLP, KC_VOLD, + 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_MUTE, + KC_TRNS, KC_TRNS, CK_CU, CK_CO, CK_PA, CK_MV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_HOME, KC_PGDN, KC_END + ), + + [_RAISE] = 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, + TO(0), TO(1), TO(2), 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_ADJUST] = 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, + TO(0), TO(1), TO(2), 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/keyboards/system76/launch_1/keymaps/peterfalken/readme.md b/keyboards/system76/launch_1/keymaps/peterfalken/readme.md new file mode 100644 index 000000000000..f64d682a51ed --- /dev/null +++ b/keyboards/system76/launch_1/keymaps/peterfalken/readme.md @@ -0,0 +1,14 @@ +Copyright 2023 LEG @PeterFalken + +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 . diff --git a/keyboards/tada68/keymaps/tokyovigilante/keymap.c b/keyboards/tada68/keymaps/tokyovigilante/keymap.c index 80caaa442977..1b4ccb7c0363 100644 --- a/keyboards/tada68/keymaps/tokyovigilante/keymap.c +++ b/keyboards/tada68/keymaps/tokyovigilante/keymap.c @@ -1,7 +1,21 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_ansi(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, KC_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, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - [1] = LAYOUT_ansi(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_DEL, KC_INS, 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_HOME, 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_END, KC_TRNS, KC_TRNS, KC_TRNS, BL_DOWN,BL_TOGG, BL_UP, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R), - [2] = LAYOUT_ansi(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, QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) + [0] = LAYOUT_ansi(QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_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_GRV, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_HOME, MO(1), KC_END, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_ansi(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_P7, KC_P8, KC_P9, KC_NUM, BL_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, + KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, + KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, BL_DOWN, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT), + + [2] = LAYOUT_ansi(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, QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO) }; diff --git a/keyboards/vertex/angle65/info.json b/keyboards/vertex/angle65/info.json index cb017b7f8163..a781a8aa3730 100644 --- a/keyboards/vertex/angle65/info.json +++ b/keyboards/vertex/angle65/info.json @@ -4,8 +4,8 @@ "url": "", "maintainer": "EasonQian1, Vertex-kb", "usb": { - "vid": "0x7374", - "pid": "0x9770", + "vid": "0x9954", + "pid": "0x9970", "device_version": "0.0.1" }, "processor": "STM32F103", diff --git a/keyboards/work_louder/micro/keymaps/peterfalken/config.h b/keyboards/work_louder/micro/keymaps/peterfalken/config.h new file mode 100644 index 000000000000..dc1dd935a970 --- /dev/null +++ b/keyboards/work_louder/micro/keymaps/peterfalken/config.h @@ -0,0 +1,7 @@ +// Copyright 2023 Peter.Falken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define CUSTOM_KEYMAP_LAYERS +#define CUSTOM_LAYER_STATE diff --git a/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c b/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c new file mode 100644 index 000000000000..8ef9a4eb97df --- /dev/null +++ b/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c @@ -0,0 +1,113 @@ +// Copyright 2023 Peter.Falken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "peterfalken.h" + +enum keymap_layers { + _L0, + _L1, + _L2, + _L3, + _L4, + _L5, + _L6, + _ADJUST +}; + +// Shorter custom keycodes +#define CK_UNDO LGUI(KC_Z) // UNDO = CMD + Z +#define CK_REDO SGUI(KC_Z) // REDO = CMD + SHIFT + Z + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_L0] = LAYOUT( + KC_MPLY, KC_9, KC_0, KC_NO, + KC_5, KC_6, KC_7, KC_8, + KC_1, KC_2, KC_3, KC_4, + TO(1), KC_DOT, KC_COMM, _______ + ), + [_L1] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, + KC_5, KC_6, KC_7, KC_8, + KC_9, KC_0, KC_A, KC_B, + TO(2), KC_C, KC_D, KC_E + ), + [_L2] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + TO(3), _______, _______, _______ + ), + [_L3] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + TO(4), _______, _______, _______ + ), + [_L4] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + TO(5), _______, _______, _______ + ), + [_L5] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + TO(6), _______, _______, _______ + ), + [_L6] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + TO(7), _______, _______, _______ + ), + [_ADJUST] = LAYOUT( + QK_BOOT, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + TO(0), _______, _______, _______ + ), +}; + +typedef union { + uint32_t raw; + struct { + uint8_t led_level : 3; + }; +} work_louder_config_t; + +work_louder_config_t work_louder_config; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(CK_UNDO, CK_REDO) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, +}; +#endif // defined(ENCODER_MAP_ENABLE) + +layer_state_t layer_state_set_user(layer_state_t state) { + // Get highest layer as number + int layer = get_highest_layer(state); + // Toggle leds based on binary layer number [1 2 3] + layer & 0x04 ? work_louder_micro_led_1_on(): work_louder_micro_led_1_off(); + layer & 0x02 ? work_louder_micro_led_2_on(): work_louder_micro_led_2_off(); + layer & 0x01 ? work_louder_micro_led_3_on(): work_louder_micro_led_3_off(); + return state; +} + +void eeconfig_init_user(void) { + work_louder_config.raw = 0; + work_louder_config.led_level = 1; + eeconfig_update_user(work_louder_config.raw); +} + +void matrix_init_user(void) { + work_louder_config.raw = eeconfig_read_user(); + work_louder_micro_led_all_set((uint8_t)(work_louder_config.led_level * 255 / 4)); +} diff --git a/keyboards/work_louder/micro/keymaps/peterfalken/readme.md b/keyboards/work_louder/micro/keymaps/peterfalken/readme.md new file mode 100644 index 000000000000..f64d682a51ed --- /dev/null +++ b/keyboards/work_louder/micro/keymaps/peterfalken/readme.md @@ -0,0 +1,14 @@ +Copyright 2023 LEG @PeterFalken + +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 . diff --git a/keyboards/work_louder/micro/keymaps/peterfalken/rules.mk b/keyboards/work_louder/micro/keymaps/peterfalken/rules.mk new file mode 100644 index 000000000000..59ffb099c24b --- /dev/null +++ b/keyboards/work_louder/micro/keymaps/peterfalken/rules.mk @@ -0,0 +1,3 @@ +# Setup QMK features +ENCODER_MAP_ENABLE = yes +RGB_MATRIX_ENABLE = no # Disable RGB key matrix diff --git a/keyboards/work_louder/work_board/keymaps/peterfalken/keymap.c b/keyboards/work_louder/work_board/keymaps/peterfalken/keymap.c new file mode 100644 index 000000000000..5cbe25322a99 --- /dev/null +++ b/keyboards/work_louder/work_board/keymaps/peterfalken/keymap.c @@ -0,0 +1,88 @@ +// Copyright 2023 Peter.Falken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "peterfalken.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | Ctrl | Opt | Cmd | LWR | Space | RSE | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( + 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_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 , + _______, KC_LCTL, KC_LOPT, KC_LCMD, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | ▽ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ ▽ | ▽ | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, _______, + 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, 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( + 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | RSET | ▽ | M.AP | M.AL | LPAD | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | SLEP | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CPWD | UN | CU | CO | PA | MV | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( + QK_BOOT, _______, CK_M1, KC_MCTL, KC_LPAD, _______, _______, _______, _______, _______, _______, KC_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_SLP, + CK_CW, _______, CK_CU, CK_CO, CK_PA, CK_MV, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_QWERTY] = { { KC_VOLU, KC_VOLD } }, + [_RAISE] = { { _______, _______ } }, + [_LOWER] = { { _______, _______ } }, + [_ADJUST] = { { _______, _______ } }, +}; +#endif // ENCODER_ENABLE diff --git a/keyboards/work_louder/work_board/keymaps/peterfalken/readme.md b/keyboards/work_louder/work_board/keymaps/peterfalken/readme.md new file mode 100644 index 000000000000..f64d682a51ed --- /dev/null +++ b/keyboards/work_louder/work_board/keymaps/peterfalken/readme.md @@ -0,0 +1,14 @@ +Copyright 2023 LEG @PeterFalken + +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 . diff --git a/keyboards/work_louder/work_board/keymaps/peterfalken/rules.mk b/keyboards/work_louder/work_board/keymaps/peterfalken/rules.mk new file mode 100644 index 000000000000..e2a6e1084e3d --- /dev/null +++ b/keyboards/work_louder/work_board/keymaps/peterfalken/rules.mk @@ -0,0 +1,3 @@ +# Setup QMK features +ENCODER_MAP_ENABLE = yes +RGB_MATRIX_ENABLE = no # Disable RGB key matrix diff --git a/keyboards/ymdk/id75/board.h b/keyboards/ymdk/id75/board.h new file mode 100644 index 000000000000..49270b36a050 --- /dev/null +++ b/keyboards/ymdk/id75/board.h @@ -0,0 +1,22 @@ +/* Copyright 2022 JasonRen(biu) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next + +#undef STM32_HSECLK +#define STM32_HSECLK 16000000 diff --git a/keyboards/ymdk/id75/config.h b/keyboards/ymdk/id75/config.h new file mode 100644 index 000000000000..02e9d4a2833e --- /dev/null +++ b/keyboards/ymdk/id75/config.h @@ -0,0 +1,31 @@ +/* Copyright 2021 MT + * + * 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_DI_PIN B9 +#define RGB_MATRIX_LED_COUNT 89 + +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS + +#define WS2812_PWM_DRIVER PWMD4 +#define WS2812_PWM_CHANNEL 4 +#define WS2812_PWM_PAL_MODE 2 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_DMA_CHANNEL 7 diff --git a/keyboards/ymdk/id75/halconf.h b/keyboards/ymdk/id75/halconf.h new file mode 100644 index 000000000000..612ce4fc4a8f --- /dev/null +++ b/keyboards/ymdk/id75/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 QMK + * + * 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_PWM TRUE + +#include_next diff --git a/keyboards/ymdk/id75/id75.c b/keyboards/ymdk/id75/id75.c new file mode 100644 index 000000000000..dc56797cad66 --- /dev/null +++ b/keyboards/ymdk/id75/id75.c @@ -0,0 +1,30 @@ +/* Copyright 2021 MT + * + * 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 "quantum.h" + +#ifdef RGB_MATRIX_ENABLE +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + + if (host_keyboard_led_state().caps_lock) { // Capslock = RED + rgb_matrix_set_color(44, 200, 0, 0); + } + return true; +} +#endif diff --git a/keyboards/ymdk/id75/info.json b/keyboards/ymdk/id75/info.json new file mode 100644 index 000000000000..5ed25bc28eb5 --- /dev/null +++ b/keyboards/ymdk/id75/info.json @@ -0,0 +1,250 @@ +{ + "manufacturer": "YMDK", + "keyboard_name": "Idobao x YMDK ID75", + "maintainer": "qmk", + "bootloader": "uf2boot", + "board": "STM32_F103_STM32DUINO", + "diode_direction": "ROW2COL", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["A10", "A9", "A8", "B15", "B14", "B13", "B12", "A5", "A6", "A4", "A3", "A2", "A1", "A0", "A15"], + "rows": ["B2", "B1", "B0", "A7", "B10"] + }, + "processor": "STM32F103", + "ws2812": { + "driver": "pwm" + }, + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "gradient_up_down": true, + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_rain": true, + "pixel_flow": true, + "pixel_fractal": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + }, + "driver": "WS2812", + "layout": [ + { "flags": 4, "matrix": [4, 14], "x": 224, "y": 64 }, + { "flags": 4, "matrix": [4, 13], "x": 208, "y": 64 }, + { "flags": 4, "matrix": [4, 12], "x": 192, "y": 64 }, + { "flags": 4, "matrix": [4, 11], "x": 176, "y": 64 }, + { "flags": 4, "matrix": [4, 10], "x": 160, "y": 64 }, + { "flags": 4, "matrix": [4, 9], "x": 144, "y": 64 }, + { "flags": 4, "matrix": [4, 8], "x": 128, "y": 64 }, + { "flags": 4, "matrix": [4, 7], "x": 112, "y": 64 }, + { "flags": 4, "matrix": [4, 6], "x": 96, "y": 64 }, + { "flags": 4, "matrix": [4, 5], "x": 80, "y": 64 }, + { "flags": 4, "matrix": [4, 4], "x": 64, "y": 64 }, + { "flags": 4, "matrix": [4, 3], "x": 48, "y": 64 }, + { "flags": 4, "matrix": [4, 2], "x": 32, "y": 64 }, + { "flags": 4, "matrix": [4, 1], "x": 16, "y": 64 }, + { "flags": 4, "matrix": [4, 0], "x": 0, "y": 64 }, + { "flags": 4, "matrix": [3, 14], "x": 224, "y": 48 }, + { "flags": 4, "matrix": [3, 13], "x": 208, "y": 48 }, + { "flags": 4, "matrix": [3, 12], "x": 192, "y": 48 }, + { "flags": 4, "matrix": [3, 11], "x": 176, "y": 48 }, + { "flags": 4, "matrix": [3, 10], "x": 160, "y": 48 }, + { "flags": 4, "matrix": [3, 9], "x": 144, "y": 48 }, + { "flags": 4, "matrix": [3, 8], "x": 128, "y": 48 }, + { "flags": 4, "matrix": [3, 7], "x": 112, "y": 48 }, + { "flags": 4, "matrix": [3, 6], "x": 96, "y": 48 }, + { "flags": 4, "matrix": [3, 5], "x": 80, "y": 48 }, + { "flags": 4, "matrix": [3, 4], "x": 64, "y": 48 }, + { "flags": 4, "matrix": [3, 3], "x": 48, "y": 48 }, + { "flags": 4, "matrix": [3, 2], "x": 32, "y": 48 }, + { "flags": 4, "matrix": [3, 1], "x": 16, "y": 48 }, + { "flags": 4, "matrix": [3, 0], "x": 0, "y": 48 }, + { "flags": 4, "matrix": [2, 14], "x": 224, "y": 32 }, + { "flags": 4, "matrix": [2, 13], "x": 208, "y": 32 }, + { "flags": 4, "matrix": [2, 12], "x": 192, "y": 32 }, + { "flags": 4, "matrix": [2, 11], "x": 176, "y": 32 }, + { "flags": 4, "matrix": [2, 10], "x": 160, "y": 32 }, + { "flags": 4, "matrix": [2, 9], "x": 144, "y": 32 }, + { "flags": 4, "matrix": [2, 8], "x": 128, "y": 32 }, + { "flags": 4, "matrix": [2, 7], "x": 112, "y": 32 }, + { "flags": 4, "matrix": [2, 6], "x": 96, "y": 32 }, + { "flags": 4, "matrix": [2, 5], "x": 80, "y": 32 }, + { "flags": 4, "matrix": [2, 4], "x": 64, "y": 32 }, + { "flags": 4, "matrix": [2, 3], "x": 48, "y": 32 }, + { "flags": 4, "matrix": [2, 2], "x": 32, "y": 32 }, + { "flags": 4, "matrix": [2, 1], "x": 16, "y": 32 }, + { "flags": 4, "matrix": [2, 0], "x": 0, "y": 32 }, + { "flags": 4, "matrix": [1, 14], "x": 224, "y": 16 }, + { "flags": 4, "matrix": [1, 13], "x": 208, "y": 16 }, + { "flags": 4, "matrix": [1, 12], "x": 192, "y": 16 }, + { "flags": 4, "matrix": [1, 11], "x": 176, "y": 16 }, + { "flags": 4, "matrix": [1, 10], "x": 160, "y": 16 }, + { "flags": 4, "matrix": [1, 9], "x": 144, "y": 16 }, + { "flags": 4, "matrix": [1, 8], "x": 128, "y": 16 }, + { "flags": 4, "matrix": [1, 7], "x": 112, "y": 16 }, + { "flags": 4, "matrix": [1, 6], "x": 96, "y": 16 }, + { "flags": 4, "matrix": [1, 5], "x": 80, "y": 16 }, + { "flags": 4, "matrix": [1, 4], "x": 64, "y": 16 }, + { "flags": 4, "matrix": [1, 3], "x": 48, "y": 16 }, + { "flags": 4, "matrix": [1, 2], "x": 32, "y": 16 }, + { "flags": 4, "matrix": [1, 1], "x": 16, "y": 16 }, + { "flags": 4, "matrix": [1, 0], "x": 0, "y": 16 }, + { "flags": 4, "matrix": [0, 14], "x": 224, "y": 0 }, + { "flags": 4, "matrix": [0, 13], "x": 208, "y": 0 }, + { "flags": 4, "matrix": [0, 12], "x": 192, "y": 0 }, + { "flags": 4, "matrix": [0, 11], "x": 176, "y": 0 }, + { "flags": 4, "matrix": [0, 10], "x": 160, "y": 0 }, + { "flags": 4, "matrix": [0, 9], "x": 144, "y": 0 }, + { "flags": 4, "matrix": [0, 8], "x": 128, "y": 0 }, + { "flags": 4, "matrix": [0, 7], "x": 112, "y": 0 }, + { "flags": 4, "matrix": [0, 6], "x": 96, "y": 0 }, + { "flags": 4, "matrix": [0, 5], "x": 80, "y": 0 }, + { "flags": 4, "matrix": [0, 4], "x": 64, "y": 0 }, + { "flags": 4, "matrix": [0, 3], "x": 48, "y": 0 }, + { "flags": 4, "matrix": [0, 2], "x": 32, "y": 0 }, + { "flags": 4, "matrix": [0, 1], "x": 16, "y": 0 }, + { "flags": 4, "matrix": [0, 0], "x": 0, "y": 0 }, + { "flags": 2, "x": 0, "y": 64 }, + { "flags": 2, "x": 38, "y": 64 }, + { "flags": 2, "x": 76, "y": 64 }, + { "flags": 2, "x": 114, "y": 64 }, + { "flags": 2, "x": 152, "y": 64 }, + { "flags": 2, "x": 190, "y": 64 }, + { "flags": 2, "x": 224, "y": 64 }, + { "flags": 2, "x": 0, "y": 0 }, + { "flags": 2, "x": 38, "y": 0 }, + { "flags": 2, "x": 76, "y": 0 }, + { "flags": 2, "x": 114, "y": 0 }, + { "flags": 2, "x": 152, "y": 0 }, + { "flags": 2, "x": 190, "y": 0 }, + { "flags": 2, "x": 224, "y": 0 } + ], + "max_brightness": 128 + }, + "usb": { + "device_version": "0.0.1", + "pid": "0x0075", + "vid": "0x594D" + }, + "community_layouts": [ "ortho_5x15" ], + "layouts": { + "LAYOUT_ortho_5x15": { + "layout": [ + { "label": "k00", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, + { "label": "k01", "matrix": [0, 1], "w": 1, "x": 1, "y": 0 }, + { "label": "k02", "matrix": [0, 2], "w": 1, "x": 2, "y": 0 }, + { "label": "k03", "matrix": [0, 3], "w": 1, "x": 3, "y": 0 }, + { "label": "k04", "matrix": [0, 4], "w": 1, "x": 4, "y": 0 }, + { "label": "k05", "matrix": [0, 5], "w": 1, "x": 5, "y": 0 }, + { "label": "k06", "matrix": [0, 6], "w": 1, "x": 6, "y": 0 }, + { "label": "k07", "matrix": [0, 7], "w": 1, "x": 7, "y": 0 }, + { "label": "k08", "matrix": [0, 8], "w": 1, "x": 8, "y": 0 }, + { "label": "k09", "matrix": [0, 9], "w": 1, "x": 9, "y": 0 }, + { "label": "k0A", "matrix": [0, 10], "w": 1, "x": 10, "y": 0 }, + { "label": "k0B", "matrix": [0, 11], "w": 1, "x": 11, "y": 0 }, + { "label": "k0C", "matrix": [0, 12], "w": 1, "x": 12, "y": 0 }, + { "label": "k0D", "matrix": [0, 13], "w": 1, "x": 13, "y": 0 }, + { "label": "k0E", "matrix": [0, 14], "w": 1, "x": 14, "y": 0 }, + { "label": "k10", "matrix": [1, 0], "w": 1, "x": 0, "y": 1 }, + { "label": "k11", "matrix": [1, 1], "w": 1, "x": 1, "y": 1 }, + { "label": "k12", "matrix": [1, 2], "w": 1, "x": 2, "y": 1 }, + { "label": "k13", "matrix": [1, 3], "w": 1, "x": 3, "y": 1 }, + { "label": "k14", "matrix": [1, 4], "w": 1, "x": 4, "y": 1 }, + { "label": "k15", "matrix": [1, 5], "w": 1, "x": 5, "y": 1 }, + { "label": "k16", "matrix": [1, 6], "w": 1, "x": 6, "y": 1 }, + { "label": "k17", "matrix": [1, 7], "w": 1, "x": 7, "y": 1 }, + { "label": "k18", "matrix": [1, 8], "w": 1, "x": 8, "y": 1 }, + { "label": "k19", "matrix": [1, 9], "w": 1, "x": 9, "y": 1 }, + { "label": "k1A", "matrix": [1, 10], "w": 1, "x": 10, "y": 1 }, + { "label": "k1B", "matrix": [1, 11], "w": 1, "x": 11, "y": 1 }, + { "label": "k1C", "matrix": [1, 12], "w": 1, "x": 12, "y": 1 }, + { "label": "k1D", "matrix": [1, 13], "w": 1, "x": 13, "y": 1 }, + { "label": "k1E", "matrix": [1, 14], "w": 1, "x": 14, "y": 1 }, + { "label": "k20", "matrix": [2, 0], "w": 1, "x": 0, "y": 2 }, + { "label": "k21", "matrix": [2, 1], "w": 1, "x": 1, "y": 2 }, + { "label": "k22", "matrix": [2, 2], "w": 1, "x": 2, "y": 2 }, + { "label": "k23", "matrix": [2, 3], "w": 1, "x": 3, "y": 2 }, + { "label": "k24", "matrix": [2, 4], "w": 1, "x": 4, "y": 2 }, + { "label": "k25", "matrix": [2, 5], "w": 1, "x": 5, "y": 2 }, + { "label": "k26", "matrix": [2, 6], "w": 1, "x": 6, "y": 2 }, + { "label": "k27", "matrix": [2, 7], "w": 1, "x": 7, "y": 2 }, + { "label": "k28", "matrix": [2, 8], "w": 1, "x": 8, "y": 2 }, + { "label": "k29", "matrix": [2, 9], "w": 1, "x": 9, "y": 2 }, + { "label": "k2A", "matrix": [2, 10], "w": 1, "x": 10, "y": 2 }, + { "label": "k2B", "matrix": [2, 11], "w": 1, "x": 11, "y": 2 }, + { "label": "k2C", "matrix": [2, 12], "w": 1, "x": 12, "y": 2 }, + { "label": "k2D", "matrix": [2, 13], "w": 1, "x": 13, "y": 2 }, + { "label": "k2E", "matrix": [2, 14], "w": 1, "x": 14, "y": 2 }, + { "label": "k30", "matrix": [3, 0], "w": 1, "x": 0, "y": 3 }, + { "label": "k31", "matrix": [3, 1], "w": 1, "x": 1, "y": 3 }, + { "label": "k32", "matrix": [3, 2], "w": 1, "x": 2, "y": 3 }, + { "label": "k33", "matrix": [3, 3], "w": 1, "x": 3, "y": 3 }, + { "label": "k34", "matrix": [3, 4], "w": 1, "x": 4, "y": 3 }, + { "label": "k35", "matrix": [3, 5], "w": 1, "x": 5, "y": 3 }, + { "label": "k36", "matrix": [3, 6], "w": 1, "x": 6, "y": 3 }, + { "label": "k37", "matrix": [3, 7], "w": 1, "x": 7, "y": 3 }, + { "label": "k38", "matrix": [3, 8], "w": 1, "x": 8, "y": 3 }, + { "label": "k39", "matrix": [3, 9], "w": 1, "x": 9, "y": 3 }, + { "label": "k3A", "matrix": [3, 10], "w": 1, "x": 10, "y": 3 }, + { "label": "k3B", "matrix": [3, 11], "w": 1, "x": 11, "y": 3 }, + { "label": "k3C", "matrix": [3, 12], "w": 1, "x": 12, "y": 3 }, + { "label": "k3D", "matrix": [3, 13], "w": 1, "x": 13, "y": 3 }, + { "label": "k3E", "matrix": [3, 14], "w": 1, "x": 14, "y": 3 }, + { "label": "k40", "matrix": [4, 0], "w": 1, "x": 0, "y": 4 }, + { "label": "k41", "matrix": [4, 1], "w": 1, "x": 1, "y": 4 }, + { "label": "k42", "matrix": [4, 2], "w": 1, "x": 2, "y": 4 }, + { "label": "k43", "matrix": [4, 3], "w": 1, "x": 3, "y": 4 }, + { "label": "k44", "matrix": [4, 4], "w": 1, "x": 4, "y": 4 }, + { "label": "k45", "matrix": [4, 5], "w": 1, "x": 5, "y": 4 }, + { "label": "k46", "matrix": [4, 6], "w": 1, "x": 6, "y": 4 }, + { "label": "k47", "matrix": [4, 7], "w": 1, "x": 7, "y": 4 }, + { "label": "k48", "matrix": [4, 8], "w": 1, "x": 8, "y": 4 }, + { "label": "k49", "matrix": [4, 9], "w": 1, "x": 9, "y": 4 }, + { "label": "k4A", "matrix": [4, 10], "w": 1, "x": 10, "y": 4 }, + { "label": "k4B", "matrix": [4, 11], "w": 1, "x": 11, "y": 4 }, + { "label": "k4C", "matrix": [4, 12], "w": 1, "x": 12, "y": 4 }, + { "label": "k4D", "matrix": [4, 13], "w": 1, "x": 13, "y": 4 }, + { "label": "k4E", "matrix": [4, 14], "w": 1, "x": 14, "y": 4 } + ] + } + } +} diff --git a/keyboards/ymdk/id75/keymaps/default/keymap.json b/keyboards/ymdk/id75/keymaps/default/keymap.json new file mode 100644 index 000000000000..cfea8be49476 --- /dev/null +++ b/keyboards/ymdk/id75/keymaps/default/keymap.json @@ -0,0 +1,24 @@ +{ + "version": 1, + "author": "qmk", + "notes": "", + "keyboard": "ymdk/id75", + "keymap": "default", + "layout": "LAYOUT_ortho_5x15", + "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_BSLS", "KC_GRV", + "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSPC", "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_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", "MO(1)", "KC_UP", "KC_PGDN", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_SPC", "KC_SPC", "KC_SPC", "KC_SPC", "KC_SPC", "KC_RALT", "KC_RCTL", "KC_RCTL", "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", + "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", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "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" + ] + ] +} diff --git a/keyboards/ymdk/id75/keymaps/via/keymap.json b/keyboards/ymdk/id75/keymaps/via/keymap.json new file mode 100644 index 000000000000..8be803d4a97e --- /dev/null +++ b/keyboards/ymdk/id75/keymaps/via/keymap.json @@ -0,0 +1,43 @@ +{ + "version": 1, + "author": "qmk", + "notes": "", + "config": { + "features": { + "via": true + } + }, + "keyboard": "ymdk/id75", + "keymap": "via", + "layout": "LAYOUT_ortho_5x15", + "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_BSLS", "KC_GRV", + "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSPC", "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_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", "MO(1)", "KC_UP", "KC_PGDN", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_SPC", "KC_SPC", "KC_SPC", "KC_SPC", "KC_SPC", "KC_RALT", "KC_RCTL", "KC_RCTL", "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", + "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", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "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", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "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/ymdk/id75/mcuconf.h b/keyboards/ymdk/id75/mcuconf.h new file mode 100644 index 000000000000..0d3de3dad51f --- /dev/null +++ b/keyboards/ymdk/id75/mcuconf.h @@ -0,0 +1,25 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next + +#undef STM32_PWM_USE_TIM4 +#define STM32_PWM_USE_TIM4 TRUE + +#undef STM32_PLLXTPRE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV2 diff --git a/keyboards/ymdk/id75/readme.md b/keyboards/ymdk/id75/readme.md new file mode 100644 index 000000000000..9315745f71dd --- /dev/null +++ b/keyboards/ymdk/id75/readme.md @@ -0,0 +1,30 @@ +# Idobao x YMDK ID75 + +![Idobao x YMDK ID75](https://i.imgur.com/bhVfzrzh.jpg) + +A 75-key, 5-row ortholinear keyboard with per-key and underglow RGB LEDs. + +* Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +* Hardware Supported: [Idobao x YMDK ID75 PCB (APM32F103CBT6)](https://www.aliexpress.com/item/3256804537842097.html) + * This PCB uses an ARM Cortex-M3 MCU with 128kb flash. **It is not the same as `idobao/id75` or `ymdk/ymd75`.** +* Hardware Availability: [YMDK](https://ymdkey.com/products/id75-75-keys-ortholinear-layout-qmk-anodized-aluminum-case-plate-hot-swappable-hot-swap-type-c-pcb-mechanical-keyboard-kit), [AliExpress (YMDK Store)](https://www.aliexpress.com/item/2255800125183974.html), [Amazon](https://www.amazon.com/Ortholinear-Anodized-Aluminum-hot-swappable-Mechanical/dp/B07ZQ8CD88) + +Make example for this keyboard (after setting up your build environment): + + make ymdk/id75:default + +Flashing example for this keyboard: + + make ymdk/id75:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the top left key and plug in the keyboard. This will also clear the emulated EEPROM, so it is a good first step if the keyboard is misbehaving. +* **Physical reset button**: Press the button on the back of the PCB twice in quick succession. +* **Keycode in layout**: Press the key mapped to `QK_BOOT`. In the pre-supplied keymaps it is on the second layer, in the bottom-right corner. + +After entering the bootloader through one of the three methods above, the keyboard will appear as a USB mass storage device named `MT.KEY`. If the CLI is unable to find this device, the compiled `.uf2` file can be manually copied to it. The keyboard will reboot on completion with the new firmware loaded. diff --git a/keyboards/ymdk/id75/rules.mk b/keyboards/ymdk/id75/rules.mk new file mode 100644 index 000000000000..61d5793cc2fc --- /dev/null +++ b/keyboards/ymdk/id75/rules.mk @@ -0,0 +1,9 @@ +# Configure for 128K flash +#MCU_LDSCRIPT = STM32F103xB + +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF + +WS2812_DRIVER = pwm +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/lib/python/qmk/cli/format/python.py b/lib/python/qmk/cli/format/python.py index 008622cac163..e7b545109f20 100755 --- a/lib/python/qmk/cli/format/python.py +++ b/lib/python/qmk/cli/format/python.py @@ -7,7 +7,7 @@ from qmk.path import normpath py_file_suffixes = ('py',) -py_dirs = ['lib/python'] +py_dirs = ['lib/python', 'util/ci'] def yapf_run(files): diff --git a/lib/python/qmk/cli/generate/compilation_database.py b/lib/python/qmk/cli/generate/compilation_database.py index 7ac0f740fe92..5e1a18a69b27 100755 --- a/lib/python/qmk/cli/generate/compilation_database.py +++ b/lib/python/qmk/cli/generate/compilation_database.py @@ -15,6 +15,8 @@ from qmk.commands import create_make_command from qmk.constants import QMK_FIRMWARE from qmk.decorators import automagic_keyboard, automagic_keymap +from qmk.keyboard import keyboard_completer, keyboard_folder +from qmk.keymap import keymap_completer @lru_cache(maxsize=10) @@ -74,8 +76,8 @@ def parse_make_n(f: Iterator[str]) -> List[Dict[str, str]]: return records -@cli.argument('-kb', '--keyboard', help='The keyboard to build a firmware for. Ignored when a configurator export is supplied.') -@cli.argument('-km', '--keymap', help='The keymap to build a firmware for. Ignored when a configurator export is supplied.') +@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='The keyboard\'s name') +@cli.argument('-km', '--keymap', completer=keymap_completer, help='The keymap\'s name') @cli.subcommand('Create a compilation database.') @automagic_keyboard @automagic_keymap @@ -104,7 +106,7 @@ def generate_compilation_database(cli: MILC) -> Union[bool, int]: if not command: cli.log.error('You must supply both `--keyboard` and `--keymap`, or be in a directory for a keyboard or keymap.') - cli.echo('usage: qmk compiledb [-kb KEYBOARD] [-km KEYMAP]') + cli.echo('usage: qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP]') return False # remove any environment variable overrides which could trip us up diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py index c256ec453101..64d4db6ffe14 100755 --- a/lib/python/qmk/cli/generate/config_h.py +++ b/lib/python/qmk/cli/generate/config_h.py @@ -119,7 +119,9 @@ def generate_encoder_config(encoder_json, config_h_lines, postfix=''): config_h_lines.append(generate_define(f'ENCODERS_PAD_B{postfix}', f'{{ {", ".join(b_pads)} }}')) if None in resolutions: - cli.log.debug("Unable to generate ENCODER_RESOLUTION configuration") + cli.log.debug(f"Unable to generate ENCODER_RESOLUTION{postfix} configuration") + elif len(resolutions) == 0: + cli.log.debug(f"Skipping ENCODER_RESOLUTION{postfix} configuration") elif len(set(resolutions)) == 1: config_h_lines.append(generate_define(f'ENCODER_RESOLUTION{postfix}', resolutions[0])) else: diff --git a/lib/python/qmk/cli/mass_compile.py b/lib/python/qmk/cli/mass_compile.py index 909118790c8d..52c1cae4c2d9 100755 --- a/lib/python/qmk/cli/mass_compile.py +++ b/lib/python/qmk/cli/mass_compile.py @@ -9,6 +9,7 @@ from qmk.constants import QMK_FIRMWARE from qmk.commands import _find_make, get_make_parallel_args +from qmk.keyboard import resolve_keyboard from qmk.search import search_keymap_targets @@ -39,7 +40,7 @@ def mass_compile(cli): makefile = builddir / 'parallel_kb_builds.mk' if len(cli.args.builds) > 0: - targets = [(e[0], e[1]) for e in [b.split(':') for b in cli.args.builds]] + targets = list(sorted(set([(resolve_keyboard(e[0]), e[1]) for e in [b.split(':') for b in cli.args.builds]]))) else: targets = search_keymap_targets(cli.args.keymap, cli.args.filter) diff --git a/users/peterfalken/config.h b/users/peterfalken/config.h new file mode 100644 index 000000000000..5295923ec66f --- /dev/null +++ b/users/peterfalken/config.h @@ -0,0 +1,22 @@ +// Copyright 2023 Peter.Falken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Fix warning - "Attached USB accessory uses too much power." +#ifndef USB_MAX_POWER_CONSUMPTION + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +// Fix unresponsiveness on wake from sleep +#ifndef USB_SUSPEND_WAKEUP_DELAY + #define USB_SUSPEND_WAKEUP_DELAY 200 +#endif + +// Space optimizations +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +// Disable animations for RGB underglow & key matrix +#define DISABLE_RGB_LIGHT_ANIMATIONS +#define DISABLE_RGB_MATRIX_ANIMATIONS diff --git a/users/peterfalken/peterfalken.c b/users/peterfalken/peterfalken.c new file mode 100644 index 000000000000..5041f29da6d4 --- /dev/null +++ b/users/peterfalken/peterfalken.c @@ -0,0 +1,11 @@ +// Copyright 2023 Peter.Falken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "peterfalken.h" + +// Switch layer +#ifndef CUSTOM_LAYER_STATE +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} +#endif // CUSTOM_LAYER_STATE diff --git a/users/peterfalken/peterfalken.h b/users/peterfalken/peterfalken.h new file mode 100644 index 000000000000..1f978c49e852 --- /dev/null +++ b/users/peterfalken/peterfalken.h @@ -0,0 +1,27 @@ +// Copyright 2023 Peter.Falken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once +#include QMK_KEYBOARD_H + +#ifndef CUSTOM_KEYMAP_LAYERS + enum default_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST + }; +#endif // CUSTOM_KEYMAP_LAYERS + +// Custom definitions for keys +#define CK_CW CW_TOGG // CAPS_WORD for Caps Word feature +#define CK_SLP KC_SLEP // System Sleep +#define CK_M1 C(KC_DOWN) // Mission Control - One apps +#define CK_CO KC_COPY // COPY = CMD + C +#define CK_CU KC_CUT // CUT = CMD + X +#define CK_MV LAG(KC_V) // MOVE = CMD + OPT + V +#define CK_PA KC_PASTE // PASTE = CMD + V + +// Layer activation +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) diff --git a/users/peterfalken/readme.md b/users/peterfalken/readme.md new file mode 100644 index 000000000000..f64d682a51ed --- /dev/null +++ b/users/peterfalken/readme.md @@ -0,0 +1,14 @@ +Copyright 2023 LEG @PeterFalken + +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 . diff --git a/users/peterfalken/rules.mk b/users/peterfalken/rules.mk new file mode 100644 index 000000000000..dfa5d574aa0c --- /dev/null +++ b/users/peterfalken/rules.mk @@ -0,0 +1,18 @@ +# Setup QMK features +BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in +CAPS_WORD_ENABLE = yes # Enable Caps Word +COMMAND_ENABLE = no # Won't use for now +CONSOLE_ENABLE = no # Won't use for now +DIP_SWITCH_ENABLE = no # Won't use for now +GRAVE_ESC_ENABLE = no # Won't use for now +MAGIC_ENABLE = no # Won't use for now +MOUSEKEY_ENABLE = no # Won't use for now +RAW_ENABLE = no # Disable raw HID commands +RGBLIGHT_ENABLE = no # Disable RGB underglow +SPACE_CADET_ENABLE = no # Free up space + +# Enable Link Time Optimizations +LTO_ENABLE = yes + +# Include userspace files +SRC += $(USER_PATH)/peterfalken.c diff --git a/util/ci/discord-results.py b/util/ci/discord-results.py new file mode 100755 index 000000000000..0c09a4213a1a --- /dev/null +++ b/util/ci/discord-results.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python3 + +import argparse +import os +import re +import sys +from pathlib import Path +from discord_webhook import DiscordWebhook, DiscordEmbed + +parser = argparse.ArgumentParser(prog='discord-results.py', description='Sends a Discord webhook notification at the end of a CI run.') +parser.add_argument('-b', '--branch') +parser.add_argument('-k', '--keymap') +parser.add_argument('-u', '--url') +args = parser.parse_args() + +qmk_dir = Path(__file__).resolve().parents[2].resolve() + +keyboard_re = re.compile(r'CI Metadata: KEYBOARD=(.*)$', re.MULTILINE) +keymap_re = re.compile(r'CI Metadata: KEYMAP=(.*)$', re.MULTILINE) + +successful_builds = sum([len(list(qmk_dir.glob(f'*.{extension}'))) for extension in ['uf2', 'bin', 'hex']]) +failures = list(sorted([f.resolve() for f in (qmk_dir / '.build/').glob('failed.log.*')])) +failed_builds = [] +for f in failures: + with open(f) as fh: + data = fh.read() + kb = keyboard_re.search(data).group(1) + km = keymap_re.search(data).group(1) + failed_builds.append(f'{kb}:{km}') + +webhook = DiscordWebhook(url=os.getenv('DISCORD_WEBHOOK'), username="QMK GitHub CI") +if len(failed_builds) > 0: + failstr = '' + for f in failed_builds: + if len(failstr) >= 1800: + failstr += '<>' + break + failstr += f'{f}\n' + + embed = DiscordEmbed(title=f':infinity: CI Build Failure ({args.branch}, {args.keymap})', description=f'**{successful_builds}** builds succeeded, **{len(failed_builds)}** builds failed:```{failstr}```', color='ff9999') +else: + embed = DiscordEmbed(title=f':infinity: CI Build Success ({args.branch}, {args.keymap})', description=f'**{successful_builds}** builds succeeded.', color='99ff99') + +embed.add_embed_field(name='Build Target', value=f'[**{args.branch}**](https://github.com/qmk/qmk_firmware/tree/{args.branch}) / **{args.keymap}** keymap') +embed.add_embed_field(name='Workflow Run', value=f'[**Link**]({args.url})') +embed.set_timestamp() + +webhook.add_embed(embed) +webhook.execute() diff --git a/util/ci/requirements.txt b/util/ci/requirements.txt new file mode 100644 index 000000000000..3196568e1a7c --- /dev/null +++ b/util/ci/requirements.txt @@ -0,0 +1 @@ +discord-webhook